avcodec/huffyuv: add GRAY8 support
authorMichael Niedermayer <michaelni@gmx.at>
Mon, 6 Jan 2014 18:47:34 +0000 (19:47 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Mon, 6 Jan 2014 19:00:25 +0000 (20:00 +0100)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/huffyuvdec.c
libavcodec/huffyuvenc.c

index 383b0f0..b37c457 100644 (file)
@@ -364,6 +364,9 @@ static av_cold int decode_init(AVCodecContext *avctx)
                                          &s->chroma_v_shift);
     } else {
         switch ( (s->chroma<<10) | (s->yuv<<9) | (s->alpha<<8) | ((s->bps-1)<<4) | s->chroma_h_shift | (s->chroma_v_shift<<2)) {
+        case 0x070:
+            avctx->pix_fmt = AV_PIX_FMT_GRAY8;
+            break;
         case 0x470:
             avctx->pix_fmt = AV_PIX_FMT_GBRP;
             break;
index d8827cf..4684896 100644 (file)
@@ -187,6 +187,7 @@ 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_GRAY8:
         s->version = 3;
         break;
     case AV_PIX_FMT_RGB32:
@@ -858,6 +859,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_GRAY8,
         AV_PIX_FMT_RGB24,
         AV_PIX_FMT_RGB32, AV_PIX_FMT_NONE
     },