libavcodec/zmbvenc: add support for 24-bit encoding, using pix_fmt BGR24.

Support is #ifdef'd out at this stage, using ZMBV_ENABLE_24BPP (like in
the zmbv.c decoder)
This commit is contained in:
Matthew Fearnley 2019-03-26 22:13:06 +00:00 committed by Tomas Härdin
parent 1046e88088
commit b97a7dd031
1 changed files with 9 additions and 0 deletions

View File

@ -340,6 +340,12 @@ static av_cold int encode_init(AVCodecContext *avctx)
c->fmt = ZMBV_FMT_16BPP; c->fmt = ZMBV_FMT_16BPP;
c->bypp = 2; c->bypp = 2;
break; break;
#ifdef ZMBV_ENABLE_24BPP
case AV_PIX_FMT_BGR24:
c->fmt = ZMBV_FMT_24BPP;
c->bypp = 3;
break;
#endif //ZMBV_ENABLE_24BPP
case AV_PIX_FMT_BGR0: case AV_PIX_FMT_BGR0:
c->fmt = ZMBV_FMT_32BPP; c->fmt = ZMBV_FMT_32BPP;
c->bypp = 4; c->bypp = 4;
@ -434,6 +440,9 @@ AVCodec ff_zmbv_encoder = {
.pix_fmts = (const enum AVPixelFormat[]) { AV_PIX_FMT_PAL8, .pix_fmts = (const enum AVPixelFormat[]) { AV_PIX_FMT_PAL8,
AV_PIX_FMT_RGB555LE, AV_PIX_FMT_RGB555LE,
AV_PIX_FMT_RGB565LE, AV_PIX_FMT_RGB565LE,
#ifdef ZMBV_ENABLE_24BPP
AV_PIX_FMT_BGR24,
#endif //ZMBV_ENABLE_24BPP
AV_PIX_FMT_BGR0, AV_PIX_FMT_BGR0,
AV_PIX_FMT_NONE }, AV_PIX_FMT_NONE },
}; };