diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-12-06 04:31:10 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-12-06 05:01:07 +0100 |
commit | 4a0d8277d5f6fbc2eeac5e40c5cef55316839cfc (patch) | |
tree | 6059b8c6bb0fa7704542aa32ff1ada9d0447c763 /libavcodec/mjpegenc.c | |
parent | b22c16daafdf314a102b7f9d3810246cb45c2363 (diff) | |
parent | ff506c75b71d7aaa1062b49043e0b881b1e263e9 (diff) | |
download | ffmpeg-4a0d8277d5f6fbc2eeac5e40c5cef55316839cfc.tar.gz |
Merge commit 'ff506c75b71d7aaa1062b49043e0b881b1e263e9'
* commit 'ff506c75b71d7aaa1062b49043e0b881b1e263e9':
mjpegenc: do not pass MpegEncContext to put_huffman_table()
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/mjpegenc.c')
-rw-r--r-- | libavcodec/mjpegenc.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/libavcodec/mjpegenc.c b/libavcodec/mjpegenc.c index 7cfbe049b8..380bb1b4da 100644 --- a/libavcodec/mjpegenc.c +++ b/libavcodec/mjpegenc.c @@ -84,10 +84,9 @@ void ff_mjpeg_encode_close(MpegEncContext *s) } /* table_class: 0 = DC coef, 1 = AC coefs */ -static int put_huffman_table(MpegEncContext *s, int table_class, int table_id, +static int put_huffman_table(PutBitContext *p, int table_class, int table_id, const uint8_t *bits_table, const uint8_t *value_table) { - PutBitContext *p = &s->pb; int n, i; put_bits(p, 4, table_class); @@ -147,14 +146,14 @@ static void jpeg_table_header(MpegEncContext *s) ptr = put_bits_ptr(p); put_bits(p, 16, 0); /* patched later */ size = 2; - size += put_huffman_table(s, 0, 0, avpriv_mjpeg_bits_dc_luminance, + size += put_huffman_table(p, 0, 0, avpriv_mjpeg_bits_dc_luminance, avpriv_mjpeg_val_dc); - size += put_huffman_table(s, 0, 1, avpriv_mjpeg_bits_dc_chrominance, + size += put_huffman_table(p, 0, 1, avpriv_mjpeg_bits_dc_chrominance, avpriv_mjpeg_val_dc); - size += put_huffman_table(s, 1, 0, avpriv_mjpeg_bits_ac_luminance, + size += put_huffman_table(p, 1, 0, avpriv_mjpeg_bits_ac_luminance, avpriv_mjpeg_val_ac_luminance); - size += put_huffman_table(s, 1, 1, avpriv_mjpeg_bits_ac_chrominance, + size += put_huffman_table(p, 1, 1, avpriv_mjpeg_bits_ac_chrominance, avpriv_mjpeg_val_ac_chrominance); AV_WB16(ptr, size); } |