[FFmpeg-cvslog] avcodec/huffyuv: support gbrp9/10/12/14
Michael Niedermayer
git at videolan.org
Mon Jan 27 02:22:56 CET 2014
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Mon Jan 27 02:05:13 2014 +0100| [6369766f015f930ea0fc86a2d425fe7fc4f95ed9] | committer: Michael Niedermayer
avcodec/huffyuv: support gbrp9/10/12/14
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=6369766f015f930ea0fc86a2d425fe7fc4f95ed9
---
libavcodec/huffyuvdec.c | 15 +++++++++++++++
libavcodec/huffyuvenc.c | 8 +++++++-
2 files changed, 22 insertions(+), 1 deletion(-)
diff --git a/libavcodec/huffyuvdec.c b/libavcodec/huffyuvdec.c
index 47c6a13..7a1579f 100644
--- a/libavcodec/huffyuvdec.c
+++ b/libavcodec/huffyuvdec.c
@@ -389,6 +389,21 @@ static av_cold int decode_init(AVCodecContext *avctx)
case 0x470:
avctx->pix_fmt = AV_PIX_FMT_GBRP;
break;
+ case 0x480:
+ avctx->pix_fmt = AV_PIX_FMT_GBRP9;
+ break;
+ case 0x490:
+ avctx->pix_fmt = AV_PIX_FMT_GBRP10;
+ break;
+ case 0x4B0:
+ avctx->pix_fmt = AV_PIX_FMT_GBRP12;
+ break;
+ case 0x4D0:
+ avctx->pix_fmt = AV_PIX_FMT_GBRP14;
+ break;
+ case 0x4F0:
+ avctx->pix_fmt = AV_PIX_FMT_GBRP16;
+ break;
case 0x570:
avctx->pix_fmt = AV_PIX_FMT_GBRAP;
break;
diff --git a/libavcodec/huffyuvenc.c b/libavcodec/huffyuvenc.c
index 08edeac..fd7aa38 100644
--- a/libavcodec/huffyuvenc.c
+++ b/libavcodec/huffyuvenc.c
@@ -254,6 +254,11 @@ static av_cold int encode_init(AVCodecContext *avctx)
case AV_PIX_FMT_YUV411P:
case AV_PIX_FMT_YUV440P:
case AV_PIX_FMT_GBRP:
+ case AV_PIX_FMT_GBRP9:
+ case AV_PIX_FMT_GBRP10:
+ case AV_PIX_FMT_GBRP12:
+ case AV_PIX_FMT_GBRP14:
+ case AV_PIX_FMT_GBRP16:
case AV_PIX_FMT_GRAY8:
case AV_PIX_FMT_GRAY16:
case AV_PIX_FMT_YUVA444P:
@@ -301,7 +306,7 @@ static av_cold int encode_init(AVCodecContext *avctx)
s->vlc_n = FFMIN(s->n, MAX_VLC_N);
avctx->bits_per_coded_sample = s->bitstream_bpp;
- s->decorrelate = s->bitstream_bpp >= 24 && !s->yuv && avctx->pix_fmt != AV_PIX_FMT_GBRP;
+ s->decorrelate = s->bitstream_bpp >= 24 && !s->yuv && !(desc->flags & AV_PIX_FMT_FLAG_PLANAR);
s->predictor = avctx->prediction_method;
s->interlaced = avctx->flags&CODEC_FLAG_INTERLACED_ME ? 1 : 0;
if (avctx->context_model == 1) {
@@ -1012,6 +1017,7 @@ AVCodec ff_ffvhuff_encoder = {
AV_PIX_FMT_YUV420P, AV_PIX_FMT_YUV422P, AV_PIX_FMT_YUV444P, AV_PIX_FMT_YUV411P,
AV_PIX_FMT_YUV410P, AV_PIX_FMT_YUV440P,
AV_PIX_FMT_GBRP,
+ AV_PIX_FMT_GBRP9, AV_PIX_FMT_GBRP10, AV_PIX_FMT_GBRP12, AV_PIX_FMT_GBRP14,
AV_PIX_FMT_GRAY8, AV_PIX_FMT_GRAY16,
AV_PIX_FMT_YUVA420P, AV_PIX_FMT_YUVA422P, AV_PIX_FMT_YUVA444P,
AV_PIX_FMT_GBRAP,
More information about the ffmpeg-cvslog
mailing list