Skip to content
Snippets Groups Projects
Commit f57665b3 authored by Michael Niedermayer's avatar Michael Niedermayer
Browse files

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: default avatarMichael Niedermayer <michael@niedermayer.cc>
parent b39129b6
No related branches found
No related tags found
No related merge requests found
......@@ -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]
......
......@@ -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 */
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment