annotate libmpcodecs/vd_libmpeg2.c @ 34829:77fa83061e2a

Make some tables const.
author reimar
date Fri, 18 May 2012 17:16:35 +0000
parents 8fa2f43cb760
children 139f2b064ef9
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
30421
bbb6ebec87a0 Add missing license headers to all files in the libmpcodecs directory.
diego
parents: 29263
diff changeset
1 /*
bbb6ebec87a0 Add missing license headers to all files in the libmpcodecs directory.
diego
parents: 29263
diff changeset
2 * This file is part of MPlayer.
bbb6ebec87a0 Add missing license headers to all files in the libmpcodecs directory.
diego
parents: 29263
diff changeset
3 *
bbb6ebec87a0 Add missing license headers to all files in the libmpcodecs directory.
diego
parents: 29263
diff changeset
4 * MPlayer is free software; you can redistribute it and/or modify
bbb6ebec87a0 Add missing license headers to all files in the libmpcodecs directory.
diego
parents: 29263
diff changeset
5 * it under the terms of the GNU General Public License as published by
bbb6ebec87a0 Add missing license headers to all files in the libmpcodecs directory.
diego
parents: 29263
diff changeset
6 * the Free Software Foundation; either version 2 of the License, or
bbb6ebec87a0 Add missing license headers to all files in the libmpcodecs directory.
diego
parents: 29263
diff changeset
7 * (at your option) any later version.
bbb6ebec87a0 Add missing license headers to all files in the libmpcodecs directory.
diego
parents: 29263
diff changeset
8 *
bbb6ebec87a0 Add missing license headers to all files in the libmpcodecs directory.
diego
parents: 29263
diff changeset
9 * MPlayer is distributed in the hope that it will be useful,
bbb6ebec87a0 Add missing license headers to all files in the libmpcodecs directory.
diego
parents: 29263
diff changeset
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
bbb6ebec87a0 Add missing license headers to all files in the libmpcodecs directory.
diego
parents: 29263
diff changeset
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
bbb6ebec87a0 Add missing license headers to all files in the libmpcodecs directory.
diego
parents: 29263
diff changeset
12 * GNU General Public License for more details.
bbb6ebec87a0 Add missing license headers to all files in the libmpcodecs directory.
diego
parents: 29263
diff changeset
13 *
bbb6ebec87a0 Add missing license headers to all files in the libmpcodecs directory.
diego
parents: 29263
diff changeset
14 * You should have received a copy of the GNU General Public License along
bbb6ebec87a0 Add missing license headers to all files in the libmpcodecs directory.
diego
parents: 29263
diff changeset
15 * with MPlayer; if not, write to the Free Software Foundation, Inc.,
bbb6ebec87a0 Add missing license headers to all files in the libmpcodecs directory.
diego
parents: 29263
diff changeset
16 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
bbb6ebec87a0 Add missing license headers to all files in the libmpcodecs directory.
diego
parents: 29263
diff changeset
17 */
bbb6ebec87a0 Add missing license headers to all files in the libmpcodecs directory.
diego
parents: 29263
diff changeset
18
4998
c32191b02a66 mpng, libmpeg2 added, none of them finished :(
arpi
parents:
diff changeset
19 #include <stdio.h>
c32191b02a66 mpng, libmpeg2 added, none of them finished :(
arpi
parents:
diff changeset
20 #include <stdlib.h>
c32191b02a66 mpng, libmpeg2 added, none of them finished :(
arpi
parents:
diff changeset
21
c32191b02a66 mpng, libmpeg2 added, none of them finished :(
arpi
parents:
diff changeset
22 #include "config.h"
8026
b465ba5897a3 usage of libmpeg2, liba52, mp3lib & svq1 can be disabled
arpi
parents: 7957
diff changeset
23
4998
c32191b02a66 mpng, libmpeg2 added, none of them finished :(
arpi
parents:
diff changeset
24 #include "mp_msg.h"
c32191b02a66 mpng, libmpeg2 added, none of them finished :(
arpi
parents:
diff changeset
25
c32191b02a66 mpng, libmpeg2 added, none of them finished :(
arpi
parents:
diff changeset
26 #include "vd_internal.h"
c32191b02a66 mpng, libmpeg2 added, none of them finished :(
arpi
parents:
diff changeset
27
31329
60709ef498be Reinstate libmpeg2 hook to export quantization
lu_zero
parents: 31293
diff changeset
28 //#undef MPEG12_POSTPROC
60709ef498be Reinstate libmpeg2 hook to export quantization
lu_zero
parents: 31293
diff changeset
29
30504
cc27da5d7286 Mark all ad_info_t/vd_info_t structure declarations as const.
diego
parents: 30421
diff changeset
30 static const vd_info_t info =
4998
c32191b02a66 mpng, libmpeg2 added, none of them finished :(
arpi
parents:
diff changeset
31 {
27500
84723050e997 Remove version information from libmpeg2 vd_info_t struct.
diego
parents: 26594
diff changeset
32 "libmpeg2 MPEG 1/2 Video decoder",
4998
c32191b02a66 mpng, libmpeg2 added, none of them finished :(
arpi
parents:
diff changeset
33 "libmpeg2",
9859
16a7d1f4da38 Rewritten, to use new libmpeg2 0.3.1 API
arpi
parents: 8026
diff changeset
34 "A'rpi & Fabian Franz",
4998
c32191b02a66 mpng, libmpeg2 added, none of them finished :(
arpi
parents:
diff changeset
35 "Aaron & Walken",
c32191b02a66 mpng, libmpeg2 added, none of them finished :(
arpi
parents:
diff changeset
36 "native"
c32191b02a66 mpng, libmpeg2 added, none of them finished :(
arpi
parents:
diff changeset
37 };
c32191b02a66 mpng, libmpeg2 added, none of them finished :(
arpi
parents:
diff changeset
38
c32191b02a66 mpng, libmpeg2 added, none of them finished :(
arpi
parents:
diff changeset
39 LIBVD_EXTERN(libmpeg2)
c32191b02a66 mpng, libmpeg2 added, none of them finished :(
arpi
parents:
diff changeset
40
c32191b02a66 mpng, libmpeg2 added, none of them finished :(
arpi
parents:
diff changeset
41 #include "libmpeg2/mpeg2.h"
12932
d0a8810e155c Importing libmpeg2 from mpeg2dec-0.4.0b
henry
parents: 12572
diff changeset
42 #include "libmpeg2/attributes.h"
4998
c32191b02a66 mpng, libmpeg2 added, none of them finished :(
arpi
parents:
diff changeset
43 #include "libmpeg2/mpeg2_internal.h"
c32191b02a66 mpng, libmpeg2 added, none of them finished :(
arpi
parents:
diff changeset
44
17012
6ff3379a0862 Unify include path handling, -I.. is in CFLAGS.
diego
parents: 14075
diff changeset
45 #include "cpudetect.h"
5465
1f9c8301a7f2 rewritten - it replaces libmpeg2/decode.c now
arpi
parents: 5360
diff changeset
46
18301
bf150feefe40 Fix memory corruption in vd_libmpeg2
uau
parents: 17012
diff changeset
47 typedef struct {
bf150feefe40 Fix memory corruption in vd_libmpeg2
uau
parents: 17012
diff changeset
48 mpeg2dec_t *mpeg2dec;
bf150feefe40 Fix memory corruption in vd_libmpeg2
uau
parents: 17012
diff changeset
49 int quant_store_idx;
bf150feefe40 Fix memory corruption in vd_libmpeg2
uau
parents: 17012
diff changeset
50 char *quant_store[3];
25977
e3be2de66969 Avoid reinit of vo with the exactly same parameters over and over.
reimar
parents: 25962
diff changeset
51 int imgfmt;
e3be2de66969 Avoid reinit of vo with the exactly same parameters over and over.
reimar
parents: 25962
diff changeset
52 int width;
e3be2de66969 Avoid reinit of vo with the exactly same parameters over and over.
reimar
parents: 25962
diff changeset
53 int height;
e3be2de66969 Avoid reinit of vo with the exactly same parameters over and over.
reimar
parents: 25962
diff changeset
54 double aspect;
31290
f60cd3b9d453 libmpeg2: Move pending_buffer stuff to local decoder context.
diego
parents: 31289
diff changeset
55 unsigned char *pending_buffer;
f60cd3b9d453 libmpeg2: Move pending_buffer stuff to local decoder context.
diego
parents: 31289
diff changeset
56 int pending_length;
18301
bf150feefe40 Fix memory corruption in vd_libmpeg2
uau
parents: 17012
diff changeset
57 } vd_libmpeg2_ctx_t;
bf150feefe40 Fix memory corruption in vd_libmpeg2
uau
parents: 17012
diff changeset
58
4998
c32191b02a66 mpng, libmpeg2 added, none of them finished :(
arpi
parents:
diff changeset
59 // to set/get/query special features/parameters
c32191b02a66 mpng, libmpeg2 added, none of them finished :(
arpi
parents:
diff changeset
60 static int control(sh_video_t *sh,int cmd,void* arg,...){
18301
bf150feefe40 Fix memory corruption in vd_libmpeg2
uau
parents: 17012
diff changeset
61 vd_libmpeg2_ctx_t *context = sh->context;
bf150feefe40 Fix memory corruption in vd_libmpeg2
uau
parents: 17012
diff changeset
62 mpeg2dec_t * mpeg2dec = context->mpeg2dec;
14012
39d2df376d62 1e6l fix (use 422P instead of UYVY)
henry
parents: 13995
diff changeset
63 const mpeg2_info_t * info = mpeg2_info (mpeg2dec);
13995
cbadd7b190b2 libmpeg2 4:2:2 decoding
henry
parents: 13152
diff changeset
64
cbadd7b190b2 libmpeg2 4:2:2 decoding
henry
parents: 13152
diff changeset
65 switch(cmd) {
cbadd7b190b2 libmpeg2 4:2:2 decoding
henry
parents: 13152
diff changeset
66 case VDCTRL_QUERY_FORMAT:
14012
39d2df376d62 1e6l fix (use 422P instead of UYVY)
henry
parents: 13995
diff changeset
67 if (info->sequence->width >> 1 == info->sequence->chroma_width &&
39d2df376d62 1e6l fix (use 422P instead of UYVY)
henry
parents: 13995
diff changeset
68 info->sequence->height >> 1 == info->sequence->chroma_height &&
39d2df376d62 1e6l fix (use 422P instead of UYVY)
henry
parents: 13995
diff changeset
69 (*((int*)arg)) == IMGFMT_YV12)
13995
cbadd7b190b2 libmpeg2 4:2:2 decoding
henry
parents: 13152
diff changeset
70 return CONTROL_TRUE;
14012
39d2df376d62 1e6l fix (use 422P instead of UYVY)
henry
parents: 13995
diff changeset
71 if (info->sequence->width >> 1 == info->sequence->chroma_width &&
39d2df376d62 1e6l fix (use 422P instead of UYVY)
henry
parents: 13995
diff changeset
72 info->sequence->height == info->sequence->chroma_height &&
39d2df376d62 1e6l fix (use 422P instead of UYVY)
henry
parents: 13995
diff changeset
73 (*((int*)arg)) == IMGFMT_422P)
13995
cbadd7b190b2 libmpeg2 4:2:2 decoding
henry
parents: 13152
diff changeset
74 return CONTROL_TRUE;
cbadd7b190b2 libmpeg2 4:2:2 decoding
henry
parents: 13152
diff changeset
75 return CONTROL_FALSE;
cbadd7b190b2 libmpeg2 4:2:2 decoding
henry
parents: 13152
diff changeset
76 }
29263
0f1b5b68af32 whitespace cosmetics: Remove all trailing whitespace.
diego
parents: 29059
diff changeset
77
4998
c32191b02a66 mpng, libmpeg2 added, none of them finished :(
arpi
parents:
diff changeset
78 return CONTROL_UNKNOWN;
c32191b02a66 mpng, libmpeg2 added, none of them finished :(
arpi
parents:
diff changeset
79 }
c32191b02a66 mpng, libmpeg2 added, none of them finished :(
arpi
parents:
diff changeset
80
c32191b02a66 mpng, libmpeg2 added, none of them finished :(
arpi
parents:
diff changeset
81 // init driver
c32191b02a66 mpng, libmpeg2 added, none of them finished :(
arpi
parents:
diff changeset
82 static int init(sh_video_t *sh){
18301
bf150feefe40 Fix memory corruption in vd_libmpeg2
uau
parents: 17012
diff changeset
83 vd_libmpeg2_ctx_t *context;
9859
16a7d1f4da38 Rewritten, to use new libmpeg2 0.3.1 API
arpi
parents: 8026
diff changeset
84 mpeg2dec_t * mpeg2dec;
16a7d1f4da38 Rewritten, to use new libmpeg2 0.3.1 API
arpi
parents: 8026
diff changeset
85 int accel;
5465
1f9c8301a7f2 rewritten - it replaces libmpeg2/decode.c now
arpi
parents: 5360
diff changeset
86
9859
16a7d1f4da38 Rewritten, to use new libmpeg2 0.3.1 API
arpi
parents: 8026
diff changeset
87 accel = 0;
16a7d1f4da38 Rewritten, to use new libmpeg2 0.3.1 API
arpi
parents: 8026
diff changeset
88 if(gCpuCaps.hasMMX)
16a7d1f4da38 Rewritten, to use new libmpeg2 0.3.1 API
arpi
parents: 8026
diff changeset
89 accel |= MPEG2_ACCEL_X86_MMX;
16a7d1f4da38 Rewritten, to use new libmpeg2 0.3.1 API
arpi
parents: 8026
diff changeset
90 if(gCpuCaps.hasMMX2)
16a7d1f4da38 Rewritten, to use new libmpeg2 0.3.1 API
arpi
parents: 8026
diff changeset
91 accel |= MPEG2_ACCEL_X86_MMXEXT;
16a7d1f4da38 Rewritten, to use new libmpeg2 0.3.1 API
arpi
parents: 8026
diff changeset
92 if(gCpuCaps.has3DNow)
16a7d1f4da38 Rewritten, to use new libmpeg2 0.3.1 API
arpi
parents: 8026
diff changeset
93 accel |= MPEG2_ACCEL_X86_3DNOW;
26393
2506f1b0bdbe Backport SSE2-optimized IDCT routines from upstream libmpeg2.
diego
parents: 25977
diff changeset
94 if(gCpuCaps.hasSSE2)
2506f1b0bdbe Backport SSE2-optimized IDCT routines from upstream libmpeg2.
diego
parents: 25977
diff changeset
95 accel |= MPEG2_ACCEL_X86_SSE2;
10267
d953763cc555 libmpeg2-altivec patch by Magnus Damm <damm@opensource.se>:
arpi
parents: 10250
diff changeset
96 if(gCpuCaps.hasAltiVec)
d953763cc555 libmpeg2-altivec patch by Magnus Damm <damm@opensource.se>:
arpi
parents: 10250
diff changeset
97 accel |= MPEG2_ACCEL_PPC_ALTIVEC;
28290
25337a2147e7 Lots and lots of #ifdef ARCH_... -> #if ARCH_...
reimar
parents: 27778
diff changeset
98 #if ARCH_ALPHA
26594
05841cbb86aa Enable Alpha/ARM optimizations in libmpeg2.
diego
parents: 26393
diff changeset
99 accel |= MPEG2_ACCEL_ALPHA;
05841cbb86aa Enable Alpha/ARM optimizations in libmpeg2.
diego
parents: 26393
diff changeset
100 #elif ARCH_ARM
05841cbb86aa Enable Alpha/ARM optimizations in libmpeg2.
diego
parents: 26393
diff changeset
101 accel |= MPEG2_ACCEL_ARM;
05841cbb86aa Enable Alpha/ARM optimizations in libmpeg2.
diego
parents: 26393
diff changeset
102 #endif
28290
25337a2147e7 Lots and lots of #ifdef ARCH_... -> #if ARCH_...
reimar
parents: 27778
diff changeset
103 #if HAVE_MVI
26594
05841cbb86aa Enable Alpha/ARM optimizations in libmpeg2.
diego
parents: 26393
diff changeset
104 accel |= MPEG2_ACCEL_ALPHA_MVI;
05841cbb86aa Enable Alpha/ARM optimizations in libmpeg2.
diego
parents: 26393
diff changeset
105 #elif HAVE_VIS
13117
9bba611637fb actually use the acceleration on SPARC
henry
parents: 13112
diff changeset
106 accel |= MPEG2_ACCEL_SPARC_VIS;
9859
16a7d1f4da38 Rewritten, to use new libmpeg2 0.3.1 API
arpi
parents: 8026
diff changeset
107 #endif
16a7d1f4da38 Rewritten, to use new libmpeg2 0.3.1 API
arpi
parents: 8026
diff changeset
108 mpeg2_accel(accel);
5465
1f9c8301a7f2 rewritten - it replaces libmpeg2/decode.c now
arpi
parents: 5360
diff changeset
109
9859
16a7d1f4da38 Rewritten, to use new libmpeg2 0.3.1 API
arpi
parents: 8026
diff changeset
110 mpeg2dec = mpeg2_init ();
16a7d1f4da38 Rewritten, to use new libmpeg2 0.3.1 API
arpi
parents: 8026
diff changeset
111
16a7d1f4da38 Rewritten, to use new libmpeg2 0.3.1 API
arpi
parents: 8026
diff changeset
112 if(!mpeg2dec) return 0;
16a7d1f4da38 Rewritten, to use new libmpeg2 0.3.1 API
arpi
parents: 8026
diff changeset
113
16a7d1f4da38 Rewritten, to use new libmpeg2 0.3.1 API
arpi
parents: 8026
diff changeset
114 mpeg2_custom_fbuf(mpeg2dec,1); // enable DR1
18301
bf150feefe40 Fix memory corruption in vd_libmpeg2
uau
parents: 17012
diff changeset
115
bf150feefe40 Fix memory corruption in vd_libmpeg2
uau
parents: 17012
diff changeset
116 context = calloc(1, sizeof(vd_libmpeg2_ctx_t));
bf150feefe40 Fix memory corruption in vd_libmpeg2
uau
parents: 17012
diff changeset
117 context->mpeg2dec = mpeg2dec;
bf150feefe40 Fix memory corruption in vd_libmpeg2
uau
parents: 17012
diff changeset
118 sh->context = context;
9859
16a7d1f4da38 Rewritten, to use new libmpeg2 0.3.1 API
arpi
parents: 8026
diff changeset
119
16a7d1f4da38 Rewritten, to use new libmpeg2 0.3.1 API
arpi
parents: 8026
diff changeset
120 return 1;
4998
c32191b02a66 mpng, libmpeg2 added, none of them finished :(
arpi
parents:
diff changeset
121 }
c32191b02a66 mpng, libmpeg2 added, none of them finished :(
arpi
parents:
diff changeset
122
c32191b02a66 mpng, libmpeg2 added, none of them finished :(
arpi
parents:
diff changeset
123 // uninit driver
c32191b02a66 mpng, libmpeg2 added, none of them finished :(
arpi
parents:
diff changeset
124 static void uninit(sh_video_t *sh){
18301
bf150feefe40 Fix memory corruption in vd_libmpeg2
uau
parents: 17012
diff changeset
125 int i;
bf150feefe40 Fix memory corruption in vd_libmpeg2
uau
parents: 17012
diff changeset
126 vd_libmpeg2_ctx_t *context = sh->context;
bf150feefe40 Fix memory corruption in vd_libmpeg2
uau
parents: 17012
diff changeset
127 mpeg2dec_t * mpeg2dec = context->mpeg2dec;
32537
8fa2f43cb760 Remove most of the NULL pointer check before free all over the code
cboesch
parents: 31329
diff changeset
128 free(context->pending_buffer);
14012
39d2df376d62 1e6l fix (use 422P instead of UYVY)
henry
parents: 13995
diff changeset
129 mpeg2dec->decoder.convert=NULL;
39d2df376d62 1e6l fix (use 422P instead of UYVY)
henry
parents: 13995
diff changeset
130 mpeg2dec->decoder.convert_id=NULL;
9859
16a7d1f4da38 Rewritten, to use new libmpeg2 0.3.1 API
arpi
parents: 8026
diff changeset
131 mpeg2_close (mpeg2dec);
18301
bf150feefe40 Fix memory corruption in vd_libmpeg2
uau
parents: 17012
diff changeset
132 for (i=0; i < 3; i++)
bf150feefe40 Fix memory corruption in vd_libmpeg2
uau
parents: 17012
diff changeset
133 free(context->quant_store[i]);
bf150feefe40 Fix memory corruption in vd_libmpeg2
uau
parents: 17012
diff changeset
134 free(sh->context);
4998
c32191b02a66 mpng, libmpeg2 added, none of them finished :(
arpi
parents:
diff changeset
135 }
c32191b02a66 mpng, libmpeg2 added, none of them finished :(
arpi
parents:
diff changeset
136
29263
0f1b5b68af32 whitespace cosmetics: Remove all trailing whitespace.
diego
parents: 29059
diff changeset
137 static void draw_slice (void * _sh, uint8_t * const * src, unsigned int y){
9859
16a7d1f4da38 Rewritten, to use new libmpeg2 0.3.1 API
arpi
parents: 8026
diff changeset
138 sh_video_t* sh = (sh_video_t*) _sh;
18301
bf150feefe40 Fix memory corruption in vd_libmpeg2
uau
parents: 17012
diff changeset
139 vd_libmpeg2_ctx_t *context = sh->context;
bf150feefe40 Fix memory corruption in vd_libmpeg2
uau
parents: 17012
diff changeset
140 mpeg2dec_t* mpeg2dec = context->mpeg2dec;
9859
16a7d1f4da38 Rewritten, to use new libmpeg2 0.3.1 API
arpi
parents: 8026
diff changeset
141 const mpeg2_info_t * info = mpeg2_info (mpeg2dec);
29059
48ba0e64e754 Use MP_MAX_PLANES as size of arrays passed to mpcodecs_draw_slice.
reimar
parents: 28290
diff changeset
142 int stride[MP_MAX_PLANES] = {mpeg2dec->decoder.stride, mpeg2dec->decoder.uv_stride, mpeg2dec->decoder.uv_stride};
48ba0e64e754 Use MP_MAX_PLANES as size of arrays passed to mpcodecs_draw_slice.
reimar
parents: 28290
diff changeset
143 uint8_t *srcs[MP_MAX_PLANES] = {src[0], src[1], src[2]};
5465
1f9c8301a7f2 rewritten - it replaces libmpeg2/decode.c now
arpi
parents: 5360
diff changeset
144
29059
48ba0e64e754 Use MP_MAX_PLANES as size of arrays passed to mpcodecs_draw_slice.
reimar
parents: 28290
diff changeset
145 mpcodecs_draw_slice(sh, srcs,
12572
7d681d8ebab8 display height may be a lot smaller or larger than picture height, sample provided by winnicki
iive
parents: 11080
diff changeset
146 stride, info->sequence->picture_width,
7d681d8ebab8 display height may be a lot smaller or larger than picture height, sample provided by winnicki
iive
parents: 11080
diff changeset
147 (y+16<=info->sequence->picture_height) ? 16 :
7d681d8ebab8 display height may be a lot smaller or larger than picture height, sample provided by winnicki
iive
parents: 11080
diff changeset
148 info->sequence->picture_height-y,
9859
16a7d1f4da38 Rewritten, to use new libmpeg2 0.3.1 API
arpi
parents: 8026
diff changeset
149 0, y);
4998
c32191b02a66 mpng, libmpeg2 added, none of them finished :(
arpi
parents:
diff changeset
150 }
c32191b02a66 mpng, libmpeg2 added, none of them finished :(
arpi
parents:
diff changeset
151
5465
1f9c8301a7f2 rewritten - it replaces libmpeg2/decode.c now
arpi
parents: 5360
diff changeset
152 // decode a frame
1f9c8301a7f2 rewritten - it replaces libmpeg2/decode.c now
arpi
parents: 5360
diff changeset
153 static mp_image_t* decode(sh_video_t *sh,void* data,int len,int flags){
18301
bf150feefe40 Fix memory corruption in vd_libmpeg2
uau
parents: 17012
diff changeset
154 vd_libmpeg2_ctx_t *context = sh->context;
bf150feefe40 Fix memory corruption in vd_libmpeg2
uau
parents: 17012
diff changeset
155 mpeg2dec_t * mpeg2dec = context->mpeg2dec;
9859
16a7d1f4da38 Rewritten, to use new libmpeg2 0.3.1 API
arpi
parents: 8026
diff changeset
156 const mpeg2_info_t * info = mpeg2_info (mpeg2dec);
16a7d1f4da38 Rewritten, to use new libmpeg2 0.3.1 API
arpi
parents: 8026
diff changeset
157 int drop_frame, framedrop=flags&3;
16a7d1f4da38 Rewritten, to use new libmpeg2 0.3.1 API
arpi
parents: 8026
diff changeset
158
13995
cbadd7b190b2 libmpeg2 4:2:2 decoding
henry
parents: 13152
diff changeset
159 // MPlayer registers its own draw_slice callback, prevent libmpeg2 from freeing the context
14012
39d2df376d62 1e6l fix (use 422P instead of UYVY)
henry
parents: 13995
diff changeset
160 mpeg2dec->decoder.convert=NULL;
39d2df376d62 1e6l fix (use 422P instead of UYVY)
henry
parents: 13995
diff changeset
161 mpeg2dec->decoder.convert_id=NULL;
29263
0f1b5b68af32 whitespace cosmetics: Remove all trailing whitespace.
diego
parents: 29059
diff changeset
162
11080
26f1b3ad4a77 skip null frames in mpeg files, patch by Zoltan Hidvegi <mplayer@hzoli.2y.net>
attila
parents: 10663
diff changeset
163 if(len<=0) return NULL; // skipped null frame
29263
0f1b5b68af32 whitespace cosmetics: Remove all trailing whitespace.
diego
parents: 29059
diff changeset
164
9859
16a7d1f4da38 Rewritten, to use new libmpeg2 0.3.1 API
arpi
parents: 8026
diff changeset
165 // append extra 'end of frame' code:
16a7d1f4da38 Rewritten, to use new libmpeg2 0.3.1 API
arpi
parents: 8026
diff changeset
166 ((char*)data+len)[0]=0;
16a7d1f4da38 Rewritten, to use new libmpeg2 0.3.1 API
arpi
parents: 8026
diff changeset
167 ((char*)data+len)[1]=0;
16a7d1f4da38 Rewritten, to use new libmpeg2 0.3.1 API
arpi
parents: 8026
diff changeset
168 ((char*)data+len)[2]=1;
16a7d1f4da38 Rewritten, to use new libmpeg2 0.3.1 API
arpi
parents: 8026
diff changeset
169 ((char*)data+len)[3]=0xff;
16a7d1f4da38 Rewritten, to use new libmpeg2 0.3.1 API
arpi
parents: 8026
diff changeset
170 len+=4;
5465
1f9c8301a7f2 rewritten - it replaces libmpeg2/decode.c now
arpi
parents: 5360
diff changeset
171
31290
f60cd3b9d453 libmpeg2: Move pending_buffer stuff to local decoder context.
diego
parents: 31289
diff changeset
172 if (context->pending_length) {
f60cd3b9d453 libmpeg2: Move pending_buffer stuff to local decoder context.
diego
parents: 31289
diff changeset
173 mpeg2_buffer (mpeg2dec, context->pending_buffer, context->pending_buffer + context->pending_length);
13112
3e4bea88c1c1 libmpeg2 B-frame fix
henry
parents: 12935
diff changeset
174 } else {
23916
b3726f27695f Avoid void * arithmetic
reimar
parents: 20639
diff changeset
175 mpeg2_buffer (mpeg2dec, data, (uint8_t *)data+len);
13112
3e4bea88c1c1 libmpeg2 B-frame fix
henry
parents: 12935
diff changeset
176 }
29263
0f1b5b68af32 whitespace cosmetics: Remove all trailing whitespace.
diego
parents: 29059
diff changeset
177
9859
16a7d1f4da38 Rewritten, to use new libmpeg2 0.3.1 API
arpi
parents: 8026
diff changeset
178 while(1){
16a7d1f4da38 Rewritten, to use new libmpeg2 0.3.1 API
arpi
parents: 8026
diff changeset
179 int state=mpeg2_parse (mpeg2dec);
13995
cbadd7b190b2 libmpeg2 4:2:2 decoding
henry
parents: 13152
diff changeset
180 int type, use_callback;
cbadd7b190b2 libmpeg2 4:2:2 decoding
henry
parents: 13152
diff changeset
181 mp_image_t* mpi_new;
18428
22805699b7b1 moved code to set aspect ratio for mpeg12 away from video.c and into decoder files; A/R changes work correctly with -vc mpeg12
nicodvb
parents: 18301
diff changeset
182 unsigned long pw, ph;
25977
e3be2de66969 Avoid reinit of vo with the exactly same parameters over and over.
reimar
parents: 25962
diff changeset
183 int imgfmt;
29263
0f1b5b68af32 whitespace cosmetics: Remove all trailing whitespace.
diego
parents: 29059
diff changeset
184
9859
16a7d1f4da38 Rewritten, to use new libmpeg2 0.3.1 API
arpi
parents: 8026
diff changeset
185 switch(state){
12932
d0a8810e155c Importing libmpeg2 from mpeg2dec-0.4.0b
henry
parents: 12572
diff changeset
186 case STATE_BUFFER:
31290
f60cd3b9d453 libmpeg2: Move pending_buffer stuff to local decoder context.
diego
parents: 31289
diff changeset
187 if (context->pending_length) {
13152
e264e6d6eb76 clenups
henry
parents: 13150
diff changeset
188 // just finished the pending data, continue with processing of the passed buffer
31290
f60cd3b9d453 libmpeg2: Move pending_buffer stuff to local decoder context.
diego
parents: 31289
diff changeset
189 context->pending_length = 0;
23916
b3726f27695f Avoid void * arithmetic
reimar
parents: 20639
diff changeset
190 mpeg2_buffer (mpeg2dec, data, (uint8_t *)data+len);
13112
3e4bea88c1c1 libmpeg2 B-frame fix
henry
parents: 12935
diff changeset
191 } else {
3e4bea88c1c1 libmpeg2 B-frame fix
henry
parents: 12935
diff changeset
192 // parsing of the passed buffer finished, return.
3e4bea88c1c1 libmpeg2 B-frame fix
henry
parents: 12935
diff changeset
193 return 0;
3e4bea88c1c1 libmpeg2 B-frame fix
henry
parents: 12935
diff changeset
194 }
3e4bea88c1c1 libmpeg2 B-frame fix
henry
parents: 12935
diff changeset
195 break;
9859
16a7d1f4da38 Rewritten, to use new libmpeg2 0.3.1 API
arpi
parents: 8026
diff changeset
196 case STATE_SEQUENCE:
18428
22805699b7b1 moved code to set aspect ratio for mpeg12 away from video.c and into decoder files; A/R changes work correctly with -vc mpeg12
nicodvb
parents: 18301
diff changeset
197 pw = info->sequence->display_width * info->sequence->pixel_width;
22805699b7b1 moved code to set aspect ratio for mpeg12 away from video.c and into decoder files; A/R changes work correctly with -vc mpeg12
nicodvb
parents: 18301
diff changeset
198 ph = info->sequence->display_height * info->sequence->pixel_height;
22805699b7b1 moved code to set aspect ratio for mpeg12 away from video.c and into decoder files; A/R changes work correctly with -vc mpeg12
nicodvb
parents: 18301
diff changeset
199 if(ph) sh->aspect = (float) pw / (float) ph;
25962
afa125da85cf typo fix: inited --> initialized
diego
parents: 23916
diff changeset
200 // video parameters initialized/changed, (re)init libvo:
13995
cbadd7b190b2 libmpeg2 4:2:2 decoding
henry
parents: 13152
diff changeset
201 if (info->sequence->width >> 1 == info->sequence->chroma_width &&
cbadd7b190b2 libmpeg2 4:2:2 decoding
henry
parents: 13152
diff changeset
202 info->sequence->height >> 1 == info->sequence->chroma_height) {
25977
e3be2de66969 Avoid reinit of vo with the exactly same parameters over and over.
reimar
parents: 25962
diff changeset
203 imgfmt = IMGFMT_YV12;
13995
cbadd7b190b2 libmpeg2 4:2:2 decoding
henry
parents: 13152
diff changeset
204 } else if (info->sequence->width >> 1 == info->sequence->chroma_width &&
cbadd7b190b2 libmpeg2 4:2:2 decoding
henry
parents: 13152
diff changeset
205 info->sequence->height == info->sequence->chroma_height) {
25977
e3be2de66969 Avoid reinit of vo with the exactly same parameters over and over.
reimar
parents: 25962
diff changeset
206 imgfmt = IMGFMT_422P;
13995
cbadd7b190b2 libmpeg2 4:2:2 decoding
henry
parents: 13152
diff changeset
207 } else return 0;
25977
e3be2de66969 Avoid reinit of vo with the exactly same parameters over and over.
reimar
parents: 25962
diff changeset
208 if (imgfmt == context->imgfmt &&
e3be2de66969 Avoid reinit of vo with the exactly same parameters over and over.
reimar
parents: 25962
diff changeset
209 info->sequence->picture_width == context->width &&
e3be2de66969 Avoid reinit of vo with the exactly same parameters over and over.
reimar
parents: 25962
diff changeset
210 info->sequence->picture_height == context->height &&
e3be2de66969 Avoid reinit of vo with the exactly same parameters over and over.
reimar
parents: 25962
diff changeset
211 sh->aspect == context->aspect)
e3be2de66969 Avoid reinit of vo with the exactly same parameters over and over.
reimar
parents: 25962
diff changeset
212 break;
e3be2de66969 Avoid reinit of vo with the exactly same parameters over and over.
reimar
parents: 25962
diff changeset
213 if(!mpcodecs_config_vo(sh,
e3be2de66969 Avoid reinit of vo with the exactly same parameters over and over.
reimar
parents: 25962
diff changeset
214 info->sequence->picture_width,
e3be2de66969 Avoid reinit of vo with the exactly same parameters over and over.
reimar
parents: 25962
diff changeset
215 info->sequence->picture_height, imgfmt))
e3be2de66969 Avoid reinit of vo with the exactly same parameters over and over.
reimar
parents: 25962
diff changeset
216 return 0;
e3be2de66969 Avoid reinit of vo with the exactly same parameters over and over.
reimar
parents: 25962
diff changeset
217 context->imgfmt = imgfmt;
e3be2de66969 Avoid reinit of vo with the exactly same parameters over and over.
reimar
parents: 25962
diff changeset
218 context->width = info->sequence->picture_width;
e3be2de66969 Avoid reinit of vo with the exactly same parameters over and over.
reimar
parents: 25962
diff changeset
219 context->height = info->sequence->picture_height;
e3be2de66969 Avoid reinit of vo with the exactly same parameters over and over.
reimar
parents: 25962
diff changeset
220 context->aspect = sh->aspect;
9859
16a7d1f4da38 Rewritten, to use new libmpeg2 0.3.1 API
arpi
parents: 8026
diff changeset
221 break;
13995
cbadd7b190b2 libmpeg2 4:2:2 decoding
henry
parents: 13152
diff changeset
222 case STATE_PICTURE:
cbadd7b190b2 libmpeg2 4:2:2 decoding
henry
parents: 13152
diff changeset
223 type=info->current_picture->flags&PIC_MASK_CODING_TYPE;
29263
0f1b5b68af32 whitespace cosmetics: Remove all trailing whitespace.
diego
parents: 29059
diff changeset
224
9859
16a7d1f4da38 Rewritten, to use new libmpeg2 0.3.1 API
arpi
parents: 8026
diff changeset
225 drop_frame = framedrop && (mpeg2dec->decoder.coding_type == B_TYPE);
16a7d1f4da38 Rewritten, to use new libmpeg2 0.3.1 API
arpi
parents: 8026
diff changeset
226 drop_frame |= framedrop>=2; // hard drop
16a7d1f4da38 Rewritten, to use new libmpeg2 0.3.1 API
arpi
parents: 8026
diff changeset
227 if (drop_frame) {
16a7d1f4da38 Rewritten, to use new libmpeg2 0.3.1 API
arpi
parents: 8026
diff changeset
228 mpeg2_skip(mpeg2dec, 1);
16a7d1f4da38 Rewritten, to use new libmpeg2 0.3.1 API
arpi
parents: 8026
diff changeset
229 break;
16a7d1f4da38 Rewritten, to use new libmpeg2 0.3.1 API
arpi
parents: 8026
diff changeset
230 }
16a7d1f4da38 Rewritten, to use new libmpeg2 0.3.1 API
arpi
parents: 8026
diff changeset
231 mpeg2_skip(mpeg2dec, 0); //mpeg2skip skips frames until set again to 0
16a7d1f4da38 Rewritten, to use new libmpeg2 0.3.1 API
arpi
parents: 8026
diff changeset
232
14012
39d2df376d62 1e6l fix (use 422P instead of UYVY)
henry
parents: 13995
diff changeset
233 use_callback = (!framedrop && vd_use_slices &&
39d2df376d62 1e6l fix (use 422P instead of UYVY)
henry
parents: 13995
diff changeset
234 (info->current_picture->flags&PIC_FLAG_PROGRESSIVE_FRAME)) ?
39d2df376d62 1e6l fix (use 422P instead of UYVY)
henry
parents: 13995
diff changeset
235 MP_IMGFLAG_DRAW_CALLBACK:0;
13995
cbadd7b190b2 libmpeg2 4:2:2 decoding
henry
parents: 13152
diff changeset
236
9859
16a7d1f4da38 Rewritten, to use new libmpeg2 0.3.1 API
arpi
parents: 8026
diff changeset
237 // get_buffer "callback":
13995
cbadd7b190b2 libmpeg2 4:2:2 decoding
henry
parents: 13152
diff changeset
238 mpi_new=mpcodecs_get_image(sh,MP_IMGTYPE_IPB,
14012
39d2df376d62 1e6l fix (use 422P instead of UYVY)
henry
parents: 13995
diff changeset
239 (type==PIC_FLAG_CODING_TYPE_B) ?
39d2df376d62 1e6l fix (use 422P instead of UYVY)
henry
parents: 13995
diff changeset
240 use_callback : (MP_IMGFLAG_PRESERVE|MP_IMGFLAG_READABLE),
14075
6d1b93ceeca1 reserve enough memory for image
henry
parents: 14016
diff changeset
241 info->sequence->width,
6d1b93ceeca1 reserve enough memory for image
henry
parents: 14016
diff changeset
242 info->sequence->height);
13995
cbadd7b190b2 libmpeg2 4:2:2 decoding
henry
parents: 13152
diff changeset
243
13112
3e4bea88c1c1 libmpeg2 B-frame fix
henry
parents: 12935
diff changeset
244 if(!mpi_new) return 0; // VO ERROR!!!!!!!!
3e4bea88c1c1 libmpeg2 B-frame fix
henry
parents: 12935
diff changeset
245 mpeg2_set_buf(mpeg2dec, mpi_new->planes, mpi_new);
20591
ca1d5d9fe51c Set mpi stride, mostly fixes http://samples.mplayerhq.hu/MPEG2/res_change_ffmpeg_aspect.ts
reimar
parents: 18771
diff changeset
246 mpi_new->stride[0] = info->sequence->width;
ca1d5d9fe51c Set mpi stride, mostly fixes http://samples.mplayerhq.hu/MPEG2/res_change_ffmpeg_aspect.ts
reimar
parents: 18771
diff changeset
247 mpi_new->stride[1] = info->sequence->chroma_width;
ca1d5d9fe51c Set mpi stride, mostly fixes http://samples.mplayerhq.hu/MPEG2/res_change_ffmpeg_aspect.ts
reimar
parents: 18771
diff changeset
248 mpi_new->stride[2] = info->sequence->chroma_width;
10510
73b3e4336cd4 Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents: 10267
diff changeset
249 if (info->current_picture->flags&PIC_FLAG_TOP_FIELD_FIRST)
13112
3e4bea88c1c1 libmpeg2 B-frame fix
henry
parents: 12935
diff changeset
250 mpi_new->fields |= MP_IMGFIELD_TOP_FIRST;
3e4bea88c1c1 libmpeg2 B-frame fix
henry
parents: 12935
diff changeset
251 else mpi_new->fields &= ~MP_IMGFIELD_TOP_FIRST;
10510
73b3e4336cd4 Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents: 10267
diff changeset
252 if (info->current_picture->flags&PIC_FLAG_REPEAT_FIRST_FIELD)
13112
3e4bea88c1c1 libmpeg2 B-frame fix
henry
parents: 12935
diff changeset
253 mpi_new->fields |= MP_IMGFIELD_REPEAT_FIRST;
3e4bea88c1c1 libmpeg2 B-frame fix
henry
parents: 12935
diff changeset
254 else mpi_new->fields &= ~MP_IMGFIELD_REPEAT_FIRST;
3e4bea88c1c1 libmpeg2 B-frame fix
henry
parents: 12935
diff changeset
255 mpi_new->fields |= MP_IMGFIELD_ORDERED;
20639
2a2f3db46103 pass the interlacing info to the filter chain
henry
parents: 20591
diff changeset
256 if (!(info->current_picture->flags&PIC_FLAG_PROGRESSIVE_FRAME))
2a2f3db46103 pass the interlacing info to the filter chain
henry
parents: 20591
diff changeset
257 mpi_new->fields |= MP_IMGFIELD_INTERLACED;
31329
60709ef498be Reinstate libmpeg2 hook to export quantization
lu_zero
parents: 31293
diff changeset
258 /*
60709ef498be Reinstate libmpeg2 hook to export quantization
lu_zero
parents: 31293
diff changeset
259 * internal libmpeg2 does export quantization values per slice
60709ef498be Reinstate libmpeg2 hook to export quantization
lu_zero
parents: 31293
diff changeset
260 * we let postproc know them to fine tune it's strength
60709ef498be Reinstate libmpeg2 hook to export quantization
lu_zero
parents: 31293
diff changeset
261 */
60709ef498be Reinstate libmpeg2 hook to export quantization
lu_zero
parents: 31293
diff changeset
262 #if defined(MPEG12_POSTPROC) && defined(CONFIG_LIBMPEG2_INTERNAL)
60709ef498be Reinstate libmpeg2 hook to export quantization
lu_zero
parents: 31293
diff changeset
263 mpi_new->qstride=info->sequence->width>>4;
60709ef498be Reinstate libmpeg2 hook to export quantization
lu_zero
parents: 31293
diff changeset
264 {
60709ef498be Reinstate libmpeg2 hook to export quantization
lu_zero
parents: 31293
diff changeset
265 char **p = &context->quant_store[type==PIC_FLAG_CODING_TYPE_B ?
60709ef498be Reinstate libmpeg2 hook to export quantization
lu_zero
parents: 31293
diff changeset
266 2 : (context->quant_store_idx ^= 1)];
60709ef498be Reinstate libmpeg2 hook to export quantization
lu_zero
parents: 31293
diff changeset
267 *p = realloc(*p, mpi_new->qstride*(info->sequence->height>>4));
60709ef498be Reinstate libmpeg2 hook to export quantization
lu_zero
parents: 31293
diff changeset
268 mpi_new->qscale = *p;
60709ef498be Reinstate libmpeg2 hook to export quantization
lu_zero
parents: 31293
diff changeset
269 }
60709ef498be Reinstate libmpeg2 hook to export quantization
lu_zero
parents: 31293
diff changeset
270 mpeg2dec->decoder.quant_store=mpi_new->qscale;
60709ef498be Reinstate libmpeg2 hook to export quantization
lu_zero
parents: 31293
diff changeset
271 mpeg2dec->decoder.quant_stride=mpi_new->qstride;
60709ef498be Reinstate libmpeg2 hook to export quantization
lu_zero
parents: 31293
diff changeset
272 mpi_new->pict_type=type; // 1->I, 2->P, 3->B
60709ef498be Reinstate libmpeg2 hook to export quantization
lu_zero
parents: 31293
diff changeset
273 mpi_new->qscale_type= 1;
60709ef498be Reinstate libmpeg2 hook to export quantization
lu_zero
parents: 31293
diff changeset
274 #endif
9859
16a7d1f4da38 Rewritten, to use new libmpeg2 0.3.1 API
arpi
parents: 8026
diff changeset
275
14012
39d2df376d62 1e6l fix (use 422P instead of UYVY)
henry
parents: 13995
diff changeset
276 if (mpi_new->flags&MP_IMGFLAG_DRAW_CALLBACK
39d2df376d62 1e6l fix (use 422P instead of UYVY)
henry
parents: 13995
diff changeset
277 && !(mpi_new->flags&MP_IMGFLAG_DIRECT)) {
39d2df376d62 1e6l fix (use 422P instead of UYVY)
henry
parents: 13995
diff changeset
278 // nice, filter/vo likes draw_callback :)
39d2df376d62 1e6l fix (use 422P instead of UYVY)
henry
parents: 13995
diff changeset
279 mpeg2dec->decoder.convert=draw_slice;
39d2df376d62 1e6l fix (use 422P instead of UYVY)
henry
parents: 13995
diff changeset
280 mpeg2dec->decoder.convert_id=sh;
39d2df376d62 1e6l fix (use 422P instead of UYVY)
henry
parents: 13995
diff changeset
281 } else {
39d2df376d62 1e6l fix (use 422P instead of UYVY)
henry
parents: 13995
diff changeset
282 mpeg2dec->decoder.convert=NULL;
39d2df376d62 1e6l fix (use 422P instead of UYVY)
henry
parents: 13995
diff changeset
283 mpeg2dec->decoder.convert_id=NULL;
13995
cbadd7b190b2 libmpeg2 4:2:2 decoding
henry
parents: 13152
diff changeset
284 }
29263
0f1b5b68af32 whitespace cosmetics: Remove all trailing whitespace.
diego
parents: 29059
diff changeset
285
9859
16a7d1f4da38 Rewritten, to use new libmpeg2 0.3.1 API
arpi
parents: 8026
diff changeset
286 break;
16a7d1f4da38 Rewritten, to use new libmpeg2 0.3.1 API
arpi
parents: 8026
diff changeset
287 case STATE_SLICE:
16a7d1f4da38 Rewritten, to use new libmpeg2 0.3.1 API
arpi
parents: 8026
diff changeset
288 case STATE_END:
12932
d0a8810e155c Importing libmpeg2 from mpeg2dec-0.4.0b
henry
parents: 12572
diff changeset
289 case STATE_INVALID_END:
9859
16a7d1f4da38 Rewritten, to use new libmpeg2 0.3.1 API
arpi
parents: 8026
diff changeset
290 // decoding done:
13112
3e4bea88c1c1 libmpeg2 B-frame fix
henry
parents: 12935
diff changeset
291 if(info->display_fbuf) {
13152
e264e6d6eb76 clenups
henry
parents: 13150
diff changeset
292 mp_image_t* mpi = info->display_fbuf->id;
31290
f60cd3b9d453 libmpeg2: Move pending_buffer stuff to local decoder context.
diego
parents: 31289
diff changeset
293 if (context->pending_length == 0) {
f60cd3b9d453 libmpeg2: Move pending_buffer stuff to local decoder context.
diego
parents: 31289
diff changeset
294 context->pending_length = mpeg2dec->buf_end - mpeg2dec->buf_start;
f60cd3b9d453 libmpeg2: Move pending_buffer stuff to local decoder context.
diego
parents: 31289
diff changeset
295 context->pending_buffer = realloc(context->pending_buffer, context->pending_length);
f60cd3b9d453 libmpeg2: Move pending_buffer stuff to local decoder context.
diego
parents: 31289
diff changeset
296 memcpy(context->pending_buffer, mpeg2dec->buf_start, context->pending_length);
13152
e264e6d6eb76 clenups
henry
parents: 13150
diff changeset
297 } else {
e264e6d6eb76 clenups
henry
parents: 13150
diff changeset
298 // still some data in the pending buffer, shouldn't happen
31290
f60cd3b9d453 libmpeg2: Move pending_buffer stuff to local decoder context.
diego
parents: 31289
diff changeset
299 context->pending_length = mpeg2dec->buf_end - mpeg2dec->buf_start;
f60cd3b9d453 libmpeg2: Move pending_buffer stuff to local decoder context.
diego
parents: 31289
diff changeset
300 memmove(context->pending_buffer, mpeg2dec->buf_start, context->pending_length);
f60cd3b9d453 libmpeg2: Move pending_buffer stuff to local decoder context.
diego
parents: 31289
diff changeset
301 context->pending_buffer = realloc(context->pending_buffer, context->pending_length + len);
f60cd3b9d453 libmpeg2: Move pending_buffer stuff to local decoder context.
diego
parents: 31289
diff changeset
302 memcpy(context->pending_buffer+context->pending_length, data, len);
f60cd3b9d453 libmpeg2: Move pending_buffer stuff to local decoder context.
diego
parents: 31289
diff changeset
303 context->pending_length += len;
13152
e264e6d6eb76 clenups
henry
parents: 13150
diff changeset
304 }
13112
3e4bea88c1c1 libmpeg2 B-frame fix
henry
parents: 12935
diff changeset
305 return mpi;
3e4bea88c1c1 libmpeg2 B-frame fix
henry
parents: 12935
diff changeset
306 }
7957
31fd09cc9ba2 passing picture_type (might be usefull for postprocessing)
michael
parents: 7756
diff changeset
307 }
31fd09cc9ba2 passing picture_type (might be usefull for postprocessing)
michael
parents: 7756
diff changeset
308 }
5465
1f9c8301a7f2 rewritten - it replaces libmpeg2/decode.c now
arpi
parents: 5360
diff changeset
309 }