59 #define DNXHD_VLC_BITS 9
60 #define DNXHD_DC_VLC_BITS 7
80 if (cid != ctx->
cid) {
115 static const uint8_t header_prefix[] = { 0x00, 0x00, 0x02, 0x80, 0x01 };
118 if (buf_size < 0x280)
121 if (memcmp(buf, header_prefix, 5)) {
137 if (buf[0x21] & 0x40) {
199 int i, j, index1, index2,
len,
flags;
209 component = 1 + (n&1);
224 level = (
NEG_USR32(sign ^ level, len) ^ sign) - sign;
227 block[0] = ctx->
last_dc[component];
235 while (index1 != eob_index) {
236 level = ac_level[index1];
237 flags = ac_flags[index1];
261 if (level_bias < 32 || weight_matrix[i] != level_bias)
263 level >>= level_shift;
265 block[j] = (level^sign) - sign;
292 uint8_t *dest_y, *dest_u, *dest_v;
293 int dct_y_offset, dct_x_offset;
300 for (i = 0; i < 64; i++) {
307 for (i = 0; i < 8; i++) {
313 dct_linesize_luma <<= 1;
314 dct_linesize_chroma <<= 1;
317 dest_y = ctx->
picture.
data[0] + ((y * dct_linesize_luma) << 4) + (x << (4 +
shift1));
318 dest_u = ctx->
picture.
data[1] + ((y * dct_linesize_chroma) << 4) + (x << (3 +
shift1));
319 dest_v = ctx->
picture.
data[2] + ((y * dct_linesize_chroma) << 4) + (x << (3 +
shift1));
327 dct_y_offset = dct_linesize_luma << 3;
328 dct_x_offset = 8 <<
shift1;
332 ctx->
dsp.
idct_put(dest_y + dct_y_offset + dct_x_offset, dct_linesize_luma, ctx->
blocks[5]);
335 dct_y_offset = dct_linesize_chroma << 3;
353 for (x = 0; x < ctx->
mb_width; x++) {
366 int buf_size = avpkt->
size;
372 av_dlog(avctx,
"frame size %d\n", buf_size);
404 goto decode_coding_unit;