summaryrefslogtreecommitdiffstats
path: root/libmpcodecs
diff options
context:
space:
mode:
authormichael <michael@b3059339-0415-0410-9bf9-f77b7e298cf2>2003-01-05 19:10:42 +0000
committermichael <michael@b3059339-0415-0410-9bf9-f77b7e298cf2>2003-01-05 19:10:42 +0000
commitafe814841c5d86714b7fd9026bb209c6a54a21c4 (patch)
treefcaecbf45dfee486fe496e8029e83908569c80cd /libmpcodecs
parentb0a644a306560d440ef26a4943901f764dc27e84 (diff)
downloadmpv-afe814841c5d86714b7fd9026bb209c6a54a21c4.tar.bz2
mpv-afe814841c5d86714b7fd9026bb209c6a54a21c4.tar.xz
YUV 411/422/444 support for pp
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@8806 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpcodecs')
-rw-r--r--libmpcodecs/vf_pp.c24
1 files changed, 19 insertions, 5 deletions
diff --git a/libmpcodecs/vf_pp.c b/libmpcodecs/vf_pp.c
index 16888e0221..b404a47129 100644
--- a/libmpcodecs/vf_pp.c
+++ b/libmpcodecs/vf_pp.c
@@ -37,12 +37,20 @@ struct vf_priv_s {
static int config(struct vf_instance_s* vf,
int width, int height, int d_width, int d_height,
unsigned int voflags, unsigned int outfmt){
- if(vf->priv->context) pp_free_context(vf->priv->context);
- vf->priv->context= pp_get_context(width, height,
+ int flags=
(gCpuCaps.hasMMX ? PP_CPU_CAPS_MMX : 0)
| (gCpuCaps.hasMMX2 ? PP_CPU_CAPS_MMX2 : 0)
- | (gCpuCaps.has3DNow ? PP_CPU_CAPS_3DNOW : 0)
- );
+ | (gCpuCaps.has3DNow ? PP_CPU_CAPS_3DNOW : 0);
+
+ 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;
+ }
+
+ if(vf->priv->context) pp_free_context(vf->priv->context);
+ vf->priv->context= pp_get_context(width, height, flags);
return vf_next_config(vf,width,height,d_width,d_height,voflags,vf->priv->outfmt);
}
@@ -61,7 +69,10 @@ static int query_format(struct vf_instance_s* vf, unsigned int fmt){
case IMGFMT_YV12:
case IMGFMT_I420:
case IMGFMT_IYUV:
- return vf_next_query_format(vf,vf->priv->outfmt);
+ case IMGFMT_444P:
+ case IMGFMT_422P:
+ case IMGFMT_411P:
+ return vf_next_query_format(vf,fmt);
}
return 0;
}
@@ -129,6 +140,9 @@ static unsigned int fmt_list[]={
IMGFMT_YV12,
IMGFMT_I420,
IMGFMT_IYUV,
+ IMGFMT_444P,
+ IMGFMT_422P,
+ IMGFMT_411P,
0
};