Mercurial > mplayer.hg
comparison libmpcodecs/vd_ffmpeg.c @ 7388:2c35b856cf73
extended par support
author | alex |
---|---|
date | Fri, 13 Sep 2002 20:45:58 +0000 |
parents | e805ef05536c |
children | 56a16bd12b79 |
comparison
equal
deleted
inserted
replaced
7387:072a85aa31c6 | 7388:2c35b856cf73 |
---|---|
15 | 15 |
16 static vd_info_t info = { | 16 static vd_info_t info = { |
17 "FFmpeg's libavcodec codec family", | 17 "FFmpeg's libavcodec codec family", |
18 "ffmpeg", | 18 "ffmpeg", |
19 "A'rpi", | 19 "A'rpi", |
20 "http://ffmpeg.sf.net", | 20 "A'rpi, Michael, Alex", |
21 "native codecs" | 21 "native codecs (http://ffmpeg.sf.net/)" |
22 }; | 22 }; |
23 | 23 |
24 LIBVD_EXTERN(ffmpeg) | 24 LIBVD_EXTERN(ffmpeg) |
25 | 25 |
26 #include "../postproc/rgb2rgb.h" | 26 #include "../postproc/rgb2rgb.h" |
271 if (avctx->aspect_ratio_info != ctx->last_aspect || | 271 if (avctx->aspect_ratio_info != ctx->last_aspect || |
272 avctx->width != sh->disp_w || | 272 avctx->width != sh->disp_w || |
273 avctx->height != sh->disp_h || | 273 avctx->height != sh->disp_h || |
274 !ctx->vo_inited) | 274 !ctx->vo_inited) |
275 { | 275 { |
276 #if LIBAVCODEC_BUILD >= 4623 | |
277 mp_dbg(MSGT_DECVIDEO, MSGL_DBG2, "aspect_ratio_info: %d\n", avctx->aspect_ratio_info); | |
278 mp_dbg(MSGT_DECVIDEO, MSGL_DBG2, "par_width: %f\n", (float)avctx->aspected_width); | |
279 mp_dbg(MSGT_DECVIDEO, MSGL_DBG2, "par_height: %f\n", (float)avctx->aspected_height); | |
280 #endif | |
276 ctx->last_aspect = avctx->aspect_ratio_info; | 281 ctx->last_aspect = avctx->aspect_ratio_info; |
277 switch(avctx->aspect_ratio_info) | 282 switch(avctx->aspect_ratio_info) |
278 { | 283 { |
279 case FF_ASPECT_4_3_625: | 284 case FF_ASPECT_4_3_625: |
280 case FF_ASPECT_4_3_525: | 285 case FF_ASPECT_4_3_525: |
285 sh->aspect = 16.0/9.0; | 290 sh->aspect = 16.0/9.0; |
286 break; | 291 break; |
287 case FF_ASPECT_SQUARE: | 292 case FF_ASPECT_SQUARE: |
288 sh->aspect = 0.0; | 293 sh->aspect = 0.0; |
289 break; | 294 break; |
295 #if LIBAVCODEC_BUILD >= 4623 | |
296 case FF_ASPECT_EXTENDED: | |
297 if (avctx->aspected_width && avctx->aspected_height) | |
298 sh->aspect = (float)avctx->aspected_width/(float)avctx->aspected_height; | |
299 break; | |
300 #endif | |
290 } | 301 } |
291 sh->disp_w = avctx->width; | 302 sh->disp_w = avctx->width; |
292 sh->disp_h = avctx->height; | 303 sh->disp_h = avctx->height; |
293 ctx->vo_inited=1; | 304 ctx->vo_inited=1; |
294 switch(avctx->pix_fmt){ | 305 switch(avctx->pix_fmt){ |