aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/mjpegenc.c
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2012-11-07 21:44:27 +0000
committerPaul B Mahol <onemda@gmail.com>2012-11-18 17:46:45 +0000
commit9f02d4ed0f72c017dba6fb71d5997c632aa52c08 (patch)
treed1a50870657b24c632b654496b550f044bccf1da /libavcodec/mjpegenc.c
parent158763312f97dd1cf635114c52c550800eda83d2 (diff)
downloadffmpeg-9f02d4ed0f72c017dba6fb71d5997c632aa52c08.tar.gz
mjpegenc: yuvj444p support
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Diffstat (limited to 'libavcodec/mjpegenc.c')
-rw-r--r--libavcodec/mjpegenc.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/libavcodec/mjpegenc.c b/libavcodec/mjpegenc.c
index 1d7741b4ea..381f0fb626 100644
--- a/libavcodec/mjpegenc.c
+++ b/libavcodec/mjpegenc.c
@@ -463,10 +463,18 @@ void ff_mjpeg_encode_mb(MpegEncContext *s, DCTELEM block[6][64])
}
if (s->chroma_format == CHROMA_420) {
encode_block(s, block[5], 5);
+ } else if (s->chroma_format == CHROMA_422) {
+ encode_block(s, block[6], 6);
+ encode_block(s, block[5], 5);
+ encode_block(s, block[7], 7);
} else {
encode_block(s, block[6], 6);
+ encode_block(s, block[8], 8);
+ encode_block(s, block[10], 10);
encode_block(s, block[5], 5);
encode_block(s, block[7], 7);
+ encode_block(s, block[9], 9);
+ encode_block(s, block[11], 11);
}
s->i_tex_bits += get_bits_diff(s);
@@ -505,7 +513,7 @@ AVCodec ff_mjpeg_encoder = {
.close = ff_MPV_encode_end,
.capabilities = CODEC_CAP_SLICE_THREADS | CODEC_CAP_FRAME_THREADS | CODEC_CAP_INTRA_ONLY,
.pix_fmts = (const enum AVPixelFormat[]){
- AV_PIX_FMT_YUVJ420P, AV_PIX_FMT_YUVJ422P, AV_PIX_FMT_NONE
+ AV_PIX_FMT_YUVJ420P, AV_PIX_FMT_YUVJ422P, AV_PIX_FMT_YUVJ444P, AV_PIX_FMT_NONE
},
.long_name = NULL_IF_CONFIG_SMALL("MJPEG (Motion JPEG)"),
};