diff options
author | Carl Eugen Hoyos | 2012-02-09 23:26:28 +0100 |
---|---|---|
committer | Carl Eugen Hoyos | 2012-02-09 23:26:28 +0100 |
commit | 52719dae8a45cec2eb2851b1c14da978e8885e94 (patch) | |
tree | 7f56dffb2af561ccd7322da11e0efe618a2db72b /libavcodec/mpegvideo_enc.c | |
parent | edf34c346ec9d5d1a790db4b500113bf8d5fac07 (diff) |
Support encoding BGR24 and BGR0 in ljpeg.
Diffstat (limited to 'libavcodec/mpegvideo_enc.c')
-rw-r--r-- | libavcodec/mpegvideo_enc.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c index 4eaad5d819..a3ec5c18a1 100644 --- a/libavcodec/mpegvideo_enc.c +++ b/libavcodec/mpegvideo_enc.c @@ -295,7 +295,9 @@ av_cold int MPV_encode_init(AVCodecContext *avctx) if (avctx->pix_fmt != PIX_FMT_YUVJ420P && avctx->pix_fmt != PIX_FMT_YUVJ422P && avctx->pix_fmt != PIX_FMT_YUVJ444P && + avctx->pix_fmt != PIX_FMT_BGR0 && avctx->pix_fmt != PIX_FMT_BGRA && + avctx->pix_fmt != PIX_FMT_BGR24 && ((avctx->pix_fmt != PIX_FMT_YUV420P && avctx->pix_fmt != PIX_FMT_YUV422P && avctx->pix_fmt != PIX_FMT_YUV444P) || @@ -625,7 +627,10 @@ av_cold int MPV_encode_init(AVCodecContext *avctx) case CODEC_ID_AMV: s->out_format = FMT_MJPEG; s->intra_only = 1; /* force intra only for jpeg */ - if (avctx->codec->id == CODEC_ID_LJPEG && avctx->pix_fmt == PIX_FMT_BGRA) { + if (avctx->codec->id == CODEC_ID_LJPEG && + (avctx->pix_fmt == PIX_FMT_BGR0 + || s->avctx->pix_fmt == PIX_FMT_BGRA + || s->avctx->pix_fmt == PIX_FMT_BGR24)) { s->mjpeg_vsample[0] = s->mjpeg_hsample[0] = s->mjpeg_vsample[1] = s->mjpeg_hsample[1] = s->mjpeg_vsample[2] = s->mjpeg_hsample[2] = 1; |