diff options
author | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2009-12-31 23:45:07 +0000 |
---|---|---|
committer | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2009-12-31 23:45:07 +0000 |
commit | 8afc25d710d8520b454d48b7744dde4812feef74 (patch) | |
tree | 3b7365285e20391fcadd382ce7dcf346d5be733f /libmpcodecs/img_format.c | |
parent | c07dec1a4a6e6e0695f3893c60a42e9a14daefaf (diff) | |
download | mpv-8afc25d710d8520b454d48b7744dde4812feef74.tar.bz2 mpv-8afc25d710d8520b454d48b7744dde4812feef74.tar.xz |
Add support for YUV format with alpha and fix the codecs.conf entry for vp6a
to use it.
Fixes playback of samples in http://samples.mplayerhq.hu/FLV/flash_with_alpha/
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30157 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpcodecs/img_format.c')
-rw-r--r-- | libmpcodecs/img_format.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libmpcodecs/img_format.c b/libmpcodecs/img_format.c index d29f47fb1c..cc7bee10b8 100644 --- a/libmpcodecs/img_format.c +++ b/libmpcodecs/img_format.c @@ -43,6 +43,7 @@ const char *vo_format_name(int format) case IMGFMT_422P16_BE: return "Planar 422P 16-bit big-endian"; case IMGFMT_444P16_LE: return "Planar 444P 16-bit little-endian"; case IMGFMT_444P16_BE: return "Planar 444P 16-bit big-endian"; + case IMGFMT_420A: return "Planar 420P with alpha"; case IMGFMT_444P: return "Planar 444P"; case IMGFMT_422P: return "Planar 422P"; case IMGFMT_411P: return "Planar 411P"; @@ -96,6 +97,7 @@ int mp_get_chroma_shift(int format, int *x_shift, int *y_shift) case IMGFMT_420P16_LE: case IMGFMT_420P16_BE: bpp_factor = 2; + case IMGFMT_420A: case IMGFMT_I420: case IMGFMT_IYUV: case IMGFMT_YV12: @@ -136,6 +138,8 @@ int mp_get_chroma_shift(int format, int *x_shift, int *y_shift) if (x_shift) *x_shift = xs; if (y_shift) *y_shift = ys; bpp = 8 + (16 >> (xs + ys)); + if (format == IMGFMT_420A) + bpp += 8; bpp *= bpp_factor; return err ? 0 : bpp; } |