Mercurial > mplayer.hg
annotate libmpcodecs/vd.c @ 5328:014ddf03476d
check and set codec selection - impossible to do it at find_codec
author | arpi |
---|---|
date | Mon, 25 Mar 2002 03:19:43 +0000 |
parents | 75092614a37d |
children | b87743434e1f |
rev | line source |
---|---|
4878 | 1 #include <stdio.h> |
2 #include <stdlib.h> | |
3 #include <string.h> | |
4 | |
5 #include "config.h" | |
6 #include "mp_msg.h" | |
5075 | 7 #include "help_mp.h" |
4878 | 8 |
9 #ifdef HAVE_MALLOC_H | |
10 #include <malloc.h> | |
11 #endif | |
12 | |
13 #include "codec-cfg.h" | |
14 //#include "mp_image.h" | |
15 | |
16 #include "../libvo/img_format.h" | |
17 | |
18 #include "stream.h" | |
19 #include "demuxer.h" | |
20 #include "stheader.h" | |
21 | |
22 #include "vd.h" | |
23 //#include "vd_internal.h" | |
24 | |
25 extern vd_functions_t mpcodecs_vd_null; | |
4885 | 26 extern vd_functions_t mpcodecs_vd_cinepak; |
4915
f6990fad0ab3
Qt RPZA decoder interface by Roberto Togni <rtogni@bresciaonline.it>
arpi
parents:
4899
diff
changeset
|
27 extern vd_functions_t mpcodecs_vd_qtrpza; |
4951 | 28 extern vd_functions_t mpcodecs_vd_ffmpeg; |
4958 | 29 extern vd_functions_t mpcodecs_vd_dshow; |
4968 | 30 extern vd_functions_t mpcodecs_vd_vfw; |
31 extern vd_functions_t mpcodecs_vd_vfwex; | |
32 extern vd_functions_t mpcodecs_vd_odivx; | |
33 extern vd_functions_t mpcodecs_vd_divx4; | |
4969 | 34 extern vd_functions_t mpcodecs_vd_raw; |
35 extern vd_functions_t mpcodecs_vd_xanim; | |
5193
abea2deab4d6
MPlayer now has a Microsoft RLE decoder to call its own...only supports
melanson
parents:
5180
diff
changeset
|
36 extern vd_functions_t mpcodecs_vd_msrle; |
4987 | 37 extern vd_functions_t mpcodecs_vd_msvidc; |
38 extern vd_functions_t mpcodecs_vd_fli; | |
4989 | 39 extern vd_functions_t mpcodecs_vd_qtrle; |
40 extern vd_functions_t mpcodecs_vd_qtsmc; | |
41 extern vd_functions_t mpcodecs_vd_roqvideo; | |
42 extern vd_functions_t mpcodecs_vd_cyuv; | |
43 extern vd_functions_t mpcodecs_vd_nuv; | |
4998 | 44 extern vd_functions_t mpcodecs_vd_mpng; |
5029 | 45 extern vd_functions_t mpcodecs_vd_ijpg; |
4998 | 46 extern vd_functions_t mpcodecs_vd_libmpeg2; |
5235
3e04fd1074d3
added HuffYUV support, courtesy of Roberto Togni <rtogni@bresciaonline.it>
melanson
parents:
5224
diff
changeset
|
47 extern vd_functions_t mpcodecs_vd_huffyuv; |
5264 | 48 extern vd_functions_t mpcodecs_vd_zlib; |
4878 | 49 |
50 vd_functions_t* mpcodecs_vd_drivers[] = { | |
51 &mpcodecs_vd_null, | |
4884 | 52 &mpcodecs_vd_cinepak, |
4915
f6990fad0ab3
Qt RPZA decoder interface by Roberto Togni <rtogni@bresciaonline.it>
arpi
parents:
4899
diff
changeset
|
53 &mpcodecs_vd_qtrpza, |
4951 | 54 #ifdef USE_LIBAVCODEC |
55 &mpcodecs_vd_ffmpeg, | |
56 #endif | |
4968 | 57 #ifdef USE_WIN32DLL |
4958 | 58 #ifdef USE_DIRECTSHOW |
59 &mpcodecs_vd_dshow, | |
60 #endif | |
4968 | 61 &mpcodecs_vd_vfw, |
62 &mpcodecs_vd_vfwex, | |
63 #endif | |
64 #ifdef USE_DIVX | |
65 &mpcodecs_vd_odivx, | |
66 #ifdef NEW_DECORE | |
67 &mpcodecs_vd_divx4, | |
68 #endif | |
69 #endif | |
4969 | 70 &mpcodecs_vd_raw, |
5193
abea2deab4d6
MPlayer now has a Microsoft RLE decoder to call its own...only supports
melanson
parents:
5180
diff
changeset
|
71 &mpcodecs_vd_msrle, |
4987 | 72 &mpcodecs_vd_msvidc, |
73 &mpcodecs_vd_fli, | |
4989 | 74 &mpcodecs_vd_qtrle, |
75 &mpcodecs_vd_qtsmc, | |
76 &mpcodecs_vd_roqvideo, | |
77 &mpcodecs_vd_cyuv, | |
78 &mpcodecs_vd_nuv, | |
4969 | 79 #ifdef USE_XANIM |
80 &mpcodecs_vd_xanim, | |
81 #endif | |
4998 | 82 #ifdef HAVE_PNG |
83 &mpcodecs_vd_mpng, | |
84 #endif | |
5029 | 85 #ifdef HAVE_JPEG |
86 &mpcodecs_vd_ijpg, | |
87 #endif | |
4998 | 88 &mpcodecs_vd_libmpeg2, |
5235
3e04fd1074d3
added HuffYUV support, courtesy of Roberto Togni <rtogni@bresciaonline.it>
melanson
parents:
5224
diff
changeset
|
89 &mpcodecs_vd_huffyuv, |
5264 | 90 #ifdef HAVE_ZLIB |
91 &mpcodecs_vd_zlib, | |
92 #endif | |
4878 | 93 NULL |
94 }; | |
95 | |
4971 | 96 #include "libvo/video_out.h" |
5224 | 97 extern int vo_directrendering; |
4971 | 98 |
5075 | 99 // libvo opts: |
100 int fullscreen=0; | |
101 int vidmode=0; | |
102 int softzoom=0; | |
103 int flip=-1; | |
104 int opt_screen_size_x=0; | |
105 int opt_screen_size_y=0; | |
106 int screen_size_xy=0; | |
107 float movie_aspect=-1.0; | |
108 int vo_flags=0; | |
109 | |
110 static vo_tune_info_t vtune; | |
111 | |
5156
1c250c1da93c
libvo printfs added (moved from mplayer.c), mpi buffers free'd to fix multifile playback
arpi
parents:
5131
diff
changeset
|
112 static mp_image_t* static_images[2]; |
1c250c1da93c
libvo printfs added (moved from mplayer.c), mpi buffers free'd to fix multifile playback
arpi
parents:
5131
diff
changeset
|
113 static mp_image_t* temp_images[1]; |
1c250c1da93c
libvo printfs added (moved from mplayer.c), mpi buffers free'd to fix multifile playback
arpi
parents:
5131
diff
changeset
|
114 static mp_image_t* export_images[1]; |
1c250c1da93c
libvo printfs added (moved from mplayer.c), mpi buffers free'd to fix multifile playback
arpi
parents:
5131
diff
changeset
|
115 static int static_idx=0; |
1c250c1da93c
libvo printfs added (moved from mplayer.c), mpi buffers free'd to fix multifile playback
arpi
parents:
5131
diff
changeset
|
116 |
5180 | 117 extern vd_functions_t* mpvdec; // FIXME! |
118 | |
4878 | 119 int mpcodecs_config_vo(sh_video_t *sh, int w, int h, unsigned int preferred_outfmt){ |
5131
cff03e88d331
prefer outfmt with no conversion (see vo's query flags)
arpi
parents:
5077
diff
changeset
|
120 int i,j; |
5075 | 121 unsigned int out_fmt=0; |
122 int screen_size_x=0;//SCREEN_SIZE_X; | |
123 int screen_size_y=0;//SCREEN_SIZE_Y; | |
124 vo_functions_t* video_out=sh->video_out; | |
125 | |
5004 | 126 mp_msg(MSGT_DECVIDEO,MSGL_INFO,"VDec: vo config request - %d x %d, %s \n", |
127 w,h,vo_format_name(preferred_outfmt)); | |
5075 | 128 |
5077 | 129 if(!video_out) return 1; // temp hack |
130 | |
5131
cff03e88d331
prefer outfmt with no conversion (see vo's query flags)
arpi
parents:
5077
diff
changeset
|
131 // check if libvo and codec has common outfmt (no conversion): |
cff03e88d331
prefer outfmt with no conversion (see vo's query flags)
arpi
parents:
5077
diff
changeset
|
132 j=-1; |
5075 | 133 for(i=0;i<CODECS_MAX_OUTFMT;i++){ |
134 out_fmt=sh->codec->outfmt[i]; | |
135 if(out_fmt==(signed int)0xFFFFFFFF) continue; | |
136 vo_flags=video_out->control(VOCTRL_QUERY_FORMAT, &out_fmt); | |
5131
cff03e88d331
prefer outfmt with no conversion (see vo's query flags)
arpi
parents:
5077
diff
changeset
|
137 mp_msg(MSGT_CPLAYER,MSGL_DBG2,"vo_debug: query(%s) returned 0x%X (i=%d) \n",vo_format_name(out_fmt),vo_flags,i); |
5180 | 138 if((vo_flags&2) || (vo_flags && j<0)){ |
139 // check (query) if codec really support this outfmt... | |
140 if(mpvdec->control(sh,VDCTRL_QUERY_FORMAT,&out_fmt)==CONTROL_FALSE) | |
141 continue; | |
142 j=i; if(vo_flags&2) break; | |
143 } | |
5075 | 144 } |
5131
cff03e88d331
prefer outfmt with no conversion (see vo's query flags)
arpi
parents:
5077
diff
changeset
|
145 if(j<0){ |
5075 | 146 // TODO: no match - we should use conversion... |
147 mp_msg(MSGT_CPLAYER,MSGL_FATAL,MSGTR_VOincompCodec); | |
148 return 0; // failed | |
149 } | |
5131
cff03e88d331
prefer outfmt with no conversion (see vo's query flags)
arpi
parents:
5077
diff
changeset
|
150 out_fmt=sh->codec->outfmt[j]; |
cff03e88d331
prefer outfmt with no conversion (see vo's query flags)
arpi
parents:
5077
diff
changeset
|
151 sh->outfmtidx=j; |
5075 | 152 |
153 // autodetect flipping | |
154 if(flip==-1){ | |
155 flip=0; | |
5131
cff03e88d331
prefer outfmt with no conversion (see vo's query flags)
arpi
parents:
5077
diff
changeset
|
156 if(sh->codec->outflags[j]&CODECS_FLAG_FLIP) |
cff03e88d331
prefer outfmt with no conversion (see vo's query flags)
arpi
parents:
5077
diff
changeset
|
157 if(!(sh->codec->outflags[j]&CODECS_FLAG_NOFLIP)) |
5075 | 158 flip=1; |
159 } | |
160 | |
161 // time to do aspect ratio corrections... | |
162 | |
163 if(movie_aspect>-1.0) sh->aspect = movie_aspect; // cmdline overrides autodetect | |
164 // if(!sh->aspect) sh->aspect=1.0; | |
165 screen_size_x = opt_screen_size_x; | |
166 screen_size_y = opt_screen_size_y; | |
167 if(screen_size_xy||screen_size_x||screen_size_y){ | |
168 if(screen_size_xy>0){ | |
169 if(screen_size_xy<=8){ | |
170 screen_size_x=screen_size_xy*sh->disp_w; | |
171 screen_size_y=screen_size_xy*sh->disp_h; | |
172 } else { | |
173 screen_size_x=screen_size_xy; | |
174 screen_size_y=screen_size_xy*sh->disp_h/sh->disp_w; | |
175 } | |
176 } else if(!vidmode){ | |
177 if(!screen_size_x) screen_size_x=SCREEN_SIZE_X; | |
178 if(!screen_size_y) screen_size_y=SCREEN_SIZE_Y; | |
179 if(screen_size_x<=8) screen_size_x*=sh->disp_w; | |
180 if(screen_size_y<=8) screen_size_y*=sh->disp_h; | |
181 } | |
182 } else { | |
183 // check source format aspect, calculate prescale ::atmos | |
184 screen_size_x=sh->disp_w; | |
185 screen_size_y=sh->disp_h; | |
186 if(sh->aspect>0.01){ | |
187 mp_msg(MSGT_CPLAYER,MSGL_INFO,"Movie-Aspect is %.2f:1 - prescaling to correct movie aspect.\n", | |
188 sh->aspect); | |
189 screen_size_x=(int)((float)sh->disp_h*sh->aspect); | |
190 screen_size_x+=screen_size_x%2; // round | |
191 if(screen_size_x<sh->disp_w){ | |
192 screen_size_x=sh->disp_w; | |
193 screen_size_y=(int)((float)sh->disp_w*(1.0/sh->aspect)); | |
194 screen_size_y+=screen_size_y%2; // round | |
195 } | |
196 } else { | |
197 mp_msg(MSGT_CPLAYER,MSGL_INFO,"Movie-Aspect is undefined - no prescaling applied.\n"); | |
198 } | |
199 } | |
200 | |
5172 | 201 if(video_out->get_info) |
5156
1c250c1da93c
libvo printfs added (moved from mplayer.c), mpi buffers free'd to fix multifile playback
arpi
parents:
5131
diff
changeset
|
202 { const vo_info_t *info = video_out->get_info(); |
1c250c1da93c
libvo printfs added (moved from mplayer.c), mpi buffers free'd to fix multifile playback
arpi
parents:
5131
diff
changeset
|
203 mp_msg(MSGT_CPLAYER,MSGL_INFO,"VO: [%s] %dx%d => %dx%d %s %s%s%s%s\n",info->short_name, |
1c250c1da93c
libvo printfs added (moved from mplayer.c), mpi buffers free'd to fix multifile playback
arpi
parents:
5131
diff
changeset
|
204 sh->disp_w,sh->disp_h, |
1c250c1da93c
libvo printfs added (moved from mplayer.c), mpi buffers free'd to fix multifile playback
arpi
parents:
5131
diff
changeset
|
205 screen_size_x,screen_size_y, |
1c250c1da93c
libvo printfs added (moved from mplayer.c), mpi buffers free'd to fix multifile playback
arpi
parents:
5131
diff
changeset
|
206 vo_format_name(out_fmt), |
1c250c1da93c
libvo printfs added (moved from mplayer.c), mpi buffers free'd to fix multifile playback
arpi
parents:
5131
diff
changeset
|
207 fullscreen?"fs ":"", |
1c250c1da93c
libvo printfs added (moved from mplayer.c), mpi buffers free'd to fix multifile playback
arpi
parents:
5131
diff
changeset
|
208 vidmode?"vm ":"", |
1c250c1da93c
libvo printfs added (moved from mplayer.c), mpi buffers free'd to fix multifile playback
arpi
parents:
5131
diff
changeset
|
209 softzoom?"zoom ":"", |
1c250c1da93c
libvo printfs added (moved from mplayer.c), mpi buffers free'd to fix multifile playback
arpi
parents:
5131
diff
changeset
|
210 (flip==1)?"flip ":""); |
1c250c1da93c
libvo printfs added (moved from mplayer.c), mpi buffers free'd to fix multifile playback
arpi
parents:
5131
diff
changeset
|
211 mp_msg(MSGT_CPLAYER,MSGL_V,"VO: Description: %s\n",info->name); |
1c250c1da93c
libvo printfs added (moved from mplayer.c), mpi buffers free'd to fix multifile playback
arpi
parents:
5131
diff
changeset
|
212 mp_msg(MSGT_CPLAYER,MSGL_V,"VO: Author: %s\n", info->author); |
1c250c1da93c
libvo printfs added (moved from mplayer.c), mpi buffers free'd to fix multifile playback
arpi
parents:
5131
diff
changeset
|
213 if(info->comment && strlen(info->comment) > 0) |
1c250c1da93c
libvo printfs added (moved from mplayer.c), mpi buffers free'd to fix multifile playback
arpi
parents:
5131
diff
changeset
|
214 mp_msg(MSGT_CPLAYER,MSGL_V,"VO: Comment: %s\n", info->comment); |
1c250c1da93c
libvo printfs added (moved from mplayer.c), mpi buffers free'd to fix multifile playback
arpi
parents:
5131
diff
changeset
|
215 } |
1c250c1da93c
libvo printfs added (moved from mplayer.c), mpi buffers free'd to fix multifile playback
arpi
parents:
5131
diff
changeset
|
216 |
5075 | 217 // Time to config libvo! |
218 mp_msg(MSGT_CPLAYER,MSGL_V,"video_out->init(%dx%d->%dx%d,flags=%d,'%s',0x%X)\n", | |
219 sh->disp_w,sh->disp_h, | |
220 screen_size_x,screen_size_y, | |
221 fullscreen|(vidmode<<1)|(softzoom<<2)|(flip<<3), | |
222 "MPlayer",out_fmt); | |
223 | |
5077 | 224 memset(&vtune,0,sizeof(vo_tune_info_t)); |
5075 | 225 if(video_out->config(sh->disp_w,sh->disp_h, |
226 screen_size_x,screen_size_y, | |
227 fullscreen|(vidmode<<1)|(softzoom<<2)|(flip<<3), | |
228 "MPlayer",out_fmt,&vtune)){ | |
229 mp_msg(MSGT_CPLAYER,MSGL_FATAL,MSGTR_CannotInitVO); | |
230 return 0; // exit_player(MSGTR_Exit_error); | |
231 } | |
232 | |
5156
1c250c1da93c
libvo printfs added (moved from mplayer.c), mpi buffers free'd to fix multifile playback
arpi
parents:
5131
diff
changeset
|
233 #define FREE_MPI(mpi) if(mpi){if(mpi->flags&MP_IMGFLAG_ALLOCATED) free(mpi->planes[0]); free(mpi); mpi=NULL;} |
1c250c1da93c
libvo printfs added (moved from mplayer.c), mpi buffers free'd to fix multifile playback
arpi
parents:
5131
diff
changeset
|
234 FREE_MPI(static_images[0]) |
1c250c1da93c
libvo printfs added (moved from mplayer.c), mpi buffers free'd to fix multifile playback
arpi
parents:
5131
diff
changeset
|
235 FREE_MPI(static_images[1]) |
1c250c1da93c
libvo printfs added (moved from mplayer.c), mpi buffers free'd to fix multifile playback
arpi
parents:
5131
diff
changeset
|
236 FREE_MPI(temp_images[0]) |
1c250c1da93c
libvo printfs added (moved from mplayer.c), mpi buffers free'd to fix multifile playback
arpi
parents:
5131
diff
changeset
|
237 FREE_MPI(export_images[0]) |
1c250c1da93c
libvo printfs added (moved from mplayer.c), mpi buffers free'd to fix multifile playback
arpi
parents:
5131
diff
changeset
|
238 #undef FREE_MPI |
4878 | 239 return 1; |
240 } | |
241 | |
242 // mp_imgtype: buffering type, see mp_image.h | |
243 // mp_imgflag: buffer requirements (read/write, preserve, stride limits), see mp_image.h | |
244 // returns NULL or allocated mp_image_t* | |
245 // Note: buffer allocation may be moved to mpcodecs_config_vo() later... | |
246 mp_image_t* mpcodecs_get_image(sh_video_t *sh, int mp_imgtype, int mp_imgflag, int w, int h){ | |
247 mp_image_t* mpi=NULL; | |
5315 | 248 int w2=w; //(mp_imgflag&MP_IMGFLAG_ACCEPT_STRIDE)?((w+15)&(~15)):w; |
4878 | 249 // Note: we should call libvo first to check if it supports direct rendering |
250 // and if not, then fallback to software buffers: | |
251 switch(mp_imgtype){ | |
252 case MP_IMGTYPE_EXPORT: | |
4951 | 253 // mpi=new_mp_image(w,h); |
4968 | 254 if(!export_images[0]) export_images[0]=new_mp_image(w2,h); |
4951 | 255 mpi=export_images[0]; |
4878 | 256 break; |
257 case MP_IMGTYPE_STATIC: | |
4968 | 258 if(!static_images[0]) static_images[0]=new_mp_image(w2,h); |
4878 | 259 mpi=static_images[0]; |
260 break; | |
261 case MP_IMGTYPE_TEMP: | |
4968 | 262 if(!temp_images[0]) temp_images[0]=new_mp_image(w2,h); |
4878 | 263 mpi=temp_images[0]; |
264 break; | |
265 case MP_IMGTYPE_IPB: | |
266 if(!(mp_imgflag&MP_IMGFLAG_READABLE)){ // B frame: | |
4968 | 267 if(!temp_images[0]) temp_images[0]=new_mp_image(w2,h); |
4878 | 268 mpi=temp_images[0]; |
269 break; | |
270 } | |
271 case MP_IMGTYPE_IP: | |
4968 | 272 if(!static_images[static_idx]) static_images[static_idx]=new_mp_image(w2,h); |
4878 | 273 mpi=static_images[static_idx]; |
274 static_idx^=1; | |
275 break; | |
276 } | |
277 if(mpi){ | |
278 mpi->type=mp_imgtype; | |
4971 | 279 mpi->flags&=~(MP_IMGFLAG_PRESERVE|MP_IMGFLAG_READABLE|MP_IMGFLAG_DIRECT); |
280 mpi->flags|=mp_imgflag&(MP_IMGFLAG_PRESERVE|MP_IMGFLAG_READABLE|MP_IMGFLAG_ACCEPT_STRIDE|MP_IMGFLAG_ACCEPT_WIDTH|MP_IMGFLAG_ALIGNED_STRIDE|MP_IMGFLAG_DRAW_CALLBACK); | |
4968 | 281 if((mpi->width!=w2 || mpi->height!=h) && !(mpi->flags&MP_IMGFLAG_DIRECT)){ |
282 mpi->width=w2; | |
4951 | 283 mpi->height=h; |
284 if(mpi->flags&MP_IMGFLAG_ALLOCATED){ | |
285 // need to re-allocate buffer memory: | |
286 free(mpi->planes[0]); | |
287 mpi->flags&=~MP_IMGFLAG_ALLOCATED; | |
288 } | |
289 } | |
4971 | 290 if(!mpi->bpp) mp_image_setfmt(mpi,sh->codec->outfmt[sh->outfmtidx]); |
291 if(!(mpi->flags&MP_IMGFLAG_ALLOCATED) && mpi->type>MP_IMGTYPE_EXPORT){ | |
292 | |
293 // check libvo first! | |
294 vo_functions_t* vo=sh->video_out; | |
5224 | 295 if(vo && vo_directrendering) vo->control(VOCTRL_GET_IMAGE,mpi); |
4971 | 296 |
297 if(!(mpi->flags&MP_IMGFLAG_DIRECT)){ | |
4878 | 298 // non-direct and not yet allocaed image. allocate it! |
299 mpi->planes[0]=memalign(64, mpi->bpp*mpi->width*mpi->height/8); | |
300 if(mpi->flags&MP_IMGFLAG_PLANAR){ | |
301 // YV12/I420. feel free to add other planar formats here... | |
4899
c84d841ef43b
fixed stride for packed formats, more detailed printf at image allocation
arpi
parents:
4885
diff
changeset
|
302 if(!mpi->stride[0]) mpi->stride[0]=mpi->width; |
4878 | 303 if(!mpi->stride[1]) mpi->stride[1]=mpi->stride[2]=mpi->width/2; |
5315 | 304 if(mpi->flags&MP_IMGFLAG_SWAPPED){ |
305 // I420/IYUV (Y,U,V) | |
306 mpi->planes[1]=mpi->planes[0]+mpi->width*mpi->height; | |
307 mpi->planes[2]=mpi->planes[1]+(mpi->width>>1)*(mpi->height>>1); | |
308 } else { | |
309 // YV12,YVU9 (Y,V,U) | |
310 mpi->planes[2]=mpi->planes[0]+mpi->width*mpi->height; | |
311 mpi->planes[1]=mpi->planes[2]+(mpi->width>>1)*(mpi->height>>1); | |
312 } | |
4899
c84d841ef43b
fixed stride for packed formats, more detailed printf at image allocation
arpi
parents:
4885
diff
changeset
|
313 } else { |
c84d841ef43b
fixed stride for packed formats, more detailed printf at image allocation
arpi
parents:
4885
diff
changeset
|
314 if(!mpi->stride[0]) mpi->stride[0]=mpi->width*mpi->bpp/8; |
4878 | 315 } |
316 mpi->flags|=MP_IMGFLAG_ALLOCATED; | |
4971 | 317 } |
318 if(!(mpi->flags&MP_IMGFLAG_TYPE_DISPLAYED)){ | |
319 mp_msg(MSGT_DECVIDEO,MSGL_INFO,"*** %s mp_image_t, %dx%dx%dbpp %s %s, %d bytes\n", | |
320 (mpi->flags&MP_IMGFLAG_DIRECT)?"Direct Rendering":"Allocating", | |
321 mpi->width,mpi->height,mpi->bpp, | |
322 (mpi->flags&MP_IMGFLAG_YUV)?"YUV":"RGB", | |
323 (mpi->flags&MP_IMGFLAG_PLANAR)?"planar":"packed", | |
324 mpi->bpp*mpi->width*mpi->height/8); | |
325 mpi->flags|=MP_IMGFLAG_TYPE_DISPLAYED; | |
326 } | |
327 | |
4878 | 328 } |
329 } | |
330 return mpi; | |
331 } | |
332 |