diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2017-02-10 01:07:11 +0300 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2017-02-10 02:12:01 +0300 |
commit | f57665b3181d5cbed680754983d9a6fdc1bfec5f (patch) | |
tree | 7db85726067447ecea4ab3127c148c01101cfce7 | |
parent | b39129b68e7774c5061aa02e600218b3e91d8761 (diff) |
avcodec/mjpegenc: Revert some differences in ff_mjpeg_encode_mb() relative to pre optimal huffman
The changes are not needed anymore and the return code was never used
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r-- | libavcodec/mjpegenc.c | 10 | ||||
-rw-r--r-- | libavcodec/mjpegenc.h | 2 |
2 files changed, 4 insertions, 8 deletions
diff --git a/libavcodec/mjpegenc.c b/libavcodec/mjpegenc.c index db2bc34fd5..550338fd66 100644 --- a/libavcodec/mjpegenc.c +++ b/libavcodec/mjpegenc.c @@ -267,10 +267,9 @@ static void encode_block(MpegEncContext *s, int16_t *block, int n) ff_mjpeg_encode_code(m, table_id, 0); } -int ff_mjpeg_encode_mb(MpegEncContext *s, int16_t block[12][64]) +void ff_mjpeg_encode_mb(MpegEncContext *s, int16_t block[12][64]) { - int i, is_chroma_420; - + int i; if (s->chroma_format == CHROMA_444) { encode_block(s, block[0], 0); encode_block(s, block[2], 2); @@ -288,11 +287,10 @@ int ff_mjpeg_encode_mb(MpegEncContext *s, int16_t block[12][64]) encode_block(s, block[11], 11); } } else { - is_chroma_420 = (s->chroma_format == CHROMA_420); for(i=0;i<5;i++) { encode_block(s, block[i], i); } - if (is_chroma_420) { + if (s->chroma_format == CHROMA_420) { encode_block(s, block[5], 5); } else { encode_block(s, block[6], 6); @@ -300,8 +298,6 @@ int ff_mjpeg_encode_mb(MpegEncContext *s, int16_t block[12][64]) encode_block(s, block[7], 7); } } - - return 0; } // maximum over s->mjpeg_vsample[i] diff --git a/libavcodec/mjpegenc.h b/libavcodec/mjpegenc.h index 271325cd97..3dd1ba65ca 100644 --- a/libavcodec/mjpegenc.h +++ b/libavcodec/mjpegenc.h @@ -107,6 +107,6 @@ static inline void put_marker(PutBitContext *p, enum JpegMarker code) int ff_mjpeg_encode_init(MpegEncContext *s); void ff_mjpeg_encode_picture_frame(MpegEncContext *s); void ff_mjpeg_encode_close(MpegEncContext *s); -int ff_mjpeg_encode_mb(MpegEncContext *s, int16_t block[12][64]); +void ff_mjpeg_encode_mb(MpegEncContext *s, int16_t block[12][64]); #endif /* AVCODEC_MJPEGENC_H */ |