[FFmpeg-devel] [PATCH 3/5] lavfi/mp/pp: use pp_get_context2().
Clément Bœsch
ubitux at gmail.com
Sun Nov 18 16:46:52 CET 2012
On Sat, Nov 17, 2012 at 01:07:11PM +0100, Clément Bœsch wrote:
> ---
> libavfilter/libmpcodecs/vf_pp.c | 15 ++++++---------
> 1 file changed, 6 insertions(+), 9 deletions(-)
>
> diff --git a/libavfilter/libmpcodecs/vf_pp.c b/libavfilter/libmpcodecs/vf_pp.c
> index 78cce1f..f8f53de 100644
> --- a/libavfilter/libmpcodecs/vf_pp.c
> +++ b/libavfilter/libmpcodecs/vf_pp.c
> @@ -54,20 +54,17 @@ struct vf_priv_s {
> static int config(struct vf_instance *vf,
> int width, int height, int d_width, int d_height,
> unsigned int voflags, unsigned int outfmt){
> - int flags=
> - (gCpuCaps.hasMMX ? PP_CPU_CAPS_MMX : 0)
> - | (gCpuCaps.hasMMX2 ? PP_CPU_CAPS_MMX2 : 0)
> - | (gCpuCaps.has3DNow ? PP_CPU_CAPS_3DNOW : 0);
> + int pixfmt;
>
> switch(outfmt){
> - case IMGFMT_444P: flags|= PP_FORMAT_444; break;
> - case IMGFMT_422P: flags|= PP_FORMAT_422; break;
> - case IMGFMT_411P: flags|= PP_FORMAT_411; break;
> - default: flags|= PP_FORMAT_420; break;
> + case IMGFMT_444P: pixfmt = AV_PIX_FMT_YUV444P; break;
> + case IMGFMT_422P: pixfmt = AV_PIX_FMT_YUV422P; break;
> + case IMGFMT_411P: pixfmt = AV_PIX_FMT_YUV411P; break;
> + default: pixfmt = AV_PIX_FMT_YUV420P; break;
> }
>
> if(vf->priv->context) pp_free_context(vf->priv->context);
> - vf->priv->context= pp_get_context(width, height, flags);
> + vf->priv->context= pp_get_context2(width, height, pixfmt);
>
> return vf_next_config(vf,width,height,d_width,d_height,voflags,outfmt);
Replaced with a flags = PP_CPU_CAPS_AUTO, and pushed.
--
Clément B.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 490 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20121118/01e8a69a/attachment.asc>
More information about the ffmpeg-devel
mailing list