Lines Matching refs:plane

291     DECLARE_ALIGNED(16, int16_t, qmat)[3][2][3][64];     ///< qmat[qpi][is_inter][plane]
388 int sb_x, sb_y, plane;
391 for (plane = 0; plane < 3; plane++) {
392 int sb_width = plane ? s->c_superblock_width
394 int sb_height = plane ? s->c_superblock_height
396 int frag_width = s->fragment_width[!!plane];
397 int frag_height = s->fragment_height[!!plane];
406 s->superblock_fragments[j++] = s->fragment_start[plane] +
423 int i, plane, inter, qri, bmi, bmj, qistart;
426 for (plane = 0; plane < 3; plane++) {
427 int dc_scale_factor = s->coded_dc_scale_factor[!!plane][s->qps[qpi]];
429 for (qri = 0; qri < s->qr_count[inter][plane]; qri++) {
430 sum += s->qr_size[inter][plane][qri];
434 qistart = sum - s->qr_size[inter][plane][qri];
435 bmi = s->qr_base[inter][plane][qri];
436 bmj = s->qr_base[inter][plane][qri + 1];
440 s->qr_size[inter][plane][qri]) /
441 (2 * s->qr_size[inter][plane][qri]);
446 s->qmat[qpi][inter][plane][s->idct_permutation[i]] =
452 s->qmat[qpi][inter][plane][0] = s->qmat[0][inter][plane][0];
484 int plane;
575 for (plane = 0; plane < 3; plane++) {
576 int sb_start = superblock_starts[plane];
577 int sb_end = sb_start + (plane ? s->c_superblock_count
582 if (s->num_kf_coded_fragment[plane] == -1) {
589 s->coded_fragment_list[plane][num_coded_frags++] =
594 s->num_kf_coded_fragment[plane] = num_coded_frags;
596 num_coded_frags = s->num_kf_coded_fragment[plane];
624 s->coded_fragment_list[plane][num_coded_frags++] =
635 if (!plane)
639 s->num_coded_frags[plane][i] = num_coded_frags;
640 if (plane < 2)
641 s->coded_fragment_list[plane + 1] = s->coded_fragment_list[plane] +
700 int plane, i, j, k, fragment;
743 for (plane = 0; plane < 3; plane++) {
745 int sb_width = plane ? s->c_superblock_width : s->y_superblock_width;
746 int sb_height = plane ? s->c_superblock_height : s->y_superblock_height;
747 int mb_width = plane ? s->c_macroblock_width : s->macroblock_width;
748 int mb_height = plane ? s->c_macroblock_height : s->macroblock_height;
749 int fragment_width = s->fragment_width[!!plane];
750 int fragment_height = s->fragment_height[!!plane];
774 fragment = s->fragment_start[plane] + BLOCK_Y * fragment_width + BLOCK_X;
1174 * data. This function unpacks all the VLCs for either the Y plane or both
1185 int plane,
1194 int num_coeffs = s->num_coded_frags[plane][coeff_index];
1195 int16_t *dct_tokens = s->dct_tokens[plane][coeff_index];
1198 int *coded_fragment_list = s->coded_fragment_list[plane];
1231 // record only the number of blocks ended in this plane,
1232 // any spill will be recorded in the next plane.
1270 s->num_coded_frags[plane][i]--;
1278 if (blocks_ended > s->num_coded_frags[plane][coeff_index])
1285 s->num_coded_frags[plane][i] -= blocks_ended;
1288 if (plane < 2)
1289 s->dct_tokens[plane + 1][coeff_index] = dct_tokens + j;
1324 /* unpack the Y plane DC coefficients */
1332 /* reverse prediction of the Y-plane DC coefficients */
1335 /* unpack the C plane DC coefficients */
1345 /* reverse prediction of the C-plane DC coefficients */
1410 int plane, int eob_tracker[64], int fragment)
1427 *s->dct_tokens[plane][coeff_i]++ = TOKEN_EOB(0);
1440 *s->dct_tokens[plane][coeff_i]++ = TOKEN_ZERO_RUN(coeff, zero_run);
1446 *s->dct_tokens[plane][coeff_i]++ = TOKEN_COEFF(coeff);
1456 *s->dct_tokens[plane][coeff_i]++ = TOKEN_EOB(0);
1491 static int vp4_dc_pred(const Vp3DecodeContext *s, const VP4Predictor * dc_pred, const int * last_dc, int type, int plane)
1522 int plane, i;
1524 for (plane = 0; plane < 3; plane++) {
1526 s->dct_tokens[plane][i] = base;
1527 base += s->fragment_width[!!plane] * s->fragment_height[!!plane];
1540 int plane, sb_y, sb_x;
1585 for (plane = 0; plane < ((s->avctx->flags & AV_CODEC_FLAG_GRAY) ? 1 : 3); plane++) {
1589 for (i = 0; i < s->fragment_width[!!plane]; i++)
1596 for (sb_y = 0; sb_y * 4 < s->fragment_height[!!plane]; sb_y++) {
1597 for (sb_x = 0; sb_x *4 < s->fragment_width[!!plane]; sb_x++) {
1607 if (x >= s->fragment_width[!!plane] || y >= s->fragment_height[!!plane])
1610 fragment = s->fragment_start[plane] + y * s->fragment_width[!!plane] + x;
1615 if (vp4_unpack_vlcs(s, gb, tables[!!plane], plane, eob_tracker, fragment) < 0)
1621 vp4_dc_pred(s, this_dc_pred, last_dc, dc_block_type, plane);
1796 static void apply_loop_filter(Vp3DecodeContext *s, int plane,
1802 int width = s->fragment_width[!!plane];
1803 int height = s->fragment_height[!!plane];
1804 int fragment = s->fragment_start[plane] + ystart * width;
1805 ptrdiff_t stride = s->current_frame.f->linesize[plane];
1806 uint8_t *plane_data = s->current_frame.f->data[plane];
1809 plane_data += s->data_offset[plane] + 8 * ystart * stride;
1864 int plane, int inter, int16_t block[64])
1866 int16_t *dequantizer = s->qmat[frag->qpi][inter][plane];
1871 int token = *s->dct_tokens[plane][i];
1875 s->dct_tokens[plane][i]++;
1877 *s->dct_tokens[plane][i] = token & ~3;
1880 s->dct_tokens[plane][i]++;
1891 s->dct_tokens[plane][i++]++;
1901 block[0] = frag->dc * s->qmat[0][inter][plane][0];
1973 static int vp4_mc_loop_filter(Vp3DecodeContext *s, int plane, int motion_x, int motion_y, int bx, int by,
1976 int motion_shift = plane ? 4 : 2;
1977 int subpel_mask = plane ? 3 : 1;
1986 int block_width = plane ? 8 : 16;
1987 int plane_width = s->width >> (plane && s->chroma_x_shift);
1988 int plane_height = s->height >> (plane && s->chroma_y_shift);
2079 int plane, first_pixel;
2084 for (plane = 0; plane < 3; plane++) {
2085 uint8_t *output_plane = s->current_frame.f->data[plane] +
2086 s->data_offset[plane];
2087 uint8_t *last_plane = s->last_frame.f->data[plane] +
2088 s->data_offset[plane];
2089 uint8_t *golden_plane = s->golden_frame.f->data[plane] +
2090 s->data_offset[plane];
2091 ptrdiff_t stride = s->current_frame.f->linesize[plane];
2092 int plane_width = s->width >> (plane && s->chroma_x_shift);
2093 int plane_height = s->height >> (plane && s->chroma_y_shift);
2094 int8_t(*motion_val)[2] = s->motion_val[!!plane];
2096 int sb_x, sb_y = slice << (!plane && s->chroma_y_shift);
2097 int slice_height = sb_y + 1 + (!plane && s->chroma_y_shift);
2098 int slice_width = plane ? s->c_superblock_width
2101 int fragment_width = s->fragment_width[!!plane];
2102 int fragment_height = s->fragment_height[!!plane];
2103 int fragment_start = s->fragment_start[plane];
2105 int do_await = !plane && HAVE_THREADS &&
2110 if (CONFIG_GRAY && plane && (s->avctx->flags & AV_CODEC_FLAG_GRAY))
2157 if (plane && s->version >= 2) {
2177 if (vp4_mc_loop_filter(s, plane, motion_val[fragment][0], motion_val[fragment][1], x, y, motion_source, stride, src_x, src_y, temp)) {
2227 plane, 0, block);
2233 plane, 1, block)) {
2254 apply_loop_filter(s, plane, 4 * sb_y - !!sb_y,
2330 int i, inter, plane, ret;
2430 for (plane = 0; plane < 3; plane++) {
2431 s->qr_count[inter][plane] = 1;
2432 s->qr_size[inter][plane][0] = 63;
2433 s->qr_base[inter][plane][0] =
2434 s->qr_base[inter][plane][1] = 2 * inter + (!!plane) * !inter;
3003 int i, n, matrices, inter, plane, ret;
3048 for (plane = 0; plane <= 2; plane++) {
3050 if (inter || plane > 0)
3056 plj = plane;
3058 qtj = (3 * inter + plane - 1) / 3;
3059 plj = (plane + 2) % 3;
3061 s->qr_count[inter][plane] = s->qr_count[qtj][plj];
3062 memcpy(s->qr_size[inter][plane], s->qr_size[qtj][plj],
3064 memcpy(s->qr_base[inter][plane], s->qr_base[qtj][plj],
3077 s->qr_base[inter][plane][qri] = i;
3081 s->qr_size[inter][plane][qri++] = i;
3089 s->qr_count[inter][plane] = qri;