diff options
author | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2010-11-03 16:42:24 +0000 |
---|---|---|
committer | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2010-11-08 18:03:35 +0200 |
commit | fd3d5aa9c692a57cb18debd2cad0d13f912739d7 (patch) | |
tree | f52c00420a4e0576fafe406027e1c347310e4abe /libmpcodecs | |
parent | 98a6088a2028ace0693adbdc0ee419e896bee277 (diff) | |
download | mpv-fd3d5aa9c692a57cb18debd2cad0d13f912739d7.tar.bz2 mpv-fd3d5aa9c692a57cb18debd2cad0d13f912739d7.tar.xz |
vf_scale: accept all non-hw-accel formats we know a PIX_FMT for
Make scale filter accept all non-hardware-acceleration input formats
we know a PIX_FMT_* for.
It is possible we will not have a conversion for some of these formats,
but since it will just fail differently this approach is better since
it avoids having to expand the explicit list continuously.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32576 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpcodecs')
-rw-r--r-- | libmpcodecs/vf_scale.c | 36 |
1 files changed, 1 insertions, 35 deletions
diff --git a/libmpcodecs/vf_scale.c b/libmpcodecs/vf_scale.c index 7579e98ace..a8d7456aba 100644 --- a/libmpcodecs/vf_scale.c +++ b/libmpcodecs/vf_scale.c @@ -509,40 +509,7 @@ static int control(struct vf_instance *vf, int request, void* data){ // supported Input formats: YV12, I420, IYUV, YUY2, UYVY, BGR32, BGR24, BGR16, BGR15, RGB32, RGB24, Y8, Y800 static int query_format(struct vf_instance *vf, unsigned int fmt){ - switch(fmt){ - case IMGFMT_YV12: - case IMGFMT_I420: - case IMGFMT_IYUV: - case IMGFMT_UYVY: - case IMGFMT_YUY2: - case IMGFMT_BGR32: - case IMGFMT_BGR24: - case IMGFMT_BGR16: - case IMGFMT_BGR15: - case IMGFMT_RGB32: - case IMGFMT_RGB24: - case IMGFMT_Y800: - case IMGFMT_Y8: - case IMGFMT_YVU9: - case IMGFMT_IF09: - case IMGFMT_444P: - case IMGFMT_422P: - case IMGFMT_411P: - case IMGFMT_440P: - case IMGFMT_420A: - case IMGFMT_444P16_LE: - case IMGFMT_444P16_BE: - case IMGFMT_422P16_LE: - case IMGFMT_422P16_BE: - case IMGFMT_420P16_LE: - case IMGFMT_420P16_BE: - case IMGFMT_BGR8: - case IMGFMT_RGB8: - case IMGFMT_BG4B: - case IMGFMT_RG4B: - case IMGFMT_RGB48LE: - case IMGFMT_RGB48BE: - { + if (!IMGFMT_IS_HWACCEL(fmt) && imgfmt2pixfmt(fmt) != PIX_FMT_NONE) { unsigned int best=find_best_out(vf, fmt); int flags; if(!best) return 0; // no matching out-fmt @@ -552,7 +519,6 @@ static int query_format(struct vf_instance *vf, unsigned int fmt){ // do not allow scaling, if we are before the PP fliter! if(!(flags&VFCAP_POSTPROC)) flags|=VFCAP_SWSCALE; return flags; - } } return 0; // nomatching in-fmt } |