Mercurial > mplayer.hg
changeset 34157:ab178e06077e
Support planar GBR24 decoding.
author | cehoyos |
---|---|
date | Sun, 23 Oct 2011 20:40:31 +0000 |
parents | 758264af214d |
children | 562cd6805eac |
files | codec-cfg.c etc/codecs.conf fmt-conversion.c libmpcodecs/img_format.c libmpcodecs/img_format.h libmpcodecs/mp_image.c libmpcodecs/vf_scale.c m_option.c |
diffstat | 8 files changed, 14 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/codec-cfg.c Sun Oct 23 12:14:45 2011 +0000 +++ b/codec-cfg.c Sun Oct 23 20:40:31 2011 +0000 @@ -212,6 +212,7 @@ {"BGR32", IMGFMT_BGR32}, {"RGB1", IMGFMT_RGB1}, {"BGR1", IMGFMT_BGR1}, + {"GBR24P", IMGFMT_GBR24P}, {"MPES", IMGFMT_MPEGPES}, {"ZRMJPEGNI", IMGFMT_ZRMJPEGNI},
--- a/etc/codecs.conf Sun Oct 23 12:14:45 2011 +0000 +++ b/etc/codecs.conf Sun Oct 23 20:40:31 2011 +0000 @@ -1115,6 +1115,7 @@ out YV12,I420,IYUV,420P10,420P9 out 422P,422P10 out 444P,444P10 + out GBR24P videocodec ffh264vdpau info "FFmpeg H.264 (VDPAU)"
--- a/fmt-conversion.c Sun Oct 23 12:14:45 2011 +0000 +++ b/fmt-conversion.c Sun Oct 23 20:40:31 2011 +0000 @@ -57,6 +57,7 @@ {IMGFMT_RGB8, PIX_FMT_BGR8}, {IMGFMT_RGB4, PIX_FMT_BGR4}, {IMGFMT_BGR8, PIX_FMT_PAL8}, + {IMGFMT_GBR24P, PIX_FMT_GBR24P}, {IMGFMT_YUY2, PIX_FMT_YUYV422}, {IMGFMT_UYVY, PIX_FMT_UYVY422}, {IMGFMT_NV12, PIX_FMT_NV12},
--- a/libmpcodecs/img_format.c Sun Oct 23 12:14:45 2011 +0000 +++ b/libmpcodecs/img_format.c Sun Oct 23 20:40:31 2011 +0000 @@ -50,6 +50,7 @@ case IMGFMT_BGRA: return "BGRA"; case IMGFMT_ARGB: return "ARGB"; case IMGFMT_RGBA: return "RGBA"; + case IMGFMT_GBR24P: return "Planar GBR 24-bit"; case IMGFMT_YVU9: return "Planar YVU9"; case IMGFMT_IF09: return "Planar IF09"; case IMGFMT_YV12: return "Planar YV12";
--- a/libmpcodecs/img_format.h Sun Oct 23 12:14:45 2011 +0000 +++ b/libmpcodecs/img_format.h Sun Oct 23 20:40:31 2011 +0000 @@ -49,6 +49,8 @@ #define IMGFMT_BGR24 (IMGFMT_BGR|24) #define IMGFMT_BGR32 (IMGFMT_BGR|32) +#define IMGFMT_GBR24P (('G'<<24)|('B'<<16)|('R'<<8)|24) + #if HAVE_BIGENDIAN #define IMGFMT_ABGR IMGFMT_RGB32 #define IMGFMT_BGRA (IMGFMT_RGB32|64)
--- a/libmpcodecs/mp_image.c Sun Oct 23 12:14:45 2011 +0000 +++ b/libmpcodecs/mp_image.c Sun Oct 23 20:40:31 2011 +0000 @@ -121,8 +121,13 @@ mpi->flags|=MP_IMGFLAG_SWAPPED; return; } + mpi->num_planes=3; + if (out_fmt == IMGFMT_GBR24P) { + mpi->bpp=24; + mpi->flags|=MP_IMGFLAG_PLANAR; + return; + } mpi->flags|=MP_IMGFLAG_YUV; - mpi->num_planes=3; if (mp_get_chroma_shift(out_fmt, NULL, NULL, NULL)) { mpi->flags|=MP_IMGFLAG_PLANAR; mpi->bpp = mp_get_chroma_shift(out_fmt, &mpi->chroma_x_shift, &mpi->chroma_y_shift, NULL);