comparison mpeg12.c @ 9033:bcf716c58be4 libavcodec

add ff_find_hwaccel() by Gwenole Beauchesne
author michael
date Tue, 24 Feb 2009 19:04:43 +0000
parents 90c99bda19f5
children 8e5fe9e56b93
comparison
equal deleted inserted replaced
9032:caee3bed2145 9033:bcf716c58be4
1300 ff_mpeg2_aspect[s->aspect_ratio_info]; 1300 ff_mpeg2_aspect[s->aspect_ratio_info];
1301 } 1301 }
1302 }//MPEG-2 1302 }//MPEG-2
1303 1303
1304 avctx->pix_fmt = mpeg_get_pixelformat(avctx); 1304 avctx->pix_fmt = mpeg_get_pixelformat(avctx);
1305 avctx->hwaccel = ff_find_hwaccel(avctx->codec->id, avctx->pix_fmt);
1305 //until then pix_fmt may be changed right after codec init 1306 //until then pix_fmt may be changed right after codec init
1306 if( avctx->pix_fmt == PIX_FMT_XVMC_MPEG2_IDCT || 1307 if( avctx->pix_fmt == PIX_FMT_XVMC_MPEG2_IDCT ||
1307 avctx->hwaccel || 1308 avctx->hwaccel ||
1308 s->avctx->codec->capabilities&CODEC_CAP_HWACCEL_VDPAU ) 1309 s->avctx->codec->capabilities&CODEC_CAP_HWACCEL_VDPAU )
1309 if( avctx->idct_algo == FF_IDCT_AUTO ) 1310 if( avctx->idct_algo == FF_IDCT_AUTO )
2069 s->height = avctx->coded_height; 2070 s->height = avctx->coded_height;
2070 avctx->has_b_frames= 0; //true? 2071 avctx->has_b_frames= 0; //true?
2071 s->low_delay= 1; 2072 s->low_delay= 1;
2072 2073
2073 avctx->pix_fmt = mpeg_get_pixelformat(avctx); 2074 avctx->pix_fmt = mpeg_get_pixelformat(avctx);
2075 avctx->hwaccel = ff_find_hwaccel(avctx->codec->id, avctx->pix_fmt);
2074 2076
2075 if( avctx->pix_fmt == PIX_FMT_XVMC_MPEG2_IDCT || 2077 if( avctx->pix_fmt == PIX_FMT_XVMC_MPEG2_IDCT ||
2076 s->avctx->codec->capabilities&CODEC_CAP_HWACCEL_VDPAU ) 2078 s->avctx->codec->capabilities&CODEC_CAP_HWACCEL_VDPAU )
2077 if( avctx->idct_algo == FF_IDCT_AUTO ) 2079 if( avctx->idct_algo == FF_IDCT_AUTO )
2078 avctx->idct_algo = FF_IDCT_SIMPLE; 2080 avctx->idct_algo = FF_IDCT_SIMPLE;