[FFmpeg-devel] [PATCH 3/5] lavfi/mp/pp: use pp_get_context2().
Clément Bœsch
ubitux at gmail.com
Sat Nov 17 13:07:11 CET 2012
---
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);
}
--
1.8.0
More information about the ffmpeg-devel
mailing list