86 int mant, nbits, code, i, j;
87 int component,
dc,
run, last_index,
val;
90 uint16_t *huff_code_ac;
93 component = (n <= 3 ? 0 : (n&1) + 1);
95 val = dc - s->
last_dc[component];
111 for(i=1;i<=last_index;i++) {
118 put_bits(&s->
pb, huff_size_ac[0xf0], huff_code_ac[0xf0]);
128 code = (run << 4) | nbits;
130 put_bits(&s->
pb, huff_size_ac[code], huff_code_ac[code]);
138 if (last_index < 63 || run != 0)
139 put_bits(&s->
pb, huff_size_ac[0], huff_code_ac[0]);
180 const AVFrame *pic_arg,
int *got_packet)
186 int chroma_h_shift, chroma_v_shift;
196 "Heights which are not a multiple of 16 might fail with some decoders, "
197 "use vstrict=-1 / -strict -1 to use %d anyway.\n", avctx->
height);
198 av_log(avctx,
AV_LOG_WARNING,
"If you have a device that plays AMV videos, please test if videos "
199 "with such heights work with it and report your findings to ffmpeg-devel@ffmpeg.org\n");
207 for(i=0; i < 3; i++) {
208 int vsample = i ? 2 >> chroma_v_shift : 2;
217 #if CONFIG_MJPEG_ENCODER
233 #if CONFIG_AMV_ENCODER