Mercurial > mplayer.hg
changeset 8117:dda027d5a845
libavcodec sync (no LIBAVCODEC_BUILD change; no backwards compatibility)
author | rik |
---|---|
date | Wed, 06 Nov 2002 15:19:45 +0000 |
parents | 3757669b825b |
children | 434a4fce25c1 |
files | libvo/jpeg_enc.c |
diffstat | 1 files changed, 13 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- a/libvo/jpeg_enc.c Tue Nov 05 23:28:52 2002 +0000 +++ b/libvo/jpeg_enc.c Wed Nov 06 15:19:45 2002 +0000 @@ -130,7 +130,7 @@ int mant, nbits; if (val == 0) { - jput_bits(&s->pb, huff_size[0], huff_code[0]); + put_bits(&s->pb, huff_size[0], huff_code[0]); } else { mant = val; if (val < 0) { @@ -145,9 +145,9 @@ nbits++; } - jput_bits(&s->pb, huff_size[nbits], huff_code[nbits]); + put_bits(&s->pb, huff_size[nbits], huff_code[nbits]); - jput_bits(&s->pb, nbits, mant & ((1 << nbits) - 1)); + put_bits(&s->pb, nbits, mant & ((1 << nbits) - 1)); } } @@ -185,7 +185,7 @@ run++; } else { while (run >= 16) { - jput_bits(&s->pb, huff_size_ac[0xf0], huff_code_ac[0xf0]); + put_bits(&s->pb, huff_size_ac[0xf0], huff_code_ac[0xf0]); run -= 16; } mant = val; @@ -202,16 +202,16 @@ } code = (run << 4) | nbits; - jput_bits(&s->pb, huff_size_ac[code], huff_code_ac[code]); + put_bits(&s->pb, huff_size_ac[code], huff_code_ac[code]); - jput_bits(&s->pb, nbits, mant & ((1 << nbits) - 1)); + put_bits(&s->pb, nbits, mant & ((1 << nbits) - 1)); run = 0; } } /* output EOB only if not already 64 values */ if (last_index < 63 || run != 0) - jput_bits(&s->pb, huff_size_ac[0], huff_code_ac[0]); + put_bits(&s->pb, huff_size_ac[0], huff_code_ac[0]); } static inline void clip_coeffs(MpegEncContext *s, DCTELEM *block, int last_index) @@ -244,14 +244,14 @@ encode_block(j->s, j->s->block[1], 1); if (j->bw) { /* U */ - jput_bits(&j->s->pb, m->huff_size_dc_chrominance[0], + put_bits(&j->s->pb, m->huff_size_dc_chrominance[0], m->huff_code_dc_chrominance[0]); - jput_bits(&j->s->pb, m->huff_size_ac_chrominance[0], + put_bits(&j->s->pb, m->huff_size_ac_chrominance[0], m->huff_code_ac_chrominance[0]); /* V */ - jput_bits(&j->s->pb, m->huff_size_dc_chrominance[0], + put_bits(&j->s->pb, m->huff_size_dc_chrominance[0], m->huff_code_dc_chrominance[0]); - jput_bits(&j->s->pb, m->huff_size_ac_chrominance[0], + put_bits(&j->s->pb, m->huff_size_ac_chrominance[0], m->huff_code_ac_chrominance[0]); } else { /* we trick encode_block here so that it uses @@ -382,6 +382,8 @@ mjpeg_picture_header(j->s); + j->s->header_bits = get_bit_count(&j->s->pb); + j->s->last_dc[0] = 128; j->s->last_dc[1] = 128; j->s->last_dc[2] = 128;