Mercurial > mplayer.hg
annotate dec_video.c @ 1351:d0d27f5800ea
info about odivx vs. divx4
author | arpi |
---|---|
date | Thu, 19 Jul 2001 23:40:33 +0000 |
parents | 3db173705860 |
children | 5ac130627602 |
rev | line source |
---|---|
1294 | 1 |
2 #include <stdio.h> | |
3 #include <stdlib.h> | |
4 | |
5 #include "config.h" | |
6 | |
7 extern int verbose; // defined in mplayer.c | |
8 extern int divx_quality; | |
9 | |
10 extern double video_time_usage; | |
11 extern double vout_time_usage; | |
12 | |
1327
b12e1817bcc2
some cleanup - fixed warnings, removed old stuff, moved audio resync to dec_audio
arpi
parents:
1309
diff
changeset
|
13 #include "linux/timer.h" |
b12e1817bcc2
some cleanup - fixed warnings, removed old stuff, moved audio resync to dec_audio
arpi
parents:
1309
diff
changeset
|
14 |
1294 | 15 #include "stream.h" |
16 #include "demuxer.h" | |
17 | |
18 #include "wine/mmreg.h" | |
19 #include "wine/avifmt.h" | |
20 #include "wine/vfw.h" | |
21 | |
22 #include "codec-cfg.h" | |
23 #include "stheader.h" | |
24 | |
25 //#include <inttypes.h> | |
26 //#include "libvo/img_format.h" | |
27 | |
28 #include "libvo/video_out.h" | |
29 | |
30 #include "libmpeg2/mpeg2.h" | |
31 #include "libmpeg2/mpeg2_internal.h" | |
32 | |
33 extern picture_t *picture; // exported from libmpeg2/decode.c | |
34 | |
1297 | 35 extern int init_video_codec(sh_video_t *sh_video,int ex); |
1294 | 36 |
37 #ifdef USE_DIRECTSHOW | |
38 #include "loader/DirectShow/DS_VideoDec.h" | |
39 #endif | |
40 | |
41 #ifdef USE_LIBAVCODEC | |
42 #include "libavcodec/avcodec.h" | |
43 AVCodec *lavc_codec=NULL; | |
44 AVCodecContext lavc_context; | |
45 AVPicture lavc_picture; | |
46 #endif | |
47 | |
1349 | 48 #ifndef NEW_DECORE |
1294 | 49 #include "opendivx/decore.h" |
1349 | 50 #else |
51 #include <decore.h> | |
52 #endif | |
1294 | 53 |
54 //**************************************************************************// | |
55 // The OpenDivX stuff: | |
56 //**************************************************************************// | |
57 | |
58 #ifndef NEW_DECORE | |
59 | |
60 static unsigned char *opendivx_src[3]; | |
61 static int opendivx_stride[3]; | |
62 | |
63 // callback, the opendivx decoder calls this for each frame: | |
64 void convert_linux(unsigned char *puc_y, int stride_y, | |
65 unsigned char *puc_u, unsigned char *puc_v, int stride_uv, | |
66 unsigned char *bmp, int width_y, int height_y){ | |
67 | |
68 // printf("convert_yuv called %dx%d stride: %d,%d\n",width_y,height_y,stride_y,stride_uv); | |
69 | |
70 opendivx_src[0]=puc_y; | |
71 opendivx_src[1]=puc_u; | |
72 opendivx_src[2]=puc_v; | |
73 | |
74 opendivx_stride[0]=stride_y; | |
75 opendivx_stride[1]=stride_uv; | |
76 opendivx_stride[2]=stride_uv; | |
77 } | |
78 #endif | |
79 | |
80 | |
81 int init_video(sh_video_t *sh_video){ | |
82 unsigned int out_fmt=sh_video->codec->outfmt[sh_video->outfmtidx]; | |
83 | |
84 switch(sh_video->codec->driver){ | |
1309
598e3047ce13
Add some preliminary support for non-x86 architectures to mplayer
jkeil
parents:
1297
diff
changeset
|
85 #ifdef ARCH_X86 |
1294 | 86 case 2: { |
1297 | 87 if(!init_video_codec(sh_video,0)) { |
1294 | 88 // GUI_MSG( mplUnknowError ) |
89 // exit(1); | |
90 return 0; | |
91 } | |
92 if(verbose) printf("INFO: Win32 video codec init OK!\n"); | |
93 break; | |
94 } | |
1297 | 95 case 6: { |
96 if(!init_video_codec(sh_video,1)) { | |
97 // GUI_MSG( mplUnknowError ) | |
98 // exit(1); | |
99 return 0; | |
100 } | |
101 if(verbose) printf("INFO: Win32Ex video codec init OK!\n"); | |
102 break; | |
103 } | |
1294 | 104 case 4: { // Win32/DirectShow |
105 #ifndef USE_DIRECTSHOW | |
106 fprintf(stderr,"MPlayer was compiled WITHOUT directshow support!\n"); | |
107 return 0; | |
108 // GUI_MSG( mplCompileWithoutDSSupport ) | |
109 // exit(1); | |
110 #else | |
111 sh_video->our_out_buffer=NULL; | |
112 if(DS_VideoDecoder_Open(sh_video->codec->dll,&sh_video->codec->guid, sh_video->bih, 0, &sh_video->our_out_buffer)){ | |
113 // if(DS_VideoDecoder_Open(sh_video->codec->dll,&sh_video->codec->guid, sh_video->bih, 0, NULL)){ | |
114 printf("ERROR: Couldn't open required DirectShow codec: %s\n",sh_video->codec->dll); | |
115 printf("Maybe you forget to upgrade your win32 codecs?? It's time to download the new\n"); | |
116 printf("package from: ftp://thot.banki.hu/esp-team/linux/MPlayer/w32codec.zip !\n"); | |
117 printf("Or you should disable DShow support: make distclean;make -f Makefile.No-DS\n"); | |
118 return 0; | |
119 // #ifdef HAVE_GUI | |
120 // if ( !nogui ) | |
121 // { | |
122 // strcpy( mplShMem->items.videodata.codecdll,sh_video->codec->dll ); | |
123 // mplSendMessage( mplDSCodecNotFound ); | |
124 // usec_sleep( 10000 ); | |
125 // } | |
126 // #endif | |
127 // exit(1); | |
128 } | |
129 | |
130 switch(out_fmt){ | |
131 case IMGFMT_YUY2: | |
132 case IMGFMT_UYVY: | |
133 DS_VideoDecoder_SetDestFmt(16,out_fmt);break; // packed YUV | |
134 case IMGFMT_YV12: | |
135 case IMGFMT_I420: | |
136 case IMGFMT_IYUV: | |
137 DS_VideoDecoder_SetDestFmt(12,out_fmt);break; // planar YUV | |
138 default: | |
139 DS_VideoDecoder_SetDestFmt(out_fmt&255,0); // RGB/BGR | |
140 } | |
141 | |
142 DS_VideoDecoder_Start(); | |
143 | |
144 DS_SetAttr_DivX("Quality",divx_quality); | |
145 // printf("DivX setting result = %d\n", DS_SetAttr_DivX("Quality",divx_quality) ); | |
146 // printf("DivX setting result = %d\n", DS_SetValue_DivX("Brightness",60) ); | |
147 | |
148 if(verbose) printf("INFO: Win32/DShow video codec init OK!\n"); | |
149 break; | |
150 #endif | |
151 } | |
1309
598e3047ce13
Add some preliminary support for non-x86 architectures to mplayer
jkeil
parents:
1297
diff
changeset
|
152 #else /* !ARCH_X86 */ |
598e3047ce13
Add some preliminary support for non-x86 architectures to mplayer
jkeil
parents:
1297
diff
changeset
|
153 case 2: |
598e3047ce13
Add some preliminary support for non-x86 architectures to mplayer
jkeil
parents:
1297
diff
changeset
|
154 case 4: |
598e3047ce13
Add some preliminary support for non-x86 architectures to mplayer
jkeil
parents:
1297
diff
changeset
|
155 case 6: |
598e3047ce13
Add some preliminary support for non-x86 architectures to mplayer
jkeil
parents:
1297
diff
changeset
|
156 fprintf(stderr,"MPlayer does not support win32 codecs on non-x86 platforms!\n"); |
598e3047ce13
Add some preliminary support for non-x86 architectures to mplayer
jkeil
parents:
1297
diff
changeset
|
157 return 0; |
598e3047ce13
Add some preliminary support for non-x86 architectures to mplayer
jkeil
parents:
1297
diff
changeset
|
158 #endif /* !ARCH_X86 */ |
1294 | 159 case 3: { // OpenDivX |
160 if(verbose) printf("OpenDivX video codec\n"); | |
161 { DEC_PARAM dec_param; | |
162 DEC_SET dec_set; | |
1349 | 163 memset(&dec_param,0,sizeof(dec_param)); |
1294 | 164 #ifdef NEW_DECORE |
165 dec_param.output_format=DEC_USER; | |
166 #else | |
167 dec_param.color_depth = 32; | |
168 #endif | |
169 dec_param.x_dim = sh_video->bih->biWidth; | |
170 dec_param.y_dim = sh_video->bih->biHeight; | |
171 decore(0x123, DEC_OPT_INIT, &dec_param, NULL); | |
172 dec_set.postproc_level = divx_quality; | |
173 decore(0x123, DEC_OPT_SETPP, &dec_set, NULL); | |
1349 | 174 } |
175 if(verbose) printf("INFO: OpenDivX video codec init OK!\n"); | |
176 break; | |
177 } | |
178 case 7: { // DivX4Linux | |
179 if(verbose) printf("DivX4Linux video codec\n"); | |
180 { DEC_PARAM dec_param; | |
181 DEC_SET dec_set; | |
182 int bits=16; | |
183 memset(&dec_param,0,sizeof(dec_param)); | |
184 switch(out_fmt){ | |
185 case IMGFMT_YV12: dec_param.output_format=DEC_YV12;bits=12;break; | |
186 case IMGFMT_YUY2: dec_param.output_format=DEC_YUY2;break; | |
187 case IMGFMT_UYVY: dec_param.output_format=DEC_UYVY;break; | |
188 case IMGFMT_I420: dec_param.output_format=DEC_420;bits=12;break; | |
189 case IMGFMT_BGR15: dec_param.output_format=DEC_RGB555_INV;break; | |
190 case IMGFMT_BGR16: dec_param.output_format=DEC_RGB565_INV;break; | |
191 case IMGFMT_BGR24: dec_param.output_format=DEC_RGB24_INV;bits=24;break; | |
192 case IMGFMT_BGR32: dec_param.output_format=DEC_RGB32_INV;bits=32;break; | |
193 default: | |
194 fprintf(stderr,"Unsupported out_fmt: 0x%X\n",out_fmt); | |
195 return 0; | |
196 } | |
197 dec_param.x_dim = sh_video->bih->biWidth; | |
198 dec_param.y_dim = sh_video->bih->biHeight; | |
199 decore(0x123, DEC_OPT_INIT, &dec_param, NULL); | |
200 dec_set.postproc_level = divx_quality; | |
201 decore(0x123, DEC_OPT_SETPP, &dec_set, NULL); | |
202 // sh_video->our_out_buffer = shmem_alloc(((bits*dec_param.x_dim+7)/8)*dec_param.y_dim); | |
203 sh_video->our_out_buffer = shmem_alloc(dec_param.x_dim*dec_param.y_dim*5); | |
1294 | 204 } |
205 if(verbose) printf("INFO: OpenDivX video codec init OK!\n"); | |
206 break; | |
207 } | |
208 case 5: { // FFmpeg's libavcodec | |
209 #ifndef USE_LIBAVCODEC | |
210 fprintf(stderr,"MPlayer was compiled WITHOUT libavcodec support!\n"); | |
211 return 0; //exit(1); | |
212 #else | |
213 if(verbose) printf("FFmpeg's libavcodec video codec\n"); | |
214 avcodec_init(); | |
215 avcodec_register_all(); | |
216 lavc_codec = (AVCodec *)avcodec_find_decoder_by_name(sh_video->codec->dll); | |
217 if(!lavc_codec){ | |
218 fprintf(stderr,"Can't find codec '%s' in libavcodec...\n",sh_video->codec->dll); | |
219 return 0; //exit(1); | |
220 } | |
221 memset(&lavc_context, 0, sizeof(lavc_context)); | |
222 lavc_context.width=sh_video->disp_w; | |
223 lavc_context.height=sh_video->disp_h; | |
224 printf("libavcodec.size: %d x %d\n",lavc_context.width,lavc_context.height); | |
225 /* open it */ | |
226 if (avcodec_open(&lavc_context, lavc_codec) < 0) { | |
227 fprintf(stderr, "could not open codec\n"); | |
228 return 0; //exit(1); | |
229 } | |
230 | |
231 if(verbose) printf("INFO: libavcodec init OK!\n"); | |
232 break; | |
233 #endif | |
234 } | |
235 | |
236 case 1: { | |
237 // init libmpeg2: | |
238 #ifdef MPEG12_POSTPROC | |
239 picture->pp_options=divx_quality; | |
240 #else | |
241 if(divx_quality){ | |
242 printf("WARNING! You requested image postprocessing for an MPEG 1/2 video,\n"); | |
243 printf(" but compiled MPlayer without MPEG 1/2 postprocessing support!\n"); | |
244 printf(" #define MPEG12_POSTPROC in config.h, and recompile libmpeg2!\n"); | |
245 } | |
246 #endif | |
247 mpeg2_allocate_image_buffers (picture); | |
248 break; | |
249 } | |
250 } | |
251 | |
252 return 1; | |
253 } | |
254 | |
255 int decode_video(vo_functions_t *video_out,sh_video_t *sh_video,unsigned char *start,int in_size,int drop_frame){ | |
256 unsigned int out_fmt=sh_video->codec->outfmt[sh_video->outfmtidx]; | |
257 int blit_frame=0; | |
258 | |
259 //-------------------- Decode a frame: ----------------------- | |
260 switch(sh_video->codec->driver){ | |
261 case 3: { | |
262 // OpenDivX | |
263 unsigned int t=GetTimer(); | |
264 unsigned int t2; | |
265 DEC_FRAME dec_frame; | |
266 #ifdef NEW_DECORE | |
267 DEC_PICTURE dec_pic; | |
268 #endif | |
269 // let's decode | |
270 dec_frame.length = in_size; | |
271 dec_frame.bitstream = start; | |
1349 | 272 dec_frame.render_flag = drop_frame?0:1; |
273 | |
1294 | 274 #ifdef NEW_DECORE |
275 dec_frame.bmp=&dec_pic; | |
276 dec_pic.y=dec_pic.u=dec_pic.v=NULL; | |
1349 | 277 decore(0x123, (sh_video->format==mmioFOURCC('D','I','V','3'))?DEC_OPT_FRAME_311:DEC_OPT_FRAME, &dec_frame, NULL); |
278 #else | |
279 decore(0x123, 0, &dec_frame, NULL); | |
1294 | 280 #endif |
1349 | 281 |
1294 | 282 t2=GetTimer();t=t2-t;video_time_usage+=t*0.000001f; |
283 | |
1349 | 284 // let's display |
1294 | 285 #ifdef NEW_DECORE |
286 if(dec_pic.y){ | |
287 void* src[3]; | |
288 int stride[3]; | |
289 src[0]=dec_pic.y; | |
290 src[1]=dec_pic.u; | |
291 src[2]=dec_pic.v; | |
292 stride[0]=dec_pic.stride_y; | |
293 stride[1]=stride[2]=dec_pic.stride_uv; | |
294 video_out->draw_slice(src,stride, | |
295 sh_video->disp_w,sh_video->disp_h,0,0); | |
296 blit_frame=1; | |
297 } | |
298 #else | |
299 if(opendivx_src[0]){ | |
300 video_out->draw_slice(opendivx_src,opendivx_stride, | |
301 sh_video->disp_w,sh_video->disp_h,0,0); | |
302 opendivx_src[0]=NULL; | |
303 blit_frame=1; | |
304 } | |
305 #endif | |
306 t2=GetTimer()-t2;vout_time_usage+=t2*0.000001f; | |
307 | |
308 break; | |
309 } | |
1349 | 310 case 7: { |
311 // DivX4Linux | |
312 unsigned int t=GetTimer(); | |
313 unsigned int t2; | |
314 DEC_FRAME dec_frame; | |
315 // let's decode | |
316 dec_frame.length = in_size; | |
317 dec_frame.bitstream = start; | |
318 dec_frame.render_flag = drop_frame?0:1; | |
319 dec_frame.bmp=sh_video->our_out_buffer; | |
320 dec_frame.stride=sh_video->disp_w; | |
321 // printf("Decoding DivX4 frame\n"); | |
322 decore(0x123, (sh_video->format==mmioFOURCC('D','I','V','3'))?DEC_OPT_FRAME_311:DEC_OPT_FRAME, &dec_frame, NULL); | |
323 t2=GetTimer();t=t2-t;video_time_usage+=t*0.000001f; | |
324 | |
325 if(!drop_frame && sh_video->our_out_buffer){ | |
326 // printf("Displaying DivX4 frame\n"); | |
327 if(out_fmt==IMGFMT_YV12||out_fmt==IMGFMT_IYUV||out_fmt==IMGFMT_I420){ | |
328 uint8_t* dst[3]; | |
329 int stride[3]; | |
330 stride[0]=sh_video->disp_w; | |
331 stride[1]=stride[2]=sh_video->disp_w/2; | |
332 dst[0]=sh_video->our_out_buffer; | |
333 dst[2]=dst[0]+sh_video->disp_w*sh_video->disp_h; | |
334 dst[1]=dst[2]+sh_video->disp_w*sh_video->disp_h/4; | |
335 video_out->draw_slice(dst,stride,sh_video->disp_w,sh_video->disp_h,0,0); | |
336 } else | |
337 video_out->draw_frame((uint8_t **)&sh_video->our_out_buffer); | |
338 blit_frame=1; | |
339 } | |
340 | |
341 t2=GetTimer()-t2;vout_time_usage+=t2*0.000001f; | |
342 | |
343 break; | |
344 } | |
1294 | 345 #ifdef USE_DIRECTSHOW |
346 case 4: { // W32/DirectShow | |
347 unsigned int t=GetTimer(); | |
348 unsigned int t2; | |
349 | |
350 if(drop_frame<2) DS_VideoDecoder_DecodeFrame(start, in_size, 0, !drop_frame); | |
351 | |
352 if(!drop_frame && sh_video->our_out_buffer){ | |
353 t2=GetTimer();t=t2-t;video_time_usage+=t*0.000001f; | |
354 if(out_fmt==IMGFMT_YV12||out_fmt==IMGFMT_IYUV||out_fmt==IMGFMT_I420){ | |
355 uint8_t* dst[3]; | |
356 int stride[3]; | |
357 stride[0]=sh_video->disp_w; | |
358 stride[1]=stride[2]=sh_video->disp_w/2; | |
359 dst[0]=sh_video->our_out_buffer; | |
360 dst[2]=dst[0]+sh_video->disp_w*sh_video->disp_h; | |
361 dst[1]=dst[2]+sh_video->disp_w*sh_video->disp_h/4; | |
362 video_out->draw_slice(dst,stride,sh_video->disp_w,sh_video->disp_h,0,0); | |
363 } else | |
364 video_out->draw_frame((uint8_t **)&sh_video->our_out_buffer); | |
365 t2=GetTimer()-t2;vout_time_usage+=t2*0.000001f; | |
366 blit_frame=1; | |
367 } | |
368 break; | |
369 } | |
370 #endif | |
371 #ifdef USE_LIBAVCODEC | |
372 case 5: { // libavcodec | |
373 unsigned int t=GetTimer(); | |
374 unsigned int t2; | |
375 int got_picture=0; | |
376 | |
377 if(drop_frame<2 && in_size>0){ | |
378 int ret = avcodec_decode_video(&lavc_context, &lavc_picture, | |
379 &got_picture, start, in_size); | |
380 if(ret<0) fprintf(stderr, "Error while decoding frame!\n"); | |
381 } | |
382 | |
383 if(!drop_frame && got_picture){ | |
384 t2=GetTimer();t=t2-t;video_time_usage+=t*0.000001f; | |
385 video_out->draw_slice(lavc_picture.data,lavc_picture.linesize,sh_video->disp_w,sh_video->disp_h,0,0); | |
386 t2=GetTimer()-t2;vout_time_usage+=t2*0.000001f; | |
387 blit_frame=1; | |
388 } | |
389 | |
390 break; | |
391 } | |
392 #endif | |
1297 | 393 case 6: |
1309
598e3047ce13
Add some preliminary support for non-x86 architectures to mplayer
jkeil
parents:
1297
diff
changeset
|
394 case 2: |
598e3047ce13
Add some preliminary support for non-x86 architectures to mplayer
jkeil
parents:
1297
diff
changeset
|
395 #ifdef ARCH_X86 |
598e3047ce13
Add some preliminary support for non-x86 architectures to mplayer
jkeil
parents:
1297
diff
changeset
|
396 { |
1294 | 397 HRESULT ret; |
398 unsigned int t=GetTimer(); | |
399 unsigned int t2; | |
400 | |
401 if(in_size){ | |
402 sh_video->bih->biSizeImage = in_size; | |
403 | |
404 // sh_video->bih->biWidth = 1280; | |
405 // sh_video->o_bih.biWidth = 1280; | |
406 // ret = ICDecompress(avi_header.hic, ICDECOMPRESS_NOTKEYFRAME|(ICDECOMPRESS_HURRYUP|ICDECOMPRESS_PREROL), | |
1297 | 407 |
408 if(sh_video->codec->driver==6) | |
409 ret = ICDecompressEx(sh_video->hic, | |
410 ( (sh_video->ds->flags&1) ? 0 : ICDECOMPRESS_NOTKEYFRAME ) | | |
411 ( (drop_frame==2 && !(sh_video->ds->flags&1))?(ICDECOMPRESS_HURRYUP|ICDECOMPRESS_PREROL):0 ) , | |
412 sh_video->bih, start, | |
413 &sh_video->o_bih, | |
414 drop_frame ? 0 : sh_video->our_out_buffer); | |
415 else | |
1294 | 416 ret = ICDecompress(sh_video->hic, |
417 ( (sh_video->ds->flags&1) ? 0 : ICDECOMPRESS_NOTKEYFRAME ) | | |
418 ( (drop_frame==2 && !(sh_video->ds->flags&1))?(ICDECOMPRESS_HURRYUP|ICDECOMPRESS_PREROL):0 ) , | |
419 sh_video->bih, start, | |
420 &sh_video->o_bih, | |
421 drop_frame ? 0 : sh_video->our_out_buffer); | |
422 | |
423 if(ret){ printf("Error decompressing frame, err=%d\n",(int)ret);break; } | |
424 } | |
425 // current_module="draw_frame"; | |
426 if(!drop_frame){ | |
427 t2=GetTimer();t=t2-t;video_time_usage+=t*0.000001f; | |
428 // if(out_fmt==IMGFMT_YV12){ | |
429 if(out_fmt==IMGFMT_YV12||out_fmt==IMGFMT_IYUV||out_fmt==IMGFMT_I420){ | |
430 uint8_t* dst[3]; | |
431 int stride[3]; | |
432 stride[0]=sh_video->disp_w; | |
433 stride[1]=stride[2]=sh_video->disp_w/2; | |
434 dst[0]=sh_video->our_out_buffer; | |
435 dst[2]=dst[0]+sh_video->disp_w*sh_video->disp_h; | |
436 dst[1]=dst[2]+sh_video->disp_w*sh_video->disp_h/4; | |
437 video_out->draw_slice(dst,stride,sh_video->disp_w,sh_video->disp_h,0,0); | |
438 } else | |
439 video_out->draw_frame((uint8_t **)&sh_video->our_out_buffer); | |
440 t2=GetTimer()-t2;vout_time_usage+=t2*0.000001f; | |
441 blit_frame=1; | |
442 } | |
443 break; | |
444 } | |
1309
598e3047ce13
Add some preliminary support for non-x86 architectures to mplayer
jkeil
parents:
1297
diff
changeset
|
445 #else |
598e3047ce13
Add some preliminary support for non-x86 architectures to mplayer
jkeil
parents:
1297
diff
changeset
|
446 printf("Win32 video codec unavailable on non-x86 CPU -> force nosound :(\n"); |
598e3047ce13
Add some preliminary support for non-x86 architectures to mplayer
jkeil
parents:
1297
diff
changeset
|
447 break; |
598e3047ce13
Add some preliminary support for non-x86 architectures to mplayer
jkeil
parents:
1297
diff
changeset
|
448 #endif |
1294 | 449 case 1: { |
450 int t=0; | |
451 | |
452 t-=GetTimer(); | |
453 mpeg2_decode_data(video_out, start, start+in_size,drop_frame); | |
454 t+=GetTimer(); video_time_usage+=t*0.000001; | |
455 blit_frame=1; | |
456 | |
457 break; | |
458 } | |
459 } // switch | |
460 //------------------------ frame decoded. -------------------- | |
461 | |
462 return blit_frame; | |
463 } |