staticvoid *get_coeffs_arr(struct symbol_counts *cnts, int i, int j, int k, int l, int m)
{ if (i == 0) return &cnts->count_coeffs[j][k][l][m];
if (i == 1) return &cnts->count_coeffs8x8[j][k][l][m];
if (i == 2) return &cnts->count_coeffs16x16[j][k][l][m];
if (i == 3) return &cnts->count_coeffs32x32[j][k][l][m];
return NULL;
}
staticvoid *get_eobs1(struct symbol_counts *cnts, int i, int j, int k, int l, int m)
{ if (i == 0) return &cnts->count_coeffs[j][k][l][m][3];
if (i == 1) return &cnts->count_coeffs8x8[j][k][l][m][3];
if (i == 2) return &cnts->count_coeffs16x16[j][k][l][m][3];
if (i == 3) return &cnts->count_coeffs32x32[j][k][l][m][3];
return NULL;
}
#define INNER_LOOP \ do { \ for (m = 0; m < ARRAY_SIZE(vp9_ctx->cnts.coeff[i][0][0][0]); ++m) { \
vp9_ctx->cnts.coeff[i][j][k][l][m] = \
get_coeffs_arr(cnts, i, j, k, l, m); \
vp9_ctx->cnts.eob[i][j][k][l][m][0] = \
&cnts->count_eobs[i][j][k][l][m]; \
vp9_ctx->cnts.eob[i][j][k][l][m][1] = \
get_eobs1(cnts, i, j, k, l, m); \
} \
} while (0)
staticvoid init_v4l2_vp9_count_tbl(struct hantro_ctx *ctx)
{ struct hantro_vp9_dec_hw_ctx *vp9_ctx = &ctx->vp9_dec; struct symbol_counts *cnts = vp9_ctx->misc.cpu + vp9_ctx->ctx_counters_offset; int i, j, k, l, m;
vp9_ctx->cnts.partition = &cnts->partition_counts;
vp9_ctx->cnts.skip = &cnts->mbskip_count;
vp9_ctx->cnts.intra_inter = &cnts->intra_inter_count;
vp9_ctx->cnts.tx32p = &cnts->tx32x32_count; /* * g2 hardware uses tx16x16_count[2][3], while the api * expects tx16p[2][4], so this must be explicitly copied * into vp9_ctx->cnts.tx16p when passing the data to the * vp9 library function
*/
vp9_ctx->cnts.tx8p = &cnts->tx8x8_count;
for (i = 0; i < ARRAY_SIZE(vp9_ctx->cnts.coeff); ++i) for (j = 0; j < ARRAY_SIZE(vp9_ctx->cnts.coeff[i]); ++j) for (k = 0; k < ARRAY_SIZE(vp9_ctx->cnts.coeff[i][0]); ++k) for (l = 0; l < ARRAY_SIZE(vp9_ctx->cnts.coeff[i][0][0]); ++l)
INNER_LOOP;
}
size = hantro_vp9_segment_map_size(max_width, max_height);
vp9_dec->segment_map_size = size;
size *= 2; /* we need two areas of this size, used alternately */
segment_map->cpu = dma_alloc_coherent(vpu->dev, size, &segment_map->dma, GFP_KERNEL); if (!segment_map->cpu) goto err_segment_map;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.