diff options
author | rogerdpack <rogerpack2005@gmail.com> | 2013-01-15 19:09:15 -0700 |
---|---|---|
committer | rogerdpack <rogerpack2005@gmail.com> | 2013-01-15 19:09:15 -0700 |
commit | c540312ac3b58e0bbd751844fc2c47c6e3713cf5 (patch) | |
tree | fcf92b1c0f1772b379828125c2555a47d1c81c6b /libavfilter/libmpcodecs/mp_image.c | |
parent | 47e88486b4b3b3de992b07f89dfaedf410a8bd5e (diff) | |
parent | 2b20397e1fbe52db800ef5deb810f7bc2602f248 (diff) | |
download | ffmpeg-c540312ac3b58e0bbd751844fc2c47c6e3713cf5.tar.gz |
Merge remote-tracking branch 'origin/master' into combined
Diffstat (limited to 'libavfilter/libmpcodecs/mp_image.c')
-rw-r--r-- | libavfilter/libmpcodecs/mp_image.c | 52 |
1 files changed, 49 insertions, 3 deletions
diff --git a/libavfilter/libmpcodecs/mp_image.c b/libavfilter/libmpcodecs/mp_image.c index 1ef5cbd55b..33d5c07730 100644 --- a/libavfilter/libmpcodecs/mp_image.c +++ b/libavfilter/libmpcodecs/mp_image.c @@ -121,11 +121,24 @@ void ff_mp_image_setfmt(mp_image_t* mpi,unsigned int out_fmt){ mpi->flags|=MP_IMGFLAG_SWAPPED; return; } - mpi->flags|=MP_IMGFLAG_YUV; mpi->num_planes=3; - if (ff_mp_get_chroma_shift(out_fmt, NULL, NULL)) { + if (out_fmt == IMGFMT_GBR24P) { + mpi->bpp=24; + mpi->flags|=MP_IMGFLAG_PLANAR; + return; + } else if (out_fmt == IMGFMT_GBR12P) { + mpi->bpp=36; + mpi->flags|=MP_IMGFLAG_PLANAR; + return; + } else if (out_fmt == IMGFMT_GBR14P) { + mpi->bpp=42; + mpi->flags|=MP_IMGFLAG_PLANAR; + return; + } + mpi->flags|=MP_IMGFLAG_YUV; + if (ff_mp_get_chroma_shift(out_fmt, NULL, NULL, NULL)) { mpi->flags|=MP_IMGFLAG_PLANAR; - mpi->bpp = ff_mp_get_chroma_shift(out_fmt, &mpi->chroma_x_shift, &mpi->chroma_y_shift); + mpi->bpp = ff_mp_get_chroma_shift(out_fmt, &mpi->chroma_x_shift, &mpi->chroma_y_shift, NULL); mpi->chroma_width = mpi->width >> mpi->chroma_x_shift; mpi->chroma_height = mpi->height >> mpi->chroma_y_shift; } @@ -136,6 +149,8 @@ void ff_mp_image_setfmt(mp_image_t* mpi,unsigned int out_fmt){ case IMGFMT_YV12: return; case IMGFMT_420A: + case IMGFMT_422A: + case IMGFMT_444A: case IMGFMT_IF09: mpi->num_planes=4; case IMGFMT_YVU9: @@ -145,20 +160,51 @@ void ff_mp_image_setfmt(mp_image_t* mpi,unsigned int out_fmt){ case IMGFMT_440P: case IMGFMT_444P16_LE: case IMGFMT_444P16_BE: + case IMGFMT_444P14_LE: + case IMGFMT_444P14_BE: + case IMGFMT_444P12_LE: + case IMGFMT_444P12_BE: + case IMGFMT_444P10_LE: + case IMGFMT_444P10_BE: + case IMGFMT_444P9_LE: + case IMGFMT_444P9_BE: case IMGFMT_422P16_LE: case IMGFMT_422P16_BE: + case IMGFMT_422P14_LE: + case IMGFMT_422P14_BE: + case IMGFMT_422P12_LE: + case IMGFMT_422P12_BE: + case IMGFMT_422P10_LE: + case IMGFMT_422P10_BE: + case IMGFMT_422P9_LE: + case IMGFMT_422P9_BE: case IMGFMT_420P16_LE: case IMGFMT_420P16_BE: + case IMGFMT_420P14_LE: + case IMGFMT_420P14_BE: + case IMGFMT_420P12_LE: + case IMGFMT_420P12_BE: + case IMGFMT_420P10_LE: + case IMGFMT_420P10_BE: + case IMGFMT_420P9_LE: + case IMGFMT_420P9_BE: return; + case IMGFMT_Y16_LE: + case IMGFMT_Y16_BE: + mpi->bpp=16; case IMGFMT_Y800: case IMGFMT_Y8: /* they're planar ones, but for easier handling use them as packed */ mpi->flags&=~MP_IMGFLAG_PLANAR; mpi->num_planes=1; return; + case IMGFMT_Y8A: + mpi->num_planes=2; + return; case IMGFMT_UYVY: mpi->flags|=MP_IMGFLAG_SWAPPED; case IMGFMT_YUY2: + mpi->chroma_x_shift = 1; mpi->bpp=16; mpi->num_planes=1; return; |