[FFmpeg-cvslog] huffyuvenc: support alphaless rgb32
Michael Niedermayer
git at videolan.org
Mon Nov 28 04:30:01 CET 2011
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Mon Nov 28 03:44:47 2011 +0100| [d3fc335bac6a5d911a83e69be7b707540e54de13] | committer: Michael Niedermayer
huffyuvenc: support alphaless rgb32
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d3fc335bac6a5d911a83e69be7b707540e54de13
---
libavcodec/huffyuv.c | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/libavcodec/huffyuv.c b/libavcodec/huffyuv.c
index 18e8c78..0bcc35e 100644
--- a/libavcodec/huffyuv.c
+++ b/libavcodec/huffyuv.c
@@ -600,6 +600,9 @@ static av_cold int encode_init(AVCodecContext *avctx)
case PIX_FMT_RGB32:
s->bitstream_bpp= 32;
break;
+ case PIX_FMT_0RGB32:
+ s->bitstream_bpp= 24;
+ break;
default:
av_log(avctx, AV_LOG_ERROR, "format not supported\n");
return -1;
@@ -1369,7 +1372,7 @@ static int encode_frame(AVCodecContext *avctx, unsigned char *buf, int buf_size,
encode_422_bitstream(s, 0, width);
}
}
- }else if(avctx->pix_fmt == PIX_FMT_RGB32){
+ }else if(avctx->pix_fmt == PIX_FMT_RGB32 || avctx->pix_fmt == PIX_FMT_0RGB32){
uint8_t *data = p->data[0] + (height-1)*p->linesize[0];
const int stride = -p->linesize[0];
const int fake_stride = -fake_ystride;
@@ -1482,7 +1485,7 @@ AVCodec ff_huffyuv_encoder = {
.init = encode_init,
.encode = encode_frame,
.close = encode_end,
- .pix_fmts= (const enum PixelFormat[]){PIX_FMT_YUV422P, PIX_FMT_RGB32, PIX_FMT_NONE},
+ .pix_fmts= (const enum PixelFormat[]){PIX_FMT_YUV422P, PIX_FMT_0RGB32, PIX_FMT_RGB32, PIX_FMT_NONE},
.long_name = NULL_IF_CONFIG_SMALL("Huffyuv / HuffYUV"),
};
#endif
@@ -1496,7 +1499,7 @@ AVCodec ff_ffvhuff_encoder = {
.init = encode_init,
.encode = encode_frame,
.close = encode_end,
- .pix_fmts= (const enum PixelFormat[]){PIX_FMT_YUV420P, PIX_FMT_YUV422P, PIX_FMT_RGB32, PIX_FMT_NONE},
+ .pix_fmts= (const enum PixelFormat[]){PIX_FMT_YUV420P, PIX_FMT_YUV422P, PIX_FMT_0RGB32, PIX_FMT_RGB32, PIX_FMT_NONE},
.long_name = NULL_IF_CONFIG_SMALL("Huffyuv FFmpeg variant"),
};
#endif
More information about the ffmpeg-cvslog
mailing list