Lines Matching defs:blocks

224     DECLARE_ALIGNED(16, int16_t, blocks)[MAX_PLANES][64 * 4 * MAX_MBS_PER_SLICE];
233 DECLARE_ALIGNED(16, int16_t, blocks)[MAX_PLANES][64 * 4 * MAX_MBS_PER_SLICE];
276 int16_t *blocks, uint16_t *emu_buf,
286 memset(blocks, 0, 64 * (mbs_per_slice - i) * blocks_per_mb
287 * sizeof(*blocks));
316 ctx->fdct(&ctx->fdsp, esrc, elinesize, blocks);
317 blocks += 64;
319 ctx->fdct(&ctx->fdsp, esrc + 8, elinesize, blocks);
320 blocks += 64;
322 ctx->fdct(&ctx->fdsp, esrc + elinesize * 4, elinesize, blocks);
323 blocks += 64;
325 ctx->fdct(&ctx->fdsp, esrc + elinesize * 4 + 8, elinesize, blocks);
326 blocks += 64;
329 ctx->fdct(&ctx->fdsp, esrc, elinesize, blocks);
330 blocks += 64;
331 ctx->fdct(&ctx->fdsp, esrc + elinesize * 4, elinesize, blocks);
332 blocks += 64;
334 ctx->fdct(&ctx->fdsp, esrc + 8, elinesize, blocks);
335 blocks += 64;
336 ctx->fdct(&ctx->fdsp, esrc + elinesize * 4 + 8, elinesize, blocks);
337 blocks += 64;
347 int16_t *blocks, int mbs_per_slice, int abits)
355 memcpy(blocks, src, copy_w * sizeof(*src));
358 blocks[j] >>= 2;
361 blocks[j] = (blocks[j] << 6) | (blocks[j] >> 4);
363 blocks[j] = blocks[copy_w - 1];
364 blocks += slice_width;
368 memcpy(blocks, blocks - slice_width, slice_width * sizeof(*blocks));
369 blocks += slice_width;
408 static void encode_dcs(PutBitContext *pb, int16_t *blocks,
414 prev_dc = (blocks[0] - 0x4000) / scale;
418 blocks += 64;
420 for (i = 1; i < blocks_per_slice; i++, blocks += 64) {
421 dc = (blocks[0] - 0x4000) / scale;
434 static void encode_acs(PutBitContext *pb, int16_t *blocks,
450 level = blocks[idx] / qmat[scan[i]];
470 int mbs_per_slice, int16_t *blocks,
476 encode_dcs(pb, blocks, blocks_per_slice, qmat[0]);
477 encode_acs(pb, blocks, blocks_per_slice, plane_size_factor,
515 int mbs_per_slice, uint16_t *blocks,
525 cur = blocks[idx++];
529 cur = blocks[idx++];
603 ctx->blocks[0], ctx->emu_buf,
607 mbs_per_slice, ctx->blocks[0],
611 mbs_per_slice, ctx->blocks[0],
617 ctx->blocks[0], mbs_per_slice, ctx->alpha_bits);
618 encode_alpha_plane(ctx, pb, mbs_per_slice, ctx->blocks[0], quant);
649 static int estimate_dcs(int *error, int16_t *blocks, int blocks_per_slice,
656 prev_dc = (blocks[0] - 0x4000) / scale;
660 blocks += 64;
661 *error += FFABS(blocks[0] - 0x4000) % scale;
663 for (i = 1; i < blocks_per_slice; i++, blocks += 64) {
664 dc = (blocks[0] - 0x4000) / scale;
665 *error += FFABS(blocks[0] - 0x4000) % scale;
680 static int estimate_acs(int *error, int16_t *blocks, int blocks_per_slice,
696 level = blocks[idx] / qmat[scan[i]];
697 *error += FFABS(blocks[idx]) % qmat[scan[i]];
727 bits = estimate_dcs(error, td->blocks[plane], blocks_per_slice, qmat[0]);
728 bits += estimate_acs(error, td->blocks[plane], blocks_per_slice,
751 int mbs_per_slice, int16_t *blocks)
761 cur = blocks[idx++];
765 cur = blocks[idx++];
842 td->blocks[i], td->emu_buf,
847 td->blocks[i], mbs_per_slice, ctx->alpha_bits);
858 mbs_per_slice, td->blocks[3]);