48 for (i = 0; i < 128; i++) {
53 for (run = 0; run < 64; run++) {
55 int alevel =
FFABS(level);
57 len = (run >> 4) * huff_size_ac[0xf0];
60 code = ((15&
run) << 4) | nbits;
62 len += huff_size_ac[code] + nbits;
122 int mant, nbits, code, i, j;
123 int component,
dc,
run, last_index,
val;
126 uint16_t *huff_code_ac;
129 component = (n <= 3 ? 0 : (n&1) + 1);
131 val = dc - s->
last_dc[component];
147 for(i=1;i<=last_index;i++) {
154 put_bits(&s->
pb, huff_size_ac[0xf0], huff_code_ac[0xf0]);
164 code = (run << 4) | nbits;
166 put_bits(&s->
pb, huff_size_ac[code], huff_code_ac[code]);
174 if (last_index < 63 || run != 0)
175 put_bits(&s->
pb, huff_size_ac[0], huff_code_ac[0]);
216 const AVFrame *pic_arg,
int *got_packet)
222 int chroma_h_shift, chroma_v_shift;
232 "Heights which are not a multiple of 16 might fail with some decoders, "
233 "use vstrict=-1 / -strict -1 to use %d anyway.\n", avctx->
height);
234 av_log(avctx,
AV_LOG_WARNING,
"If you have a device that plays AMV videos, please test if videos "
235 "with such heights work with it and report your findings to ffmpeg-devel@ffmpeg.org\n");
243 for(i=0; i < 3; i++) {
244 int vsample = i ? 2 >> chroma_v_shift : 2;
253 #if CONFIG_MJPEG_ENCODER
269 .priv_class = &mjpeg_class,
272 #if CONFIG_AMV_ENCODER
287 .priv_class = &amv_class,