summaryrefslogtreecommitdiff
path: root/src/libmpeg2/mpeg2_internal.h
diff options
context:
space:
mode:
authorMiguel Freitas <miguelfreitas@users.sourceforge.net>2002-04-01 13:18:21 +0000
committerMiguel Freitas <miguelfreitas@users.sourceforge.net>2002-04-01 13:18:21 +0000
commitc466f03689df63a5c6cbad58318551759a96b183 (patch)
tree81f598fc01e62dad07984d622f907f0c3795542f /src/libmpeg2/mpeg2_internal.h
parent597b77d5cf3b65ba2a14c1ac3ffbfab74b1f5593 (diff)
downloadxine-lib-c466f03689df63a5c6cbad58318551759a96b183.tar.gz
xine-lib-c466f03689df63a5c6cbad58318551759a96b183.tar.bz2
- sync with mpeg2dec 0.2.1
- small changes to frame freeing logic CVS patchset: 1655 CVS date: 2002/04/01 13:18:21
Diffstat (limited to 'src/libmpeg2/mpeg2_internal.h')
-rw-r--r--src/libmpeg2/mpeg2_internal.h124
1 files changed, 65 insertions, 59 deletions
diff --git a/src/libmpeg2/mpeg2_internal.h b/src/libmpeg2/mpeg2_internal.h
index 767be0093..adbd5e8fa 100644
--- a/src/libmpeg2/mpeg2_internal.h
+++ b/src/libmpeg2/mpeg2_internal.h
@@ -1,8 +1,10 @@
/*
* mpeg2_internal.h
- * Copyright (C) 1999-2001 Aaron Holtzman <aholtzma@ess.engr.uvic.ca>
+ * Copyright (C) 2000-2002 Michel Lespinasse <walken@zoy.org>
+ * Copyright (C) 1999-2000 Aaron Holtzman <aholtzma@ess.engr.uvic.ca>
*
* This file is part of mpeg2dec, a free MPEG-2 video stream decoder.
+ * See http://libmpeg2.sourceforge.net/ for updates.
*
* mpeg2dec is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -47,13 +49,14 @@
typedef struct motion_s {
uint8_t * ref[2][3];
+ uint8_t ** ref2[2];
int pmv[2][2];
int f_code[2];
} motion_t;
typedef struct picture_s {
/* first, state that carries information from one macroblock to the */
- /* next inside a slice, and is never used outside of slice_process() */
+ /* next inside a slice, and is never used outside of mpeg2_slice() */
/* DCT coefficients - should be kept aligned ! */
int16_t DCTblock[64];
@@ -63,6 +66,15 @@ typedef struct picture_s {
int bitstream_bits; /* used bits in working set */
uint8_t * bitstream_ptr; /* buffer with stream data */
+ uint8_t * dest[3];
+ int offset;
+ int stride;
+ int uv_stride;
+ unsigned int limit_x;
+ unsigned int limit_y_16;
+ unsigned int limit_y_8;
+ unsigned int limit_y;
+
/* Motion vectors */
/* The f_ and b_ correspond to the forward and backward motion */
/* predictors */
@@ -74,7 +86,8 @@ typedef struct picture_s {
int quantizer_scale; /* remove */
int current_field; /* remove */
- int v_offset; /* remove */
+ int dmv_offset; /* remove */
+ unsigned int v_offset; /* remove */
/* now non-slice-specific information */
@@ -110,8 +123,6 @@ typedef struct picture_s {
int q_scale_type;
/* bool to use different vlc tables */
int intra_vlc_format;
- /* last macroblock in the picture */
- int last_mba;
/* used for DMV MC */
int top_field_first;
@@ -123,7 +134,6 @@ typedef struct picture_s {
struct vo_frame_s * current_frame;
struct vo_frame_s * forward_reference_frame;
struct vo_frame_s * backward_reference_frame;
- struct vo_frame_s * throwaway_frame;
int frame_width, frame_height;
@@ -140,7 +150,6 @@ typedef struct picture_s {
int progressive_sequence;
int repeat_first_field;
int progressive_frame;
- /*int bitrate; */
uint32_t frame_centre_horizontal_offset;
uint32_t frame_centre_vertical_offset;
uint32_t video_format;
@@ -158,75 +167,72 @@ typedef struct picture_s {
uint32_t closed_gop;
uint32_t broken_link;
+ int bitrate;
} picture_t;
-typedef struct mpeg2_config_s {
- /* Bit flags that enable various things */
- uint32_t flags;
-} mpeg2_config_t;
-
-/* The only global variable, */
-/* the config struct */
-extern mpeg2_config_t config;
+typedef struct cpu_state_s {
+#ifdef ARCH_PPC
+ uint8_t regv[12*16];
+#endif
+ int dummy;
+} cpu_state_t;
+/* cpu_state.c */
+void mpeg2_cpu_state_init (uint32_t mm_accel);
-
-/* slice.c */
-void header_state_init (picture_t * picture);
-int header_process_picture_header (picture_t * picture, uint8_t * buffer);
-int header_process_sequence_header (picture_t * picture, uint8_t * buffer);
-int header_process_extension (picture_t * picture, uint8_t * buffer);
-int header_process_group_of_pictures (picture_t * picture, uint8_t * buffer);
+/* header.c */
+void mpeg2_header_state_init (picture_t * picture);
+int mpeg2_header_picture (picture_t * picture, uint8_t * buffer);
+int mpeg2_header_sequence (picture_t * picture, uint8_t * buffer);
+int mpeg2_header_extension (picture_t * picture, uint8_t * buffer);
+int mpeg2_header_group_of_pictures (picture_t * picture, uint8_t * buffer);
/* idct.c */
-void idct_init (void);
+void mpeg2_idct_init (uint32_t mm_accel);
/* idct_mlib.c */
-void idct_block_copy_mlib (int16_t * block, uint8_t * dest, int stride);
-void idct_block_add_mlib (int16_t * block, uint8_t * dest, int stride);
+void mpeg2_idct_add_mlib (int16_t * block, uint8_t * dest, int stride);
+void mpeg2_idct_copy_mlib_non_ieee (int16_t * block, uint8_t * dest,
+ int stride);
+void mpeg2_idct_add_mlib_non_ieee (int16_t * block, uint8_t * dest,
+ int stride);
/* idct_mmx.c */
-void idct_block_copy_mmxext (int16_t *block, uint8_t * dest, int stride);
-void idct_block_add_mmxext (int16_t *block, uint8_t * dest, int stride);
-void idct_block_copy_mmx (int16_t *block, uint8_t * dest, int stride);
-void idct_block_add_mmx (int16_t *block, uint8_t * dest, int stride);
-void idct_mmx_init (void);
+void mpeg2_idct_copy_mmxext (int16_t * block, uint8_t * dest, int stride);
+void mpeg2_idct_add_mmxext (int16_t * block, uint8_t * dest, int stride);
+void mpeg2_idct_copy_mmx (int16_t * block, uint8_t * dest, int stride);
+void mpeg2_idct_add_mmx (int16_t * block, uint8_t * dest, int stride);
+void mpeg2_idct_mmx_init (void);
-#ifdef ENABLE_ALTIVEC
/* idct_altivec.c */
-void idct_block_copy_altivec (int16_t * block, uint8_t * dest, int stride);
-void idct_block_add_altivec (int16_t * block, uint8_t * dest, int stride);
-void idct_altivec_init (void);
-#endif
+void mpeg2_idct_copy_altivec (int16_t * block, uint8_t * dest, int stride);
+void mpeg2_idct_add_altivec (int16_t * block, uint8_t * dest, int stride);
+void mpeg2_idct_altivec_init (void);
/* motion_comp.c */
-void motion_comp_init (void);
-
-typedef struct mc_functions_s
-{
- void (* put [8]) (uint8_t *dst, uint8_t *, int32_t, int32_t);
- void (* avg [8]) (uint8_t *dst, uint8_t *, int32_t, int32_t);
-} mc_functions_t;
-
-#define MOTION_COMP_EXTERN(x) mc_functions_t mc_functions_##x = \
-{ \
- {MC_put_16_##x, MC_put_x16_##x, MC_put_y16_##x, MC_put_xy16_##x, \
- MC_put_8_##x, MC_put_x8_##x, MC_put_y8_##x, MC_put_xy8_##x}, \
- {MC_avg_16_##x, MC_avg_x16_##x, MC_avg_y16_##x, MC_avg_xy16_##x, \
- MC_avg_8_##x, MC_avg_x8_##x, MC_avg_y8_##x, MC_avg_xy8_##x} \
+void mpeg2_mc_init (uint32_t mm_accel);
+
+typedef struct mpeg2_mc_s {
+ void (* put [8]) (uint8_t * dst, uint8_t *, int32_t, int32_t);
+ void (* avg [8]) (uint8_t * dst, uint8_t *, int32_t, int32_t);
+} mpeg2_mc_t;
+
+#define MPEG2_MC_EXTERN(x) mpeg2_mc_t mpeg2_mc_##x = { \
+ {MC_put_o_16_##x, MC_put_x_16_##x, MC_put_y_16_##x, MC_put_xy_16_##x, \
+ MC_put_o_8_##x, MC_put_x_8_##x, MC_put_y_8_##x, MC_put_xy_8_##x}, \
+ {MC_avg_o_16_##x, MC_avg_x_16_##x, MC_avg_y_16_##x, MC_avg_xy_16_##x, \
+ MC_avg_o_8_##x, MC_avg_x_8_##x, MC_avg_y_8_##x, MC_avg_xy_8_##x} \
};
-extern mc_functions_t mc_functions_c;
-extern mc_functions_t mc_functions_mmx;
-extern mc_functions_t mc_functions_mmxext;
-extern mc_functions_t mc_functions_3dnow;
-#ifdef ENABLE_ALTIVEC
-extern mc_functions_t mc_functions_altivec;
-#endif
-extern mc_functions_t mc_functions_mlib;
+extern mpeg2_mc_t mpeg2_mc_c;
+extern mpeg2_mc_t mpeg2_mc_mmx;
+extern mpeg2_mc_t mpeg2_mc_mmxext;
+extern mpeg2_mc_t mpeg2_mc_3dnow;
+extern mpeg2_mc_t mpeg2_mc_altivec;
+extern mpeg2_mc_t mpeg2_mc_mlib;
/* slice.c */
-int slice_process (picture_t *picture, uint8_t code, uint8_t * buffer);
+void mpeg2_slice (picture_t * picture, int code, uint8_t * buffer);
/* stats.c */
-void stats_header (uint8_t code, uint8_t * buffer);
+void mpeg2_stats (int code, uint8_t * buffer);