avcodec/h264dsp: Remove redundant h264 from H264DSPCtx member names

These names are a remnant of dsputil when all the DSP functions
from all codecs were part of DSPcontext.

Reviewed-by: Rémi Denis-Courmont <remi@remlab.net>
Reviewed-by: Sean McGovern <gseanmcg@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
Andreas Rheinhardt
2026-01-07 20:35:15 +01:00
parent 489aaf4e1c
commit bf4d5037b4
14 changed files with 486 additions and 486 deletions

View File

@@ -112,55 +112,55 @@ av_cold void ff_h264dsp_init_aarch64(H264DSPContext *c, const int bit_depth,
int cpu_flags = av_get_cpu_flags();
if (have_neon(cpu_flags) && bit_depth == 8) {
c->h264_v_loop_filter_luma = ff_h264_v_loop_filter_luma_neon;
c->h264_h_loop_filter_luma = ff_h264_h_loop_filter_luma_neon;
c->h264_v_loop_filter_luma_intra= ff_h264_v_loop_filter_luma_intra_neon;
c->h264_h_loop_filter_luma_intra= ff_h264_h_loop_filter_luma_intra_neon;
c->v_loop_filter_luma = ff_h264_v_loop_filter_luma_neon;
c->h_loop_filter_luma = ff_h264_h_loop_filter_luma_neon;
c->v_loop_filter_luma_intra= ff_h264_v_loop_filter_luma_intra_neon;
c->h_loop_filter_luma_intra= ff_h264_h_loop_filter_luma_intra_neon;
c->h264_v_loop_filter_chroma = ff_h264_v_loop_filter_chroma_neon;
c->h264_v_loop_filter_chroma_intra = ff_h264_v_loop_filter_chroma_intra_neon;
c->v_loop_filter_chroma = ff_h264_v_loop_filter_chroma_neon;
c->v_loop_filter_chroma_intra = ff_h264_v_loop_filter_chroma_intra_neon;
if (chroma_format_idc <= 1) {
c->h264_h_loop_filter_chroma = ff_h264_h_loop_filter_chroma_neon;
c->h264_h_loop_filter_chroma_intra = ff_h264_h_loop_filter_chroma_intra_neon;
c->h264_h_loop_filter_chroma_mbaff_intra = ff_h264_h_loop_filter_chroma_mbaff_intra_neon;
c->h_loop_filter_chroma = ff_h264_h_loop_filter_chroma_neon;
c->h_loop_filter_chroma_intra = ff_h264_h_loop_filter_chroma_intra_neon;
c->h_loop_filter_chroma_mbaff_intra = ff_h264_h_loop_filter_chroma_mbaff_intra_neon;
} else {
c->h264_h_loop_filter_chroma = ff_h264_h_loop_filter_chroma422_neon;
c->h264_h_loop_filter_chroma_mbaff = ff_h264_h_loop_filter_chroma_neon;
c->h264_h_loop_filter_chroma_intra = ff_h264_h_loop_filter_chroma422_intra_neon;
c->h264_h_loop_filter_chroma_mbaff_intra = ff_h264_h_loop_filter_chroma_intra_neon;
c->h_loop_filter_chroma = ff_h264_h_loop_filter_chroma422_neon;
c->h_loop_filter_chroma_mbaff = ff_h264_h_loop_filter_chroma_neon;
c->h_loop_filter_chroma_intra = ff_h264_h_loop_filter_chroma422_intra_neon;
c->h_loop_filter_chroma_mbaff_intra = ff_h264_h_loop_filter_chroma_intra_neon;
}
c->weight_h264_pixels_tab[0] = ff_weight_h264_pixels_16_neon;
c->weight_h264_pixels_tab[1] = ff_weight_h264_pixels_8_neon;
c->weight_h264_pixels_tab[2] = ff_weight_h264_pixels_4_neon;
c->weight_pixels_tab[0] = ff_weight_h264_pixels_16_neon;
c->weight_pixels_tab[1] = ff_weight_h264_pixels_8_neon;
c->weight_pixels_tab[2] = ff_weight_h264_pixels_4_neon;
c->biweight_h264_pixels_tab[0] = ff_biweight_h264_pixels_16_neon;
c->biweight_h264_pixels_tab[1] = ff_biweight_h264_pixels_8_neon;
c->biweight_h264_pixels_tab[2] = ff_biweight_h264_pixels_4_neon;
c->biweight_pixels_tab[0] = ff_biweight_h264_pixels_16_neon;
c->biweight_pixels_tab[1] = ff_biweight_h264_pixels_8_neon;
c->biweight_pixels_tab[2] = ff_biweight_h264_pixels_4_neon;
c->h264_idct_add = ff_h264_idct_add_neon;
c->h264_idct_dc_add = ff_h264_idct_dc_add_neon;
c->h264_idct_add16 = ff_h264_idct_add16_neon;
c->h264_idct_add16intra = ff_h264_idct_add16intra_neon;
c->idct_add = ff_h264_idct_add_neon;
c->idct_dc_add = ff_h264_idct_dc_add_neon;
c->idct_add16 = ff_h264_idct_add16_neon;
c->idct_add16intra = ff_h264_idct_add16intra_neon;
if (chroma_format_idc <= 1)
c->h264_idct_add8 = ff_h264_idct_add8_neon;
c->h264_idct8_add = ff_h264_idct8_add_neon;
c->h264_idct8_dc_add = ff_h264_idct8_dc_add_neon;
c->h264_idct8_add4 = ff_h264_idct8_add4_neon;
c->idct_add8 = ff_h264_idct_add8_neon;
c->idct8_add = ff_h264_idct8_add_neon;
c->idct8_dc_add = ff_h264_idct8_dc_add_neon;
c->idct8_add4 = ff_h264_idct8_add4_neon;
} else if (have_neon(cpu_flags) && bit_depth == 10) {
c->h264_v_loop_filter_chroma = ff_h264_v_loop_filter_chroma_neon_10;
c->h264_v_loop_filter_chroma_intra = ff_h264_v_loop_filter_chroma_intra_neon_10;
c->v_loop_filter_chroma = ff_h264_v_loop_filter_chroma_neon_10;
c->v_loop_filter_chroma_intra = ff_h264_v_loop_filter_chroma_intra_neon_10;
if (chroma_format_idc <= 1) {
c->h264_h_loop_filter_chroma = ff_h264_h_loop_filter_chroma_neon_10;
c->h264_h_loop_filter_chroma_intra = ff_h264_h_loop_filter_chroma_intra_neon_10;
c->h264_h_loop_filter_chroma_mbaff_intra = ff_h264_h_loop_filter_chroma_mbaff_intra_neon_10;
c->h_loop_filter_chroma = ff_h264_h_loop_filter_chroma_neon_10;
c->h_loop_filter_chroma_intra = ff_h264_h_loop_filter_chroma_intra_neon_10;
c->h_loop_filter_chroma_mbaff_intra = ff_h264_h_loop_filter_chroma_mbaff_intra_neon_10;
} else {
c->h264_h_loop_filter_chroma = ff_h264_h_loop_filter_chroma422_neon_10;
c->h264_h_loop_filter_chroma_mbaff = ff_h264_h_loop_filter_chroma_neon_10;
c->h264_h_loop_filter_chroma_intra = ff_h264_h_loop_filter_chroma422_intra_neon_10;
c->h264_h_loop_filter_chroma_mbaff_intra = ff_h264_h_loop_filter_chroma_intra_neon_10;
c->h_loop_filter_chroma = ff_h264_h_loop_filter_chroma422_neon_10;
c->h_loop_filter_chroma_mbaff = ff_h264_h_loop_filter_chroma_neon_10;
c->h_loop_filter_chroma_intra = ff_h264_h_loop_filter_chroma422_intra_neon_10;
c->h_loop_filter_chroma_mbaff_intra = ff_h264_h_loop_filter_chroma_intra_neon_10;
}
}
}

View File

@@ -76,32 +76,32 @@ static av_cold void h264dsp_init_neon(H264DSPContext *c, const int bit_depth,
{
#if HAVE_NEON
if (bit_depth == 8) {
c->h264_v_loop_filter_luma = ff_h264_v_loop_filter_luma_neon;
c->h264_h_loop_filter_luma = ff_h264_h_loop_filter_luma_neon;
c->h264_v_loop_filter_chroma = ff_h264_v_loop_filter_chroma_neon;
c->v_loop_filter_luma = ff_h264_v_loop_filter_luma_neon;
c->h_loop_filter_luma = ff_h264_h_loop_filter_luma_neon;
c->v_loop_filter_chroma = ff_h264_v_loop_filter_chroma_neon;
if (chroma_format_idc <= 1)
c->h264_h_loop_filter_chroma = ff_h264_h_loop_filter_chroma_neon;
c->h_loop_filter_chroma = ff_h264_h_loop_filter_chroma_neon;
else
c->h264_h_loop_filter_chroma = ff_h264_h_loop_filter_chroma422_neon;
c->h_loop_filter_chroma = ff_h264_h_loop_filter_chroma422_neon;
c->weight_h264_pixels_tab[0] = ff_weight_h264_pixels_16_neon;
c->weight_h264_pixels_tab[1] = ff_weight_h264_pixels_8_neon;
c->weight_h264_pixels_tab[2] = ff_weight_h264_pixels_4_neon;
c->weight_pixels_tab[0] = ff_weight_h264_pixels_16_neon;
c->weight_pixels_tab[1] = ff_weight_h264_pixels_8_neon;
c->weight_pixels_tab[2] = ff_weight_h264_pixels_4_neon;
c->biweight_h264_pixels_tab[0] = ff_biweight_h264_pixels_16_neon;
c->biweight_h264_pixels_tab[1] = ff_biweight_h264_pixels_8_neon;
c->biweight_h264_pixels_tab[2] = ff_biweight_h264_pixels_4_neon;
c->biweight_pixels_tab[0] = ff_biweight_h264_pixels_16_neon;
c->biweight_pixels_tab[1] = ff_biweight_h264_pixels_8_neon;
c->biweight_pixels_tab[2] = ff_biweight_h264_pixels_4_neon;
c->h264_idct_add = ff_h264_idct_add_neon;
c->h264_idct_dc_add = ff_h264_idct_dc_add_neon;
c->h264_idct_add16 = ff_h264_idct_add16_neon;
c->h264_idct_add16intra = ff_h264_idct_add16intra_neon;
c->idct_add = ff_h264_idct_add_neon;
c->idct_dc_add = ff_h264_idct_dc_add_neon;
c->idct_add16 = ff_h264_idct_add16_neon;
c->idct_add16intra = ff_h264_idct_add16intra_neon;
if (chroma_format_idc <= 1)
c->h264_idct_add8 = ff_h264_idct_add8_neon;
c->h264_idct8_add = ff_h264_idct8_add_neon;
c->h264_idct8_dc_add = ff_h264_idct8_dc_add_neon;
c->h264_idct8_add4 = ff_h264_idct8_add4_neon;
c->idct_add8 = ff_h264_idct_add8_neon;
c->idct8_add = ff_h264_idct8_add_neon;
c->idct8_dc_add = ff_h264_idct8_dc_add_neon;
c->idct8_add4 = ff_h264_idct8_add4_neon;
}
#endif // HAVE_NEON
}

View File

@@ -113,9 +113,9 @@ static av_always_inline void filter_mb_edgev(uint8_t *pix, int stride,
tc[1] = tc0_table[index_a][bS[1]];
tc[2] = tc0_table[index_a][bS[2]];
tc[3] = tc0_table[index_a][bS[3]];
h->h264dsp.h264_h_loop_filter_luma(pix, stride, alpha, beta, tc);
h->h264dsp.h_loop_filter_luma(pix, stride, alpha, beta, tc);
} else {
h->h264dsp.h264_h_loop_filter_luma_intra(pix, stride, alpha, beta);
h->h264dsp.h_loop_filter_luma_intra(pix, stride, alpha, beta);
}
}
@@ -135,9 +135,9 @@ static av_always_inline void filter_mb_edgecv(uint8_t *pix, int stride,
tc[1] = tc0_table[index_a][bS[1]]+1;
tc[2] = tc0_table[index_a][bS[2]]+1;
tc[3] = tc0_table[index_a][bS[3]]+1;
h->h264dsp.h264_h_loop_filter_chroma(pix, stride, alpha, beta, tc);
h->h264dsp.h_loop_filter_chroma(pix, stride, alpha, beta, tc);
} else {
h->h264dsp.h264_h_loop_filter_chroma_intra(pix, stride, alpha, beta);
h->h264dsp.h_loop_filter_chroma_intra(pix, stride, alpha, beta);
}
}
@@ -158,9 +158,9 @@ static av_always_inline void filter_mb_mbaff_edgev(const H264Context *h, uint8_t
tc[1] = tc0_table[index_a][bS[1*bsi]];
tc[2] = tc0_table[index_a][bS[2*bsi]];
tc[3] = tc0_table[index_a][bS[3*bsi]];
h->h264dsp.h264_h_loop_filter_luma_mbaff(pix, stride, alpha, beta, tc);
h->h264dsp.h_loop_filter_luma_mbaff(pix, stride, alpha, beta, tc);
} else {
h->h264dsp.h264_h_loop_filter_luma_mbaff_intra(pix, stride, alpha, beta);
h->h264dsp.h_loop_filter_luma_mbaff_intra(pix, stride, alpha, beta);
}
}
@@ -181,9 +181,9 @@ static av_always_inline void filter_mb_mbaff_edgecv(const H264Context *h,
tc[1] = tc0_table[index_a][bS[1*bsi]] + 1;
tc[2] = tc0_table[index_a][bS[2*bsi]] + 1;
tc[3] = tc0_table[index_a][bS[3*bsi]] + 1;
h->h264dsp.h264_h_loop_filter_chroma_mbaff(pix, stride, alpha, beta, tc);
h->h264dsp.h_loop_filter_chroma_mbaff(pix, stride, alpha, beta, tc);
} else {
h->h264dsp.h264_h_loop_filter_chroma_mbaff_intra(pix, stride, alpha, beta);
h->h264dsp.h_loop_filter_chroma_mbaff_intra(pix, stride, alpha, beta);
}
}
@@ -203,9 +203,9 @@ static av_always_inline void filter_mb_edgeh(uint8_t *pix, int stride,
tc[1] = tc0_table[index_a][bS[1]];
tc[2] = tc0_table[index_a][bS[2]];
tc[3] = tc0_table[index_a][bS[3]];
h->h264dsp.h264_v_loop_filter_luma(pix, stride, alpha, beta, tc);
h->h264dsp.v_loop_filter_luma(pix, stride, alpha, beta, tc);
} else {
h->h264dsp.h264_v_loop_filter_luma_intra(pix, stride, alpha, beta);
h->h264dsp.v_loop_filter_luma_intra(pix, stride, alpha, beta);
}
}
@@ -225,9 +225,9 @@ static av_always_inline void filter_mb_edgech(uint8_t *pix, int stride,
tc[1] = tc0_table[index_a][bS[1]]+1;
tc[2] = tc0_table[index_a][bS[2]]+1;
tc[3] = tc0_table[index_a][bS[3]]+1;
h->h264dsp.h264_v_loop_filter_chroma(pix, stride, alpha, beta, tc);
h->h264dsp.v_loop_filter_chroma(pix, stride, alpha, beta, tc);
} else {
h->h264dsp.h264_v_loop_filter_chroma_intra(pix, stride, alpha, beta);
h->h264dsp.v_loop_filter_chroma_intra(pix, stride, alpha, beta);
}
}
@@ -368,8 +368,8 @@ static av_always_inline void h264_filter_mb_fast_internal(const H264Context *h,
int mask_edge0 = 3*((mask_edge1>>1) & ((5*left_type)>>5)&1); // (mb_type & (MB_TYPE_16x16 | MB_TYPE_8x16)) && (h->left_type[LTOP] & (MB_TYPE_16x16 | MB_TYPE_8x16)) ? 3 : 0;
int step = 1+(mb_type>>24); //IS_8x8DCT(mb_type) ? 2 : 1;
edges = 4 - 3*((mb_type>>3) & !(sl->cbp & 15)); //(mb_type & MB_TYPE_16x16) && !(h->cbp & 15) ? 1 : 4;
h->h264dsp.h264_loop_filter_strength(bS, sl->non_zero_count_cache, sl->ref_cache, sl->mv_cache,
sl->list_count==2, edges, step, mask_edge0, mask_edge1, FIELD_PICTURE(h));
h->h264dsp.loop_filter_strength(bS, sl->non_zero_count_cache, sl->ref_cache, sl->mv_cache,
sl->list_count==2, edges, step, mask_edge0, mask_edge1, FIELD_PICTURE(h));
}
if( IS_INTRA(left_type) )
AV_WN64A(bS[0][0], 0x0004000400040004ULL);
@@ -419,7 +419,7 @@ void ff_h264_filter_mb_fast(const H264Context *h, H264SliceContext *sl,
unsigned int linesize, unsigned int uvlinesize)
{
av_assert2(!FRAME_MBAFF(h));
if(!h->h264dsp.h264_loop_filter_strength || h->ps.pps->chroma_qp_diff) {
if (!h->h264dsp.loop_filter_strength || h->ps.pps->chroma_qp_diff) {
ff_h264_filter_mb(h, sl, mb_x, mb_y, img_y, img_cb, img_cr, linesize, uvlinesize);
return;
}

View File

@@ -629,10 +629,10 @@ static av_always_inline void hl_decode_mb_predict_luma(const H264Context *h,
if (IS_8x8DCT(mb_type)) {
if (transform_bypass) {
idct_dc_add =
idct_add = h->h264dsp.h264_add_pixels8_clear;
idct_add = h->h264dsp.add_pixels8_clear;
} else {
idct_dc_add = h->h264dsp.h264_idct8_dc_add;
idct_add = h->h264dsp.h264_idct8_add;
idct_dc_add = h->h264dsp.idct8_dc_add;
idct_add = h->h264dsp.idct8_add;
}
for (i = 0; i < 16; i += 4) {
uint8_t *const ptr = dest_y + block_offset[i];
@@ -658,11 +658,11 @@ static av_always_inline void hl_decode_mb_predict_luma(const H264Context *h,
}
} else {
if (transform_bypass) {
idct_dc_add =
idct_add = h->h264dsp.h264_add_pixels4_clear;
idct_dc_add =
idct_add = h->h264dsp.add_pixels4_clear;
} else {
idct_dc_add = h->h264dsp.h264_idct_dc_add;
idct_add = h->h264dsp.h264_idct_add;
idct_dc_add = h->h264dsp.idct_dc_add;
idct_add = h->h264dsp.idct_add;
}
for (i = 0; i < 16; i++) {
uint8_t *const ptr = dest_y + block_offset[i];
@@ -705,9 +705,9 @@ static av_always_inline void hl_decode_mb_predict_luma(const H264Context *h,
h->hpc.pred16x16[sl->intra16x16_pred_mode](dest_y, linesize);
if (sl->non_zero_count_cache[scan8[LUMA_DC_BLOCK_INDEX + p]]) {
if (!transform_bypass)
h->h264dsp.h264_luma_dc_dequant_idct(sl->mb + (p * 256 << pixel_shift),
sl->mb_luma_dc[p],
h->ps.pps->dequant4_coeff[p][qscale][0]);
h->h264dsp.luma_dc_dequant_idct(sl->mb + (p * 256 << pixel_shift),
sl->mb_luma_dc[p],
h->ps.pps->dequant4_coeff[p][qscale][0]);
else {
static const uint8_t dc_mapping[16] = {
0 * 16, 1 * 16, 4 * 16, 5 * 16,
@@ -749,21 +749,21 @@ static av_always_inline void hl_decode_mb_idct_luma(const H264Context *h, H264Sl
for (i = 0; i < 16; i++)
if (sl->non_zero_count_cache[scan8[i + p * 16]] ||
dctcoef_get(sl->mb, pixel_shift, i * 16 + p * 256))
h->h264dsp.h264_add_pixels4_clear(dest_y + block_offset[i],
sl->mb + (i * 16 + p * 256 << pixel_shift),
linesize);
h->h264dsp.add_pixels4_clear(dest_y + block_offset[i],
sl->mb + (i * 16 + p * 256 << pixel_shift),
linesize);
}
} else {
h->h264dsp.h264_idct_add16intra(dest_y, block_offset,
sl->mb + (p * 256 << pixel_shift),
linesize,
sl->non_zero_count_cache + p * 5 * 8);
h->h264dsp.idct_add16intra(dest_y, block_offset,
sl->mb + (p * 256 << pixel_shift),
linesize,
sl->non_zero_count_cache + p * 5 * 8);
}
} else if (sl->cbp & 15) {
if (transform_bypass) {
const int di = IS_8x8DCT(mb_type) ? 4 : 1;
idct_add = IS_8x8DCT(mb_type) ? h->h264dsp.h264_add_pixels8_clear
: h->h264dsp.h264_add_pixels4_clear;
idct_add = IS_8x8DCT(mb_type) ? h->h264dsp.add_pixels8_clear
: h->h264dsp.add_pixels4_clear;
for (i = 0; i < 16; i += di)
if (sl->non_zero_count_cache[scan8[i + p * 16]])
idct_add(dest_y + block_offset[i],
@@ -771,15 +771,15 @@ static av_always_inline void hl_decode_mb_idct_luma(const H264Context *h, H264Sl
linesize);
} else {
if (IS_8x8DCT(mb_type))
h->h264dsp.h264_idct8_add4(dest_y, block_offset,
sl->mb + (p * 256 << pixel_shift),
linesize,
sl->non_zero_count_cache + p * 5 * 8);
h->h264dsp.idct8_add4(dest_y, block_offset,
sl->mb + (p * 256 << pixel_shift),
linesize,
sl->non_zero_count_cache + p * 5 * 8);
else
h->h264dsp.h264_idct_add16(dest_y, block_offset,
sl->mb + (p * 256 << pixel_shift),
linesize,
sl->non_zero_count_cache + p * 5 * 8);
h->h264dsp.idct_add16(dest_y, block_offset,
sl->mb + (p * 256 << pixel_shift),
linesize,
sl->non_zero_count_cache + p * 5 * 8);
}
}
}

View File

@@ -174,16 +174,16 @@ static av_noinline void FUNC(hl_decode_mb)(const H264Context *h, H264SliceContex
h->h264chroma.put_h264_chroma_pixels_tab,
h->h264qpel.avg_h264_qpel_pixels_tab,
h->h264chroma.avg_h264_chroma_pixels_tab,
h->h264dsp.weight_h264_pixels_tab,
h->h264dsp.biweight_h264_pixels_tab);
h->h264dsp.weight_pixels_tab,
h->h264dsp.biweight_pixels_tab);
} else {
FUNC(hl_motion_420)(h, sl, dest_y, dest_cb, dest_cr,
h->h264qpel.put_h264_qpel_pixels_tab,
h->h264chroma.put_h264_chroma_pixels_tab,
h->h264qpel.avg_h264_qpel_pixels_tab,
h->h264chroma.avg_h264_chroma_pixels_tab,
h->h264dsp.weight_h264_pixels_tab,
h->h264dsp.biweight_h264_pixels_tab);
h->h264dsp.weight_pixels_tab,
h->h264dsp.biweight_pixels_tab);
}
}
@@ -206,7 +206,7 @@ static av_noinline void FUNC(hl_decode_mb)(const H264Context *h, H264SliceContex
sl->mb + (16 * 16 * 2 << PIXEL_SHIFT),
uvlinesize);
} else {
idct_add = h->h264dsp.h264_add_pixels4_clear;
idct_add = h->h264dsp.add_pixels4_clear;
for (j = 1; j < 3; j++) {
for (i = j * 16; i < j * 16 + 4; i++)
if (sl->non_zero_count_cache[scan8[i]] ||
@@ -234,14 +234,14 @@ static av_noinline void FUNC(hl_decode_mb)(const H264Context *h, H264SliceContex
qp[1] = sl->chroma_qp[1];
}
if (sl->non_zero_count_cache[scan8[CHROMA_DC_BLOCK_INDEX + 0]])
h->h264dsp.h264_chroma_dc_dequant_idct(sl->mb + (16 * 16 * 1 << PIXEL_SHIFT),
h->ps.pps->dequant4_coeff[IS_INTRA(mb_type) ? 1 : 4][qp[0]][0]);
h->h264dsp.chroma_dc_dequant_idct(sl->mb + (16 * 16 * 1 << PIXEL_SHIFT),
h->ps.pps->dequant4_coeff[IS_INTRA(mb_type) ? 1 : 4][qp[0]][0]);
if (sl->non_zero_count_cache[scan8[CHROMA_DC_BLOCK_INDEX + 1]])
h->h264dsp.h264_chroma_dc_dequant_idct(sl->mb + (16 * 16 * 2 << PIXEL_SHIFT),
h->ps.pps->dequant4_coeff[IS_INTRA(mb_type) ? 2 : 5][qp[1]][0]);
h->h264dsp.h264_idct_add8(dest, block_offset,
sl->mb, uvlinesize,
sl->non_zero_count_cache);
h->h264dsp.chroma_dc_dequant_idct(sl->mb + (16 * 16 * 2 << PIXEL_SHIFT),
h->ps.pps->dequant4_coeff[IS_INTRA(mb_type) ? 2 : 5][qp[1]][0]);
h->h264dsp.idct_add8(dest, block_offset,
sl->mb, uvlinesize,
sl->non_zero_count_cache);
}
}
}
@@ -341,8 +341,8 @@ static av_noinline void FUNC(hl_decode_mb_444)(const H264Context *h, H264SliceCo
h->h264chroma.put_h264_chroma_pixels_tab,
h->h264qpel.avg_h264_qpel_pixels_tab,
h->h264chroma.avg_h264_chroma_pixels_tab,
h->h264dsp.weight_h264_pixels_tab,
h->h264dsp.biweight_h264_pixels_tab);
h->h264dsp.weight_pixels_tab,
h->h264dsp.biweight_pixels_tab);
}
for (p = 0; p < plane_count; p++)

View File

@@ -70,13 +70,13 @@ av_cold void ff_h264dsp_init(H264DSPContext *c, const int bit_depth,
#define FUNC(a, depth) a ## _ ## depth ## _c
#define SET_PIXSIZE_FUNCS(depth) \
c->h264_luma_dc_dequant_idct= FUNC(ff_h264_luma_dc_dequant_idct, depth);\
c->luma_dc_dequant_idct = FUNC(ff_h264_luma_dc_dequant_idct, depth);\
if (chroma_format_idc <= 1)\
c->h264_chroma_dc_dequant_idct= FUNC(ff_h264_chroma_dc_dequant_idct, depth);\
c->chroma_dc_dequant_idct = FUNC(ff_h264_chroma_dc_dequant_idct, depth);\
else\
c->h264_chroma_dc_dequant_idct= FUNC(ff_h264_chroma422_dc_dequant_idct, depth);\
c->h264_add_pixels4_clear = FUNC(ff_h264_add_pixels4, depth);\
c->h264_add_pixels8_clear = FUNC(ff_h264_add_pixels8, depth)
c->chroma_dc_dequant_idct = FUNC(ff_h264_chroma422_dc_dequant_idct, depth);\
c->add_pixels4_clear = FUNC(ff_h264_add_pixels4, depth);\
c->add_pixels8_clear = FUNC(ff_h264_add_pixels8, depth)
if (bit_depth > 8 && bit_depth <= 16) {
SET_PIXSIZE_FUNCS(16);
@@ -85,52 +85,52 @@ av_cold void ff_h264dsp_init(H264DSPContext *c, const int bit_depth,
}
#define H264_DSP(depth) \
c->h264_idct_add= FUNC(ff_h264_idct_add, depth);\
c->h264_idct8_add= FUNC(ff_h264_idct8_add, depth);\
c->h264_idct_dc_add= FUNC(ff_h264_idct_dc_add, depth);\
c->h264_idct8_dc_add= FUNC(ff_h264_idct8_dc_add, depth);\
c->h264_idct_add16 = FUNC(ff_h264_idct_add16, depth);\
c->h264_idct8_add4 = FUNC(ff_h264_idct8_add4, depth);\
c->idct_add = FUNC(ff_h264_idct_add, depth);\
c->idct8_add = FUNC(ff_h264_idct8_add, depth);\
c->idct_dc_add = FUNC(ff_h264_idct_dc_add, depth);\
c->idct8_dc_add = FUNC(ff_h264_idct8_dc_add, depth);\
c->idct_add16 = FUNC(ff_h264_idct_add16, depth);\
c->idct8_add4 = FUNC(ff_h264_idct8_add4, depth);\
if (chroma_format_idc <= 1)\
c->h264_idct_add8 = FUNC(ff_h264_idct_add8, depth);\
c->idct_add8 = FUNC(ff_h264_idct_add8, depth);\
else\
c->h264_idct_add8 = FUNC(ff_h264_idct_add8_422, depth);\
c->h264_idct_add16intra= FUNC(ff_h264_idct_add16intra, depth);\
c->idct_add8 = FUNC(ff_h264_idct_add8_422, depth);\
c->idct_add16intra = FUNC(ff_h264_idct_add16intra, depth);\
\
c->weight_h264_pixels_tab[0]= FUNC(weight_h264_pixels16, depth);\
c->weight_h264_pixels_tab[1]= FUNC(weight_h264_pixels8, depth);\
c->weight_h264_pixels_tab[2]= FUNC(weight_h264_pixels4, depth);\
c->weight_h264_pixels_tab[3]= FUNC(weight_h264_pixels2, depth);\
c->biweight_h264_pixels_tab[0]= FUNC(biweight_h264_pixels16, depth);\
c->biweight_h264_pixels_tab[1]= FUNC(biweight_h264_pixels8, depth);\
c->biweight_h264_pixels_tab[2]= FUNC(biweight_h264_pixels4, depth);\
c->biweight_h264_pixels_tab[3]= FUNC(biweight_h264_pixels2, depth);\
c->weight_pixels_tab[0] = FUNC(weight_h264_pixels16, depth);\
c->weight_pixels_tab[1] = FUNC(weight_h264_pixels8, depth);\
c->weight_pixels_tab[2] = FUNC(weight_h264_pixels4, depth);\
c->weight_pixels_tab[3] = FUNC(weight_h264_pixels2, depth);\
c->biweight_pixels_tab[0] = FUNC(biweight_h264_pixels16, depth);\
c->biweight_pixels_tab[1] = FUNC(biweight_h264_pixels8, depth);\
c->biweight_pixels_tab[2] = FUNC(biweight_h264_pixels4, depth);\
c->biweight_pixels_tab[3] = FUNC(biweight_h264_pixels2, depth);\
\
c->h264_v_loop_filter_luma= FUNC(h264_v_loop_filter_luma, depth);\
c->h264_h_loop_filter_luma= FUNC(h264_h_loop_filter_luma, depth);\
c->h264_h_loop_filter_luma_mbaff= FUNC(h264_h_loop_filter_luma_mbaff, depth);\
c->h264_v_loop_filter_luma_intra= FUNC(h264_v_loop_filter_luma_intra, depth);\
c->h264_h_loop_filter_luma_intra= FUNC(h264_h_loop_filter_luma_intra, depth);\
c->h264_h_loop_filter_luma_mbaff_intra= FUNC(h264_h_loop_filter_luma_mbaff_intra, depth);\
c->h264_v_loop_filter_chroma= FUNC(h264_v_loop_filter_chroma, depth);\
c->v_loop_filter_luma = FUNC(h264_v_loop_filter_luma, depth);\
c->h_loop_filter_luma = FUNC(h264_h_loop_filter_luma, depth);\
c->h_loop_filter_luma_mbaff = FUNC(h264_h_loop_filter_luma_mbaff, depth);\
c->v_loop_filter_luma_intra = FUNC(h264_v_loop_filter_luma_intra, depth);\
c->h_loop_filter_luma_intra = FUNC(h264_h_loop_filter_luma_intra, depth);\
c->h_loop_filter_luma_mbaff_intra = FUNC(h264_h_loop_filter_luma_mbaff_intra, depth);\
c->v_loop_filter_chroma = FUNC(h264_v_loop_filter_chroma, depth);\
if (chroma_format_idc <= 1)\
c->h264_h_loop_filter_chroma= FUNC(h264_h_loop_filter_chroma, depth);\
c->h_loop_filter_chroma = FUNC(h264_h_loop_filter_chroma, depth);\
else\
c->h264_h_loop_filter_chroma= FUNC(h264_h_loop_filter_chroma422, depth);\
c->h_loop_filter_chroma = FUNC(h264_h_loop_filter_chroma422, depth);\
if (chroma_format_idc <= 1)\
c->h264_h_loop_filter_chroma_mbaff= FUNC(h264_h_loop_filter_chroma_mbaff, depth);\
c->h_loop_filter_chroma_mbaff = FUNC(h264_h_loop_filter_chroma_mbaff, depth);\
else\
c->h264_h_loop_filter_chroma_mbaff= FUNC(h264_h_loop_filter_chroma422_mbaff, depth);\
c->h264_v_loop_filter_chroma_intra= FUNC(h264_v_loop_filter_chroma_intra, depth);\
c->h_loop_filter_chroma_mbaff = FUNC(h264_h_loop_filter_chroma422_mbaff, depth);\
c->v_loop_filter_chroma_intra= FUNC(h264_v_loop_filter_chroma_intra, depth);\
if (chroma_format_idc <= 1)\
c->h264_h_loop_filter_chroma_intra= FUNC(h264_h_loop_filter_chroma_intra, depth);\
c->h_loop_filter_chroma_intra = FUNC(h264_h_loop_filter_chroma_intra, depth);\
else\
c->h264_h_loop_filter_chroma_intra= FUNC(h264_h_loop_filter_chroma422_intra, depth);\
c->h_loop_filter_chroma_intra = FUNC(h264_h_loop_filter_chroma422_intra, depth);\
if (chroma_format_idc <= 1)\
c->h264_h_loop_filter_chroma_mbaff_intra= FUNC(h264_h_loop_filter_chroma_mbaff_intra, depth);\
c->h_loop_filter_chroma_mbaff_intra = FUNC(h264_h_loop_filter_chroma_mbaff_intra, depth);\
else\
c->h264_h_loop_filter_chroma_mbaff_intra= FUNC(h264_h_loop_filter_chroma422_mbaff_intra, depth);\
c->h264_loop_filter_strength= NULL;
c->h_loop_filter_chroma_mbaff_intra = FUNC(h264_h_loop_filter_chroma422_mbaff_intra, depth);\
c->loop_filter_strength = NULL;
switch (bit_depth) {
case 9:

View File

@@ -41,71 +41,71 @@ typedef void (*h264_biweight_func)(uint8_t *dst, uint8_t *src,
*/
typedef struct H264DSPContext {
/* weighted MC */
h264_weight_func weight_h264_pixels_tab[4];
h264_biweight_func biweight_h264_pixels_tab[4];
h264_weight_func weight_pixels_tab[4];
h264_biweight_func biweight_pixels_tab[4];
/* loop filter */
void (*h264_v_loop_filter_luma)(uint8_t *pix /*align 16*/, ptrdiff_t stride,
int alpha, int beta, int8_t *tc0);
void (*h264_h_loop_filter_luma)(uint8_t *pix /*align 4 */, ptrdiff_t stride,
int alpha, int beta, int8_t *tc0);
void (*h264_h_loop_filter_luma_mbaff)(uint8_t *pix /*align 16*/, ptrdiff_t stride,
int alpha, int beta, int8_t *tc0);
void (*v_loop_filter_luma)(uint8_t *pix /*align 16*/, ptrdiff_t stride,
int alpha, int beta, int8_t *tc0);
void (*h_loop_filter_luma)(uint8_t *pix /*align 4 */, ptrdiff_t stride,
int alpha, int beta, int8_t *tc0);
void (*h_loop_filter_luma_mbaff)(uint8_t *pix /*align 16*/, ptrdiff_t stride,
int alpha, int beta, int8_t *tc0);
/* v/h_loop_filter_luma_intra: align 16 */
void (*h264_v_loop_filter_luma_intra)(uint8_t *pix, ptrdiff_t stride,
int alpha, int beta);
void (*h264_h_loop_filter_luma_intra)(uint8_t *pix, ptrdiff_t stride,
int alpha, int beta);
void (*h264_h_loop_filter_luma_mbaff_intra)(uint8_t *pix /*align 16*/,
ptrdiff_t stride, int alpha, int beta);
void (*h264_v_loop_filter_chroma)(uint8_t *pix /*align 8*/, ptrdiff_t stride,
int alpha, int beta, int8_t *tc0);
void (*h264_h_loop_filter_chroma)(uint8_t *pix /*align 4*/, ptrdiff_t stride,
int alpha, int beta, int8_t *tc0);
void (*h264_h_loop_filter_chroma_mbaff)(uint8_t *pix /*align 8*/,
ptrdiff_t stride, int alpha, int beta,
int8_t *tc0);
void (*h264_v_loop_filter_chroma_intra)(uint8_t *pix /*align 8*/,
ptrdiff_t stride, int alpha, int beta);
void (*h264_h_loop_filter_chroma_intra)(uint8_t *pix /*align 8*/,
ptrdiff_t stride, int alpha, int beta);
void (*h264_h_loop_filter_chroma_mbaff_intra)(uint8_t *pix /*align 8*/,
ptrdiff_t stride, int alpha, int beta);
// h264_loop_filter_strength: simd only. the C version is inlined in h264_loopfilter.c
void (*h264_loop_filter_strength)(int16_t bS[2][4][4], uint8_t nnz[40],
int8_t ref[2][40], int16_t mv[2][40][2],
int bidir, int edges, int step,
int mask_mv0, int mask_mv1, int field);
void (*v_loop_filter_luma_intra)(uint8_t *pix, ptrdiff_t stride,
int alpha, int beta);
void (*h_loop_filter_luma_intra)(uint8_t *pix, ptrdiff_t stride,
int alpha, int beta);
void (*h_loop_filter_luma_mbaff_intra)(uint8_t *pix /*align 16*/,
ptrdiff_t stride, int alpha, int beta);
void (*v_loop_filter_chroma)(uint8_t *pix /*align 8*/, ptrdiff_t stride,
int alpha, int beta, int8_t *tc0);
void (*h_loop_filter_chroma)(uint8_t *pix /*align 4*/, ptrdiff_t stride,
int alpha, int beta, int8_t *tc0);
void (*h_loop_filter_chroma_mbaff)(uint8_t *pix /*align 8*/,
ptrdiff_t stride, int alpha, int beta,
int8_t *tc0);
void (*v_loop_filter_chroma_intra)(uint8_t *pix /*align 8*/,
ptrdiff_t stride, int alpha, int beta);
void (*h_loop_filter_chroma_intra)(uint8_t *pix /*align 8*/,
ptrdiff_t stride, int alpha, int beta);
void (*h_loop_filter_chroma_mbaff_intra)(uint8_t *pix /*align 8*/,
ptrdiff_t stride, int alpha, int beta);
// loop_filter_strength: simd only. the C version is inlined in h264_loopfilter.c
void (*loop_filter_strength)(int16_t bS[2][4][4], uint8_t nnz[40],
int8_t ref[2][40], int16_t mv[2][40][2],
int bidir, int edges, int step,
int mask_mv0, int mask_mv1, int field);
/* IDCT */
void (*h264_idct_add)(uint8_t *dst /*align 4*/,
int16_t *block /*align 16*/, int stride);
void (*h264_idct8_add)(uint8_t *dst /*align 8*/,
int16_t *block /*align 16*/, int stride);
void (*h264_idct_dc_add)(uint8_t *dst /*align 4*/,
int16_t *block /*align 16*/, int stride);
void (*h264_idct8_dc_add)(uint8_t *dst /*align 8*/,
int16_t *block /*align 16*/, int stride);
void (*idct_add)(uint8_t *dst /*align 4*/,
int16_t *block /*align 16*/, int stride);
void (*idct8_add)(uint8_t *dst /*align 8*/,
int16_t *block /*align 16*/, int stride);
void (*idct_dc_add)(uint8_t *dst /*align 4*/,
int16_t *block /*align 16*/, int stride);
void (*idct8_dc_add)(uint8_t *dst /*align 8*/,
int16_t *block /*align 16*/, int stride);
void (*h264_idct_add16)(uint8_t *dst /*align 16*/, const int *blockoffset,
int16_t *block /*align 16*/, int stride,
const uint8_t nnzc[5 * 8]);
void (*h264_idct8_add4)(uint8_t *dst /*align 16*/, const int *blockoffset,
int16_t *block /*align 16*/, int stride,
const uint8_t nnzc[5 * 8]);
void (*h264_idct_add8)(uint8_t **dst /*align 16*/, const int *blockoffset,
int16_t *block /*align 16*/, int stride,
const uint8_t nnzc[15 * 8]);
void (*h264_idct_add16intra)(uint8_t *dst /*align 16*/, const int *blockoffset,
int16_t *block /*align 16*/,
int stride, const uint8_t nnzc[5 * 8]);
void (*h264_luma_dc_dequant_idct)(int16_t *output,
int16_t *input /*align 16*/, int qmul);
void (*h264_chroma_dc_dequant_idct)(int16_t *block, int qmul);
void (*idct_add16)(uint8_t *dst /*align 16*/, const int *blockoffset,
int16_t *block /*align 16*/, int stride,
const uint8_t nnzc[5 * 8]);
void (*idct8_add4)(uint8_t *dst /*align 16*/, const int *blockoffset,
int16_t *block /*align 16*/, int stride,
const uint8_t nnzc[5 * 8]);
void (*idct_add8)(uint8_t **dst /*align 16*/, const int *blockoffset,
int16_t *block /*align 16*/, int stride,
const uint8_t nnzc[15 * 8]);
void (*idct_add16intra)(uint8_t *dst /*align 16*/, const int *blockoffset,
int16_t *block /*align 16*/,
int stride, const uint8_t nnzc[5 * 8]);
void (*luma_dc_dequant_idct)(int16_t *output,
int16_t *input /*align 16*/, int qmul);
void (*chroma_dc_dequant_idct)(int16_t *block, int qmul);
/* bypass-transform */
void (*h264_add_pixels8_clear)(uint8_t *dst, int16_t *block, int stride);
void (*h264_add_pixels4_clear)(uint8_t *dst, int16_t *block, int stride);
void (*add_pixels8_clear)(uint8_t *dst, int16_t *block, int stride);
void (*add_pixels4_clear)(uint8_t *dst, int16_t *block, int stride);
/**
* Search buf from the start for up to size bytes. Return the index

View File

@@ -30,67 +30,67 @@ av_cold void ff_h264dsp_init_loongarch(H264DSPContext *c, const int bit_depth,
if (have_lsx(cpu_flags)) {
if (chroma_format_idc <= 1)
c->h264_loop_filter_strength = ff_h264_loop_filter_strength_lsx;
c->loop_filter_strength = ff_h264_loop_filter_strength_lsx;
if (bit_depth == 8) {
c->h264_idct_add = ff_h264_idct_add_8_lsx;
c->h264_idct8_add = ff_h264_idct8_add_8_lsx;
c->h264_idct_dc_add = ff_h264_idct_dc_add_8_lsx;
c->h264_idct8_dc_add = ff_h264_idct8_dc_add_8_lsx;
c->idct_add = ff_h264_idct_add_8_lsx;
c->idct8_add = ff_h264_idct8_add_8_lsx;
c->idct_dc_add = ff_h264_idct_dc_add_8_lsx;
c->idct8_dc_add = ff_h264_idct8_dc_add_8_lsx;
if (chroma_format_idc <= 1) {
c->h264_idct_add8 = ff_h264_idct_add8_8_lsx;
c->h264_h_loop_filter_chroma = ff_h264_h_lpf_chroma_8_lsx;
c->h264_h_loop_filter_chroma_intra = ff_h264_h_lpf_chroma_intra_8_lsx;
c->idct_add8 = ff_h264_idct_add8_8_lsx;
c->h_loop_filter_chroma = ff_h264_h_lpf_chroma_8_lsx;
c->h_loop_filter_chroma_intra = ff_h264_h_lpf_chroma_intra_8_lsx;
} else
c->h264_idct_add8 = ff_h264_idct_add8_422_8_lsx;
c->idct_add8 = ff_h264_idct_add8_422_8_lsx;
c->h264_idct_add16 = ff_h264_idct_add16_8_lsx;
c->h264_idct8_add4 = ff_h264_idct8_add4_8_lsx;
c->h264_luma_dc_dequant_idct = ff_h264_luma_dc_dequant_idct_8_lsx;
c->h264_idct_add16intra = ff_h264_idct_add16_intra_8_lsx;
c->idct_add16 = ff_h264_idct_add16_8_lsx;
c->idct8_add4 = ff_h264_idct8_add4_8_lsx;
c->luma_dc_dequant_idct = ff_h264_luma_dc_dequant_idct_8_lsx;
c->idct_add16intra = ff_h264_idct_add16_intra_8_lsx;
c->h264_add_pixels4_clear = ff_h264_add_pixels4_8_lsx;
c->h264_add_pixels8_clear = ff_h264_add_pixels8_8_lsx;
c->h264_v_loop_filter_luma = ff_h264_v_lpf_luma_8_lsx;
c->h264_h_loop_filter_luma = ff_h264_h_lpf_luma_8_lsx;
c->h264_v_loop_filter_luma_intra = ff_h264_v_lpf_luma_intra_8_lsx;
c->h264_h_loop_filter_luma_intra = ff_h264_h_lpf_luma_intra_8_lsx;
c->h264_v_loop_filter_chroma = ff_h264_v_lpf_chroma_8_lsx;
c->add_pixels4_clear = ff_h264_add_pixels4_8_lsx;
c->add_pixels8_clear = ff_h264_add_pixels8_8_lsx;
c->v_loop_filter_luma = ff_h264_v_lpf_luma_8_lsx;
c->h_loop_filter_luma = ff_h264_h_lpf_luma_8_lsx;
c->v_loop_filter_luma_intra = ff_h264_v_lpf_luma_intra_8_lsx;
c->h_loop_filter_luma_intra = ff_h264_h_lpf_luma_intra_8_lsx;
c->v_loop_filter_chroma = ff_h264_v_lpf_chroma_8_lsx;
c->h264_v_loop_filter_chroma_intra = ff_h264_v_lpf_chroma_intra_8_lsx;
c->v_loop_filter_chroma_intra = ff_h264_v_lpf_chroma_intra_8_lsx;
c->biweight_h264_pixels_tab[0] = ff_biweight_h264_pixels16_8_lsx;
c->biweight_h264_pixels_tab[1] = ff_biweight_h264_pixels8_8_lsx;
c->biweight_h264_pixels_tab[2] = ff_biweight_h264_pixels4_8_lsx;
c->weight_h264_pixels_tab[0] = ff_weight_h264_pixels16_8_lsx;
c->weight_h264_pixels_tab[1] = ff_weight_h264_pixels8_8_lsx;
c->weight_h264_pixels_tab[2] = ff_weight_h264_pixels4_8_lsx;
c->h264_idct8_add = ff_h264_idct8_add_8_lsx;
c->h264_idct8_dc_add = ff_h264_idct8_dc_add_8_lsx;
c->biweight_pixels_tab[0] = ff_biweight_h264_pixels16_8_lsx;
c->biweight_pixels_tab[1] = ff_biweight_h264_pixels8_8_lsx;
c->biweight_pixels_tab[2] = ff_biweight_h264_pixels4_8_lsx;
c->weight_pixels_tab[0] = ff_weight_h264_pixels16_8_lsx;
c->weight_pixels_tab[1] = ff_weight_h264_pixels8_8_lsx;
c->weight_pixels_tab[2] = ff_weight_h264_pixels4_8_lsx;
c->idct8_add = ff_h264_idct8_add_8_lsx;
c->idct8_dc_add = ff_h264_idct8_dc_add_8_lsx;
}
}
#if HAVE_LASX
if (have_lasx(cpu_flags)) {
if (chroma_format_idc <= 1)
c->h264_loop_filter_strength = ff_h264_loop_filter_strength_lasx;
c->loop_filter_strength = ff_h264_loop_filter_strength_lasx;
if (bit_depth == 8) {
c->h264_add_pixels4_clear = ff_h264_add_pixels4_8_lasx;
c->h264_add_pixels8_clear = ff_h264_add_pixels8_8_lasx;
c->h264_v_loop_filter_luma = ff_h264_v_lpf_luma_8_lasx;
c->h264_h_loop_filter_luma = ff_h264_h_lpf_luma_8_lasx;
c->h264_v_loop_filter_luma_intra = ff_h264_v_lpf_luma_intra_8_lasx;
c->h264_h_loop_filter_luma_intra = ff_h264_h_lpf_luma_intra_8_lasx;
c->add_pixels4_clear = ff_h264_add_pixels4_8_lasx;
c->add_pixels8_clear = ff_h264_add_pixels8_8_lasx;
c->v_loop_filter_luma = ff_h264_v_lpf_luma_8_lasx;
c->h_loop_filter_luma = ff_h264_h_lpf_luma_8_lasx;
c->v_loop_filter_luma_intra = ff_h264_v_lpf_luma_intra_8_lasx;
c->h_loop_filter_luma_intra = ff_h264_h_lpf_luma_intra_8_lasx;
/* Weighted MC */
c->weight_h264_pixels_tab[0] = ff_weight_h264_pixels16_8_lasx;
c->weight_h264_pixels_tab[1] = ff_weight_h264_pixels8_8_lasx;
c->weight_pixels_tab[0] = ff_weight_h264_pixels16_8_lasx;
c->weight_pixels_tab[1] = ff_weight_h264_pixels8_8_lasx;
c->biweight_h264_pixels_tab[0] = ff_biweight_h264_pixels16_8_lasx;
c->biweight_h264_pixels_tab[1] = ff_biweight_h264_pixels8_8_lasx;
c->biweight_pixels_tab[0] = ff_biweight_h264_pixels16_8_lasx;
c->biweight_pixels_tab[1] = ff_biweight_h264_pixels8_8_lasx;
c->h264_idct8_add = ff_h264_idct8_add_8_lasx;
c->h264_idct8_dc_add = ff_h264_idct8_dc_add_8_lasx;
c->h264_idct8_add4 = ff_h264_idct8_add4_8_lasx;
c->idct8_add = ff_h264_idct8_add_8_lasx;
c->idct8_dc_add = ff_h264_idct8_dc_add_8_lasx;
c->idct8_add4 = ff_h264_idct8_add4_8_lasx;
}
}
#endif // #if HAVE_LASX

View File

@@ -30,101 +30,101 @@ av_cold void ff_h264dsp_init_mips(H264DSPContext *c, const int bit_depth,
if (have_mmi(cpu_flags)) {
if (bit_depth == 8) {
c->h264_add_pixels4_clear = ff_h264_add_pixels4_8_mmi;
c->h264_idct_add = ff_h264_idct_add_8_mmi;
c->h264_idct8_add = ff_h264_idct8_add_8_mmi;
c->h264_idct_dc_add = ff_h264_idct_dc_add_8_mmi;
c->h264_idct8_dc_add = ff_h264_idct8_dc_add_8_mmi;
c->h264_idct_add16 = ff_h264_idct_add16_8_mmi;
c->h264_idct_add16intra = ff_h264_idct_add16intra_8_mmi;
c->h264_idct8_add4 = ff_h264_idct8_add4_8_mmi;
c->add_pixels4_clear = ff_h264_add_pixels4_8_mmi;
c->idct_add = ff_h264_idct_add_8_mmi;
c->idct8_add = ff_h264_idct8_add_8_mmi;
c->idct_dc_add = ff_h264_idct_dc_add_8_mmi;
c->idct8_dc_add = ff_h264_idct8_dc_add_8_mmi;
c->idct_add16 = ff_h264_idct_add16_8_mmi;
c->idct_add16intra = ff_h264_idct_add16intra_8_mmi;
c->idct8_add4 = ff_h264_idct8_add4_8_mmi;
if (chroma_format_idc <= 1)
c->h264_idct_add8 = ff_h264_idct_add8_8_mmi;
c->idct_add8 = ff_h264_idct_add8_8_mmi;
else
c->h264_idct_add8 = ff_h264_idct_add8_422_8_mmi;
c->idct_add8 = ff_h264_idct_add8_422_8_mmi;
c->h264_luma_dc_dequant_idct = ff_h264_luma_dc_dequant_idct_8_mmi;
c->luma_dc_dequant_idct = ff_h264_luma_dc_dequant_idct_8_mmi;
c->weight_h264_pixels_tab[0] = ff_h264_weight_pixels16_8_mmi;
c->weight_h264_pixels_tab[1] = ff_h264_weight_pixels8_8_mmi;
c->weight_h264_pixels_tab[2] = ff_h264_weight_pixels4_8_mmi;
c->weight_pixels_tab[0] = ff_h264_weight_pixels16_8_mmi;
c->weight_pixels_tab[1] = ff_h264_weight_pixels8_8_mmi;
c->weight_pixels_tab[2] = ff_h264_weight_pixels4_8_mmi;
c->biweight_h264_pixels_tab[0] = ff_h264_biweight_pixels16_8_mmi;
c->biweight_h264_pixels_tab[1] = ff_h264_biweight_pixels8_8_mmi;
c->biweight_h264_pixels_tab[2] = ff_h264_biweight_pixels4_8_mmi;
c->biweight_pixels_tab[0] = ff_h264_biweight_pixels16_8_mmi;
c->biweight_pixels_tab[1] = ff_h264_biweight_pixels8_8_mmi;
c->biweight_pixels_tab[2] = ff_h264_biweight_pixels4_8_mmi;
c->h264_v_loop_filter_chroma = ff_deblock_v_chroma_8_mmi;
c->h264_v_loop_filter_chroma_intra = ff_deblock_v_chroma_intra_8_mmi;
c->v_loop_filter_chroma = ff_deblock_v_chroma_8_mmi;
c->v_loop_filter_chroma_intra = ff_deblock_v_chroma_intra_8_mmi;
if (chroma_format_idc <= 1) {
c->h264_h_loop_filter_chroma =
c->h_loop_filter_chroma =
ff_deblock_h_chroma_8_mmi;
c->h264_h_loop_filter_chroma_intra =
c->h_loop_filter_chroma_intra =
ff_deblock_h_chroma_intra_8_mmi;
}
c->h264_v_loop_filter_luma = ff_deblock_v_luma_8_mmi;
c->h264_v_loop_filter_luma_intra = ff_deblock_v_luma_intra_8_mmi;
c->h264_h_loop_filter_luma = ff_deblock_h_luma_8_mmi;
c->h264_h_loop_filter_luma_intra = ff_deblock_h_luma_intra_8_mmi;
c->v_loop_filter_luma = ff_deblock_v_luma_8_mmi;
c->v_loop_filter_luma_intra = ff_deblock_v_luma_intra_8_mmi;
c->h_loop_filter_luma = ff_deblock_h_luma_8_mmi;
c->h_loop_filter_luma_intra = ff_deblock_h_luma_intra_8_mmi;
}
}
if (have_msa(cpu_flags)) {
if (chroma_format_idc <= 1)
c->h264_loop_filter_strength = ff_h264_loop_filter_strength_msa;
c->loop_filter_strength = ff_h264_loop_filter_strength_msa;
if (bit_depth == 8) {
c->h264_v_loop_filter_luma = ff_h264_v_lpf_luma_inter_msa;
c->h264_h_loop_filter_luma = ff_h264_h_lpf_luma_inter_msa;
c->h264_h_loop_filter_luma_mbaff =
c->v_loop_filter_luma = ff_h264_v_lpf_luma_inter_msa;
c->h_loop_filter_luma = ff_h264_h_lpf_luma_inter_msa;
c->h_loop_filter_luma_mbaff =
ff_h264_h_loop_filter_luma_mbaff_msa;
c->h264_v_loop_filter_luma_intra = ff_h264_v_lpf_luma_intra_msa;
c->h264_h_loop_filter_luma_intra = ff_h264_h_lpf_luma_intra_msa;
c->h264_h_loop_filter_luma_mbaff_intra =
c->v_loop_filter_luma_intra = ff_h264_v_lpf_luma_intra_msa;
c->h_loop_filter_luma_intra = ff_h264_h_lpf_luma_intra_msa;
c->h_loop_filter_luma_mbaff_intra =
ff_h264_h_loop_filter_luma_mbaff_intra_msa;
c->h264_v_loop_filter_chroma = ff_h264_v_lpf_chroma_inter_msa;
c->v_loop_filter_chroma = ff_h264_v_lpf_chroma_inter_msa;
if (chroma_format_idc <= 1)
c->h264_h_loop_filter_chroma = ff_h264_h_lpf_chroma_inter_msa;
c->h_loop_filter_chroma = ff_h264_h_lpf_chroma_inter_msa;
else
c->h264_h_loop_filter_chroma =
c->h_loop_filter_chroma =
ff_h264_h_loop_filter_chroma422_msa;
if (chroma_format_idc > 1)
c->h264_h_loop_filter_chroma_mbaff =
c->h_loop_filter_chroma_mbaff =
ff_h264_h_loop_filter_chroma422_mbaff_msa;
c->h264_v_loop_filter_chroma_intra =
c->v_loop_filter_chroma_intra =
ff_h264_v_lpf_chroma_intra_msa;
if (chroma_format_idc <= 1)
c->h264_h_loop_filter_chroma_intra =
c->h_loop_filter_chroma_intra =
ff_h264_h_lpf_chroma_intra_msa;
/* Weighted MC */
c->weight_h264_pixels_tab[0] = ff_weight_h264_pixels16_8_msa;
c->weight_h264_pixels_tab[1] = ff_weight_h264_pixels8_8_msa;
c->weight_h264_pixels_tab[2] = ff_weight_h264_pixels4_8_msa;
c->weight_pixels_tab[0] = ff_weight_h264_pixels16_8_msa;
c->weight_pixels_tab[1] = ff_weight_h264_pixels8_8_msa;
c->weight_pixels_tab[2] = ff_weight_h264_pixels4_8_msa;
c->biweight_h264_pixels_tab[0] = ff_biweight_h264_pixels16_8_msa;
c->biweight_h264_pixels_tab[1] = ff_biweight_h264_pixels8_8_msa;
c->biweight_h264_pixels_tab[2] = ff_biweight_h264_pixels4_8_msa;
c->biweight_pixels_tab[0] = ff_biweight_h264_pixels16_8_msa;
c->biweight_pixels_tab[1] = ff_biweight_h264_pixels8_8_msa;
c->biweight_pixels_tab[2] = ff_biweight_h264_pixels4_8_msa;
c->h264_idct_add = ff_h264_idct_add_msa;
c->h264_idct8_add = ff_h264_idct8_addblk_msa;
c->h264_idct_dc_add = ff_h264_idct4x4_addblk_dc_msa;
c->h264_idct8_dc_add = ff_h264_idct8_dc_addblk_msa;
c->h264_idct_add16 = ff_h264_idct_add16_msa;
c->h264_idct8_add4 = ff_h264_idct8_add4_msa;
c->idct_add = ff_h264_idct_add_msa;
c->idct8_add = ff_h264_idct8_addblk_msa;
c->idct_dc_add = ff_h264_idct4x4_addblk_dc_msa;
c->idct8_dc_add = ff_h264_idct8_dc_addblk_msa;
c->idct_add16 = ff_h264_idct_add16_msa;
c->idct8_add4 = ff_h264_idct8_add4_msa;
if (chroma_format_idc <= 1)
c->h264_idct_add8 = ff_h264_idct_add8_msa;
c->idct_add8 = ff_h264_idct_add8_msa;
else
c->h264_idct_add8 = ff_h264_idct_add8_422_msa;
c->idct_add8 = ff_h264_idct_add8_422_msa;
c->h264_idct_add16intra = ff_h264_idct_add16_intra_msa;
c->h264_luma_dc_dequant_idct = ff_h264_deq_idct_luma_dc_msa;
c->idct_add16intra = ff_h264_idct_add16_intra_msa;
c->luma_dc_dequant_idct = ff_h264_deq_idct_luma_dc_msa;
}
}
}

View File

@@ -793,22 +793,22 @@ av_cold void ff_h264dsp_init_ppc(H264DSPContext *c, const int bit_depth,
return;
if (bit_depth == 8) {
c->h264_idct_add = h264_idct_add_altivec;
c->idct_add = h264_idct_add_altivec;
if (chroma_format_idc <= 1)
c->h264_idct_add8 = h264_idct_add8_altivec;
c->h264_idct_add16 = h264_idct_add16_altivec;
c->h264_idct_add16intra = h264_idct_add16intra_altivec;
c->h264_idct_dc_add= h264_idct_dc_add_altivec;
c->h264_idct8_dc_add = h264_idct8_dc_add_altivec;
c->h264_idct8_add = h264_idct8_add_altivec;
c->h264_idct8_add4 = h264_idct8_add4_altivec;
c->h264_v_loop_filter_luma= h264_v_loop_filter_luma_altivec;
c->h264_h_loop_filter_luma= h264_h_loop_filter_luma_altivec;
c->idct_add8 = h264_idct_add8_altivec;
c->idct_add16 = h264_idct_add16_altivec;
c->idct_add16intra = h264_idct_add16intra_altivec;
c->idct_dc_add = h264_idct_dc_add_altivec;
c->idct8_dc_add = h264_idct8_dc_add_altivec;
c->idct8_add = h264_idct8_add_altivec;
c->idct8_add4 = h264_idct8_add4_altivec;
c->v_loop_filter_luma = h264_v_loop_filter_luma_altivec;
c->h_loop_filter_luma = h264_h_loop_filter_luma_altivec;
c->weight_h264_pixels_tab[0] = weight_h264_pixels16_altivec;
c->weight_h264_pixels_tab[1] = weight_h264_pixels8_altivec;
c->biweight_h264_pixels_tab[0] = biweight_h264_pixels16_altivec;
c->biweight_h264_pixels_tab[1] = biweight_h264_pixels8_altivec;
c->weight_pixels_tab[0] = weight_h264_pixels16_altivec;
c->weight_pixels_tab[1] = weight_h264_pixels8_altivec;
c->biweight_pixels_tab[0] = biweight_h264_pixels16_altivec;
c->biweight_pixels_tab[1] = biweight_h264_pixels8_altivec;
}
#endif /* HAVE_ALTIVEC */
}

View File

@@ -113,106 +113,106 @@ av_cold void ff_h264dsp_init_riscv(H264DSPContext *dsp, const int bit_depth,
if (bit_depth == 8) {
if (zvl128b) {
if (flags & AV_CPU_FLAG_RVB)
dsp->weight_h264_pixels_tab[0] =
dsp->weight_pixels_tab[0] =
ff_h264_weight_funcs_8_rvv[0].weight;
dsp->biweight_h264_pixels_tab[0] =
dsp->biweight_pixels_tab[0] =
ff_h264_weight_funcs_8_rvv[0].biweight;
}
if (flags & AV_CPU_FLAG_RVV_I64) {
dsp->weight_h264_pixels_tab[1] =
dsp->weight_pixels_tab[1] =
ff_h264_weight_funcs_8_rvv[1].weight;
dsp->biweight_h264_pixels_tab[1] =
dsp->biweight_pixels_tab[1] =
ff_h264_weight_funcs_8_rvv[1].biweight;
}
dsp->weight_h264_pixels_tab[2] =
dsp->weight_pixels_tab[2] =
ff_h264_weight_funcs_8_rvv[2].weight;
dsp->biweight_h264_pixels_tab[2] =
dsp->biweight_pixels_tab[2] =
ff_h264_weight_funcs_8_rvv[2].biweight;
dsp->weight_h264_pixels_tab[3] =
dsp->weight_pixels_tab[3] =
ff_h264_weight_funcs_8_rvv[3].weight;
dsp->biweight_h264_pixels_tab[3] =
dsp->biweight_pixels_tab[3] =
ff_h264_weight_funcs_8_rvv[3].biweight;
}
if (bit_depth == 8 && zvl128b) {
dsp->h264_v_loop_filter_luma = ff_h264_v_loop_filter_luma_8_rvv;
dsp->h264_h_loop_filter_luma = ff_h264_h_loop_filter_luma_8_rvv;
dsp->h264_h_loop_filter_luma_mbaff =
dsp->v_loop_filter_luma = ff_h264_v_loop_filter_luma_8_rvv;
dsp->h_loop_filter_luma = ff_h264_h_loop_filter_luma_8_rvv;
dsp->h_loop_filter_luma_mbaff =
ff_h264_h_loop_filter_luma_mbaff_8_rvv;
dsp->h264_v_loop_filter_luma_intra =
dsp->v_loop_filter_luma_intra =
ff_h264_v_loop_filter_luma_intra_8_rvv;
dsp->h264_h_loop_filter_luma_intra =
dsp->h_loop_filter_luma_intra =
ff_h264_h_loop_filter_luma_intra_8_rvv;
dsp->h264_h_loop_filter_luma_mbaff_intra =
dsp->h_loop_filter_luma_mbaff_intra =
ff_h264_h_loop_filter_luma_mbaff_intra_8_rvv;
dsp->h264_v_loop_filter_chroma =
dsp->v_loop_filter_chroma =
ff_h264_v_loop_filter_chroma_8_rvv;
dsp->h264_v_loop_filter_chroma_intra =
dsp->v_loop_filter_chroma_intra =
ff_h264_v_loop_filter_chroma_intra_8_rvv;
if (chroma_format_idc <= 1) {
dsp->h264_h_loop_filter_chroma =
dsp->h_loop_filter_chroma =
ff_h264_h_loop_filter_chroma_8_rvv;
dsp->h264_h_loop_filter_chroma_mbaff =
dsp->h_loop_filter_chroma_mbaff =
ff_h264_h_loop_filter_chroma_mbaff_8_rvv;
dsp->h264_h_loop_filter_chroma_intra =
dsp->h_loop_filter_chroma_intra =
ff_h264_h_loop_filter_chroma_intra_8_rvv;
dsp->h264_h_loop_filter_chroma_mbaff_intra =
dsp->h_loop_filter_chroma_mbaff_intra =
ff_h264_h_loop_filter_chroma_mbaff_intra_8_rvv;
}
dsp->h264_idct_add = ff_h264_idct_add_8_rvv;
dsp->h264_idct8_add = ff_h264_idct8_add_8_rvv;
dsp->idct_add = ff_h264_idct_add_8_rvv;
dsp->idct8_add = ff_h264_idct8_add_8_rvv;
if (flags & AV_CPU_FLAG_RVB) {
dsp->h264_idct_dc_add = ff_h264_idct4_dc_add_8_rvv;
dsp->h264_idct_add16 = ff_h264_idct_add16_8_rvv;
dsp->h264_idct_add16intra = ff_h264_idct_add16intra_8_rvv;
dsp->idct_dc_add = ff_h264_idct4_dc_add_8_rvv;
dsp->idct_add16 = ff_h264_idct_add16_8_rvv;
dsp->idct_add16intra = ff_h264_idct_add16intra_8_rvv;
# if __riscv_xlen == 64
dsp->h264_idct8_add4 = ff_h264_idct8_add4_8_rvv;
dsp->idct8_add4 = ff_h264_idct8_add4_8_rvv;
if (chroma_format_idc <= 1)
dsp->h264_idct_add8 = ff_h264_idct4_add8_8_rvv;
dsp->idct_add8 = ff_h264_idct4_add8_8_rvv;
else
dsp->h264_idct_add8 = ff_h264_idct4_add8_422_8_rvv;
dsp->idct_add8 = ff_h264_idct4_add8_422_8_rvv;
# endif
}
dsp->h264_luma_dc_dequant_idct =
dsp->luma_dc_dequant_idct =
ff_h264_luma_dc_dequant_idct_8_rvv;
if (flags & AV_CPU_FLAG_RVV_I64) {
dsp->h264_add_pixels8_clear = ff_h264_add_pixels8_8_rvv;
dsp->add_pixels8_clear = ff_h264_add_pixels8_8_rvv;
if (flags & AV_CPU_FLAG_RVB)
dsp->h264_idct8_dc_add = ff_h264_idct8_dc_add_8_rvv;
dsp->idct8_dc_add = ff_h264_idct8_dc_add_8_rvv;
}
dsp->h264_add_pixels4_clear = ff_h264_add_pixels4_8_rvv;
dsp->add_pixels4_clear = ff_h264_add_pixels4_8_rvv;
}
#define IDCT_DEPTH(depth) \
if (bit_depth == depth) { \
if (zvl128b) { \
dsp->h264_idct_add = ff_h264_idct_add_##depth##_rvv; \
dsp->h264_luma_dc_dequant_idct = \
dsp->idct_add = ff_h264_idct_add_##depth##_rvv; \
dsp->luma_dc_dequant_idct = \
ff_h264_luma_dc_dequant_idct_9_rvv; \
} \
if (flags & AV_CPU_FLAG_RVB) \
dsp->h264_idct8_add = ff_h264_idct8_add_##depth##_rvv; \
dsp->idct8_add = ff_h264_idct8_add_##depth##_rvv; \
if (zvl128b && (flags & AV_CPU_FLAG_RVB)) { \
dsp->h264_idct_dc_add = ff_h264_idct4_dc_add_##depth##_rvv; \
dsp->h264_idct8_dc_add = ff_h264_idct8_dc_add_##depth##_rvv; \
dsp->h264_idct_add16 = ff_h264_idct_add16_##depth##_rvv; \
dsp->h264_idct_add16intra = \
dsp->idct_dc_add = ff_h264_idct4_dc_add_##depth##_rvv; \
dsp->idct8_dc_add = ff_h264_idct8_dc_add_##depth##_rvv; \
dsp->idct_add16 = ff_h264_idct_add16_##depth##_rvv; \
dsp->idct_add16intra = \
ff_h264_idct_add16intra_##depth##_rvv; \
if (__riscv_xlen == 64) { \
if (chroma_format_idc <= 1) \
dsp->h264_idct_add8 = \
dsp->idct_add8 = \
ff_h264_idct4_add8_##depth##_rvv; \
else \
dsp->h264_idct_add8 = \
dsp->idct_add8 = \
ff_h264_idct4_add8_422_##depth##_rvv; \
} \
} \
if (__riscv_xlen == 64 && (flags & AV_CPU_FLAG_RVB)) \
dsp->h264_idct8_add4 = ff_h264_idct8_add4_##depth##_rvv; \
dsp->idct8_add4 = ff_h264_idct8_add4_##depth##_rvv; \
}
IDCT_DEPTH(9)
@@ -221,9 +221,9 @@ av_cold void ff_h264dsp_init_riscv(H264DSPContext *dsp, const int bit_depth,
IDCT_DEPTH(14)
if (bit_depth > 8 && zvl128b) {
dsp->h264_add_pixels8_clear = ff_h264_add_pixels8_16_rvv;
dsp->add_pixels8_clear = ff_h264_add_pixels8_16_rvv;
if (flags & AV_CPU_FLAG_RVV_I64)
dsp->h264_add_pixels4_clear = ff_h264_add_pixels4_16_rvv;
dsp->add_pixels4_clear = ff_h264_add_pixels4_16_rvv;
}
dsp->startcode_find_candidate = ff_startcode_find_candidate_rvv;

View File

@@ -696,10 +696,10 @@ static void hl_decode_mb(SVQ3Context *s)
if (s->cbp & 0x30) {
uint8_t *dest[2] = { dest_cb, dest_cr };
s->h264dsp.h264_chroma_dc_dequant_idct(s->mb + 16 * 16 * 1,
s->dequant4_coeff[4][0]);
s->h264dsp.h264_chroma_dc_dequant_idct(s->mb + 16 * 16 * 2,
s->dequant4_coeff[4][0]);
s->h264dsp.chroma_dc_dequant_idct(s->mb + 16 * 16 * 1,
s->dequant4_coeff[4][0]);
s->h264dsp.chroma_dc_dequant_idct(s->mb + 16 * 16 * 2,
s->dequant4_coeff[4][0]);
for (j = 1; j < 3; j++) {
for (i = j * 16; i < j * 16 + 4; i++)
if (s->non_zero_count_cache[scan8[i]] || s->mb[i * 16]) {

View File

@@ -188,163 +188,163 @@ av_cold void ff_h264dsp_init_x86(H264DSPContext *c, const int bit_depth,
int cpu_flags = av_get_cpu_flags();
if (EXTERNAL_MMXEXT(cpu_flags) && chroma_format_idc <= 1)
c->h264_loop_filter_strength = ff_h264_loop_filter_strength_mmxext;
c->loop_filter_strength = ff_h264_loop_filter_strength_mmxext;
if (bit_depth == 8) {
if (EXTERNAL_MMX(cpu_flags)) {
if (chroma_format_idc <= 1) {
} else {
c->h264_idct_add8 = ff_h264_idct_add8_422_8_mmx;
c->idct_add8 = ff_h264_idct_add8_422_8_mmx;
}
}
if (EXTERNAL_MMXEXT(cpu_flags)) {
c->h264_idct8_dc_add = ff_h264_idct8_dc_add_8_mmxext;
c->idct8_dc_add = ff_h264_idct8_dc_add_8_mmxext;
c->weight_h264_pixels_tab[2] = ff_h264_weight_4_mmxext;
c->weight_pixels_tab[2] = ff_h264_weight_4_mmxext;
c->biweight_h264_pixels_tab[2] = ff_h264_biweight_4_mmxext;
c->biweight_pixels_tab[2] = ff_h264_biweight_4_mmxext;
}
if (EXTERNAL_SSE2(cpu_flags)) {
c->h264_idct8_add = ff_h264_idct8_add_8_sse2;
c->idct8_add = ff_h264_idct8_add_8_sse2;
c->h264_idct_add16 = ff_h264_idct_add16_8_sse2;
c->h264_idct8_add4 = ff_h264_idct8_add4_8_sse2;
c->idct_add16 = ff_h264_idct_add16_8_sse2;
c->idct8_add4 = ff_h264_idct8_add4_8_sse2;
if (chroma_format_idc <= 1)
c->h264_idct_add8 = ff_h264_idct_add8_8_sse2;
c->h264_idct_add16intra = ff_h264_idct_add16intra_8_sse2;
c->h264_luma_dc_dequant_idct = ff_h264_luma_dc_dequant_idct_sse2;
c->idct_add8 = ff_h264_idct_add8_8_sse2;
c->idct_add16intra = ff_h264_idct_add16intra_8_sse2;
c->luma_dc_dequant_idct = ff_h264_luma_dc_dequant_idct_sse2;
c->weight_h264_pixels_tab[0] = ff_h264_weight_16_sse2;
c->weight_h264_pixels_tab[1] = ff_h264_weight_8_sse2;
c->weight_pixels_tab[0] = ff_h264_weight_16_sse2;
c->weight_pixels_tab[1] = ff_h264_weight_8_sse2;
c->biweight_h264_pixels_tab[0] = ff_h264_biweight_16_sse2;
c->biweight_h264_pixels_tab[1] = ff_h264_biweight_8_sse2;
c->biweight_pixels_tab[0] = ff_h264_biweight_16_sse2;
c->biweight_pixels_tab[1] = ff_h264_biweight_8_sse2;
c->h264_v_loop_filter_luma = ff_deblock_v_luma_8_sse2;
c->h264_h_loop_filter_luma = ff_deblock_h_luma_8_sse2;
c->h264_v_loop_filter_luma_intra = ff_deblock_v_luma_intra_8_sse2;
c->h264_h_loop_filter_luma_intra = ff_deblock_h_luma_intra_8_sse2;
c->v_loop_filter_luma = ff_deblock_v_luma_8_sse2;
c->h_loop_filter_luma = ff_deblock_h_luma_8_sse2;
c->v_loop_filter_luma_intra = ff_deblock_v_luma_intra_8_sse2;
c->h_loop_filter_luma_intra = ff_deblock_h_luma_intra_8_sse2;
#if ARCH_X86_64
c->h264_h_loop_filter_luma_mbaff = ff_deblock_h_luma_mbaff_8_sse2;
c->h_loop_filter_luma_mbaff = ff_deblock_h_luma_mbaff_8_sse2;
#endif
c->h264_v_loop_filter_chroma = ff_deblock_v_chroma_8_sse2;
c->h264_v_loop_filter_chroma_intra = ff_deblock_v_chroma_intra_8_sse2;
c->v_loop_filter_chroma = ff_deblock_v_chroma_8_sse2;
c->v_loop_filter_chroma_intra = ff_deblock_v_chroma_intra_8_sse2;
if (chroma_format_idc <= 1) {
c->h264_h_loop_filter_chroma = ff_deblock_h_chroma_8_sse2;
c->h264_h_loop_filter_chroma_intra = ff_deblock_h_chroma_intra_8_sse2;
c->h_loop_filter_chroma = ff_deblock_h_chroma_8_sse2;
c->h_loop_filter_chroma_intra = ff_deblock_h_chroma_intra_8_sse2;
} else {
c->h264_h_loop_filter_chroma = ff_deblock_h_chroma422_8_sse2;
c->h264_h_loop_filter_chroma_intra = ff_deblock_h_chroma422_intra_8_sse2;
c->h_loop_filter_chroma = ff_deblock_h_chroma422_8_sse2;
c->h_loop_filter_chroma_intra = ff_deblock_h_chroma422_intra_8_sse2;
}
c->h264_idct_add = ff_h264_idct_add_8_sse2;
c->h264_idct_dc_add = ff_h264_idct_dc_add_8_sse2;
c->idct_add = ff_h264_idct_add_8_sse2;
c->idct_dc_add = ff_h264_idct_dc_add_8_sse2;
}
if (EXTERNAL_SSSE3(cpu_flags)) {
c->biweight_h264_pixels_tab[0] = ff_h264_biweight_16_ssse3;
c->biweight_h264_pixels_tab[1] = ff_h264_biweight_8_ssse3;
c->biweight_pixels_tab[0] = ff_h264_biweight_16_ssse3;
c->biweight_pixels_tab[1] = ff_h264_biweight_8_ssse3;
}
if (EXTERNAL_AVX(cpu_flags)) {
c->h264_v_loop_filter_luma = ff_deblock_v_luma_8_avx;
c->h264_h_loop_filter_luma = ff_deblock_h_luma_8_avx;
c->h264_v_loop_filter_luma_intra = ff_deblock_v_luma_intra_8_avx;
c->h264_h_loop_filter_luma_intra = ff_deblock_h_luma_intra_8_avx;
c->v_loop_filter_luma = ff_deblock_v_luma_8_avx;
c->h_loop_filter_luma = ff_deblock_h_luma_8_avx;
c->v_loop_filter_luma_intra = ff_deblock_v_luma_intra_8_avx;
c->h_loop_filter_luma_intra = ff_deblock_h_luma_intra_8_avx;
#if ARCH_X86_64
c->h264_h_loop_filter_luma_mbaff = ff_deblock_h_luma_mbaff_8_avx;
c->h_loop_filter_luma_mbaff = ff_deblock_h_luma_mbaff_8_avx;
#endif
c->h264_v_loop_filter_chroma = ff_deblock_v_chroma_8_avx;
c->h264_v_loop_filter_chroma_intra = ff_deblock_v_chroma_intra_8_avx;
c->v_loop_filter_chroma = ff_deblock_v_chroma_8_avx;
c->v_loop_filter_chroma_intra = ff_deblock_v_chroma_intra_8_avx;
if (chroma_format_idc <= 1) {
c->h264_h_loop_filter_chroma = ff_deblock_h_chroma_8_avx;
c->h264_h_loop_filter_chroma_intra = ff_deblock_h_chroma_intra_8_avx;
c->h_loop_filter_chroma = ff_deblock_h_chroma_8_avx;
c->h_loop_filter_chroma_intra = ff_deblock_h_chroma_intra_8_avx;
} else {
c->h264_h_loop_filter_chroma = ff_deblock_h_chroma422_8_avx;
c->h264_h_loop_filter_chroma_intra = ff_deblock_h_chroma422_intra_8_avx;
c->h_loop_filter_chroma = ff_deblock_h_chroma422_8_avx;
c->h_loop_filter_chroma_intra = ff_deblock_h_chroma422_intra_8_avx;
}
c->h264_idct_add = ff_h264_idct_add_8_avx;
c->h264_idct_dc_add = ff_h264_idct_dc_add_8_avx;
c->idct_add = ff_h264_idct_add_8_avx;
c->idct_dc_add = ff_h264_idct_dc_add_8_avx;
}
} else if (bit_depth == 10) {
if (EXTERNAL_MMXEXT(cpu_flags)) {
c->h264_idct_dc_add = ff_h264_idct_dc_add_10_mmxext;
c->idct_dc_add = ff_h264_idct_dc_add_10_mmxext;
}
if (EXTERNAL_SSE2(cpu_flags)) {
c->h264_idct_add = ff_h264_idct_add_10_sse2;
c->h264_idct8_dc_add = ff_h264_idct8_dc_add_10_sse2;
c->idct_add = ff_h264_idct_add_10_sse2;
c->idct8_dc_add = ff_h264_idct8_dc_add_10_sse2;
c->h264_idct_add16 = ff_h264_idct_add16_10_sse2;
c->idct_add16 = ff_h264_idct_add16_10_sse2;
if (chroma_format_idc <= 1) {
c->h264_idct_add8 = ff_h264_idct_add8_10_sse2;
c->idct_add8 = ff_h264_idct_add8_10_sse2;
} else {
c->h264_idct_add8 = ff_h264_idct_add8_422_10_sse2;
c->idct_add8 = ff_h264_idct_add8_422_10_sse2;
}
c->h264_idct_add16intra = ff_h264_idct_add16intra_10_sse2;
c->idct_add16intra = ff_h264_idct_add16intra_10_sse2;
#if HAVE_ALIGNED_STACK
c->h264_idct8_add = ff_h264_idct8_add_10_sse2;
c->h264_idct8_add4 = ff_h264_idct8_add4_10_sse2;
c->idct8_add = ff_h264_idct8_add_10_sse2;
c->idct8_add4 = ff_h264_idct8_add4_10_sse2;
#endif /* HAVE_ALIGNED_STACK */
c->weight_h264_pixels_tab[0] = ff_h264_weight_16_10_sse2;
c->weight_h264_pixels_tab[1] = ff_h264_weight_8_10_sse2;
c->weight_h264_pixels_tab[2] = ff_h264_weight_4_10_sse2;
c->weight_pixels_tab[0] = ff_h264_weight_16_10_sse2;
c->weight_pixels_tab[1] = ff_h264_weight_8_10_sse2;
c->weight_pixels_tab[2] = ff_h264_weight_4_10_sse2;
c->biweight_h264_pixels_tab[0] = ff_h264_biweight_16_10_sse2;
c->biweight_h264_pixels_tab[1] = ff_h264_biweight_8_10_sse2;
c->biweight_h264_pixels_tab[2] = ff_h264_biweight_4_10_sse2;
c->biweight_pixels_tab[0] = ff_h264_biweight_16_10_sse2;
c->biweight_pixels_tab[1] = ff_h264_biweight_8_10_sse2;
c->biweight_pixels_tab[2] = ff_h264_biweight_4_10_sse2;
c->h264_v_loop_filter_chroma = ff_deblock_v_chroma_10_sse2;
c->h264_v_loop_filter_chroma_intra = ff_deblock_v_chroma_intra_10_sse2;
c->v_loop_filter_chroma = ff_deblock_v_chroma_10_sse2;
c->v_loop_filter_chroma_intra = ff_deblock_v_chroma_intra_10_sse2;
if (chroma_format_idc <= 1) {
c->h264_h_loop_filter_chroma = ff_deblock_h_chroma_10_sse2;
c->h_loop_filter_chroma = ff_deblock_h_chroma_10_sse2;
} else {
c->h264_h_loop_filter_chroma = ff_deblock_h_chroma422_10_sse2;
c->h_loop_filter_chroma = ff_deblock_h_chroma422_10_sse2;
}
c->h264_v_loop_filter_luma = ff_deblock_v_luma_10_sse2;
c->h264_h_loop_filter_luma = ff_deblock_h_luma_10_sse2;
c->h264_v_loop_filter_luma_intra = ff_deblock_v_luma_intra_10_sse2;
c->h264_h_loop_filter_luma_intra = ff_deblock_h_luma_intra_10_sse2;
c->v_loop_filter_luma = ff_deblock_v_luma_10_sse2;
c->h_loop_filter_luma = ff_deblock_h_luma_10_sse2;
c->v_loop_filter_luma_intra = ff_deblock_v_luma_intra_10_sse2;
c->h_loop_filter_luma_intra = ff_deblock_h_luma_intra_10_sse2;
}
if (EXTERNAL_SSE4(cpu_flags)) {
c->weight_h264_pixels_tab[0] = ff_h264_weight_16_10_sse4;
c->weight_h264_pixels_tab[1] = ff_h264_weight_8_10_sse4;
c->weight_h264_pixels_tab[2] = ff_h264_weight_4_10_sse4;
c->weight_pixels_tab[0] = ff_h264_weight_16_10_sse4;
c->weight_pixels_tab[1] = ff_h264_weight_8_10_sse4;
c->weight_pixels_tab[2] = ff_h264_weight_4_10_sse4;
c->biweight_h264_pixels_tab[0] = ff_h264_biweight_16_10_sse4;
c->biweight_h264_pixels_tab[1] = ff_h264_biweight_8_10_sse4;
c->biweight_h264_pixels_tab[2] = ff_h264_biweight_4_10_sse4;
c->biweight_pixels_tab[0] = ff_h264_biweight_16_10_sse4;
c->biweight_pixels_tab[1] = ff_h264_biweight_8_10_sse4;
c->biweight_pixels_tab[2] = ff_h264_biweight_4_10_sse4;
}
if (EXTERNAL_AVX(cpu_flags)) {
c->h264_idct_dc_add =
c->h264_idct_add = ff_h264_idct_add_10_avx;
c->h264_idct8_dc_add = ff_h264_idct8_dc_add_10_avx;
c->idct_dc_add =
c->idct_add = ff_h264_idct_add_10_avx;
c->idct8_dc_add = ff_h264_idct8_dc_add_10_avx;
c->h264_idct_add16 = ff_h264_idct_add16_10_avx;
c->idct_add16 = ff_h264_idct_add16_10_avx;
if (chroma_format_idc <= 1) {
c->h264_idct_add8 = ff_h264_idct_add8_10_avx;
c->idct_add8 = ff_h264_idct_add8_10_avx;
} else {
c->h264_idct_add8 = ff_h264_idct_add8_422_10_avx;
c->idct_add8 = ff_h264_idct_add8_422_10_avx;
}
c->h264_idct_add16intra = ff_h264_idct_add16intra_10_avx;
c->idct_add16intra = ff_h264_idct_add16intra_10_avx;
#if HAVE_ALIGNED_STACK
c->h264_idct8_add = ff_h264_idct8_add_10_avx;
c->h264_idct8_add4 = ff_h264_idct8_add4_10_avx;
c->idct8_add = ff_h264_idct8_add_10_avx;
c->idct8_add4 = ff_h264_idct8_add4_10_avx;
#endif /* HAVE_ALIGNED_STACK */
c->h264_v_loop_filter_chroma = ff_deblock_v_chroma_10_avx;
c->h264_v_loop_filter_chroma_intra = ff_deblock_v_chroma_intra_10_avx;
c->v_loop_filter_chroma = ff_deblock_v_chroma_10_avx;
c->v_loop_filter_chroma_intra = ff_deblock_v_chroma_intra_10_avx;
if (chroma_format_idc <= 1) {
c->h264_h_loop_filter_chroma = ff_deblock_h_chroma_10_avx;
c->h_loop_filter_chroma = ff_deblock_h_chroma_10_avx;
} else {
c->h264_h_loop_filter_chroma = ff_deblock_h_chroma422_10_avx;
c->h_loop_filter_chroma = ff_deblock_h_chroma422_10_avx;
}
c->h264_v_loop_filter_luma = ff_deblock_v_luma_10_avx;
c->h264_h_loop_filter_luma = ff_deblock_h_luma_10_avx;
c->h264_v_loop_filter_luma_intra = ff_deblock_v_luma_intra_10_avx;
c->h264_h_loop_filter_luma_intra = ff_deblock_h_luma_intra_10_avx;
c->v_loop_filter_luma = ff_deblock_v_luma_10_avx;
c->h_loop_filter_luma = ff_deblock_h_luma_10_avx;
c->v_loop_filter_luma_intra = ff_deblock_v_luma_intra_10_avx;
c->h_loop_filter_luma_intra = ff_deblock_h_luma_intra_10_avx;
}
}
}

View File

@@ -194,8 +194,8 @@ static void check_idct(void)
for (sz = 4; sz <= 8; sz += 4) {
void (*idct)(uint8_t *, int16_t *, int) = NULL;
const char fmts[3][28] = {
"h264_idct%d_add_%dbpp", "h264_idct%d_dc_add_%dbpp",
"h264_add_pixels%d_%dbpp",
"idct%d_add_%dbpp", "idct%d_dc_add_%dbpp",
"add_pixels%d_%dbpp",
};
randomize_buffers(i);
@@ -206,12 +206,12 @@ static void check_idct(void)
dct8x8(coef, bit_depth);
switch ((sz << 2) | dc) {
case (4 << 2) | 0: idct = h.h264_idct_add; break;
case (4 << 2) | 1: idct = h.h264_idct_dc_add; break;
case (4 << 2) | 2: idct = h.h264_add_pixels4_clear; break;
case (8 << 2) | 0: idct = h.h264_idct8_add; break;
case (8 << 2) | 1: idct = h.h264_idct8_dc_add; break;
case (8 << 2) | 2: idct = h.h264_add_pixels8_clear; break;
case (4 << 2) | 0: idct = h.idct_add; break;
case (4 << 2) | 1: idct = h.idct_dc_add; break;
case (4 << 2) | 2: idct = h.add_pixels4_clear; break;
case (8 << 2) | 0: idct = h.idct8_add; break;
case (8 << 2) | 1: idct = h.idct8_dc_add; break;
case (8 << 2) | 2: idct = h.add_pixels8_clear; break;
}
if (check_func(idct, fmts[dc], sz, bit_depth)) {
@@ -261,17 +261,17 @@ static void check_idct_multiple(void)
int block_offset[16] = { 0 };
switch (func) {
case 0:
idct = h.h264_idct_add16;
name = "h264_idct_add16";
idct = h.idct_add16;
name = "idct_add16";
break;
case 1:
idct = h.h264_idct_add16intra;
name = "h264_idct_add16intra";
idct = h.idct_add16intra;
name = "idct_add16intra";
intra = 1;
break;
case 2:
idct = h.h264_idct8_add4;
name = "h264_idct8_add4";
idct = h.idct8_add4;
name = "idct8_add4";
sz = 8;
break;
}
@@ -361,7 +361,7 @@ static void check_idct_dequant(void)
memset(dst_ref, 0, 16 * 16 * SIZEOF_COEF);
memset(dst_new, 0, 16 * 16 * SIZEOF_COEF);
if (check_func(h.h264_luma_dc_dequant_idct, "h264_luma_dc_dequant_idct_%d", bit_depth)) {
if (check_func(h.luma_dc_dequant_idct, "luma_dc_dequant_idct_%d", bit_depth)) {
call_ref(dst_ref, src, qmul);
call_new(dst_new, src, qmul);
@@ -425,16 +425,16 @@ static void check_loop_filter(void)
} \
} while (0)
CHECK_LOOP_FILTER(h264_v_loop_filter_luma, 1,);
CHECK_LOOP_FILTER(h264_h_loop_filter_luma, 0,);
CHECK_LOOP_FILTER(h264_h_loop_filter_luma_mbaff, 0,);
CHECK_LOOP_FILTER(h264_v_loop_filter_chroma, 1,);
CHECK_LOOP_FILTER(h264_h_loop_filter_chroma, 0,);
CHECK_LOOP_FILTER(h264_h_loop_filter_chroma_mbaff, 0,);
CHECK_LOOP_FILTER(v_loop_filter_luma, 1,);
CHECK_LOOP_FILTER(h_loop_filter_luma, 0,);
CHECK_LOOP_FILTER(h_loop_filter_luma_mbaff, 0,);
CHECK_LOOP_FILTER(v_loop_filter_chroma, 1,);
CHECK_LOOP_FILTER(h_loop_filter_chroma, 0,);
CHECK_LOOP_FILTER(h_loop_filter_chroma_mbaff, 0,);
ff_h264dsp_init(&h, bit_depth, 2);
CHECK_LOOP_FILTER(h264_h_loop_filter_chroma, 0, 422);
CHECK_LOOP_FILTER(h264_h_loop_filter_chroma_mbaff, 0, 422);
CHECK_LOOP_FILTER(h_loop_filter_chroma, 0, 422);
CHECK_LOOP_FILTER(h_loop_filter_chroma_mbaff, 0, 422);
#undef CHECK_LOOP_FILTER
}
}
@@ -486,16 +486,16 @@ static void check_loop_filter_intra(void)
} \
} while (0)
CHECK_LOOP_FILTER(h264_v_loop_filter_luma_intra, 1,);
CHECK_LOOP_FILTER(h264_h_loop_filter_luma_intra, 0,);
CHECK_LOOP_FILTER(h264_h_loop_filter_luma_mbaff_intra, 0,);
CHECK_LOOP_FILTER(h264_v_loop_filter_chroma_intra, 1,);
CHECK_LOOP_FILTER(h264_h_loop_filter_chroma_intra, 0,);
CHECK_LOOP_FILTER(h264_h_loop_filter_chroma_mbaff_intra, 0,);
CHECK_LOOP_FILTER(v_loop_filter_luma_intra, 1,);
CHECK_LOOP_FILTER(h_loop_filter_luma_intra, 0,);
CHECK_LOOP_FILTER(h_loop_filter_luma_mbaff_intra, 0,);
CHECK_LOOP_FILTER(v_loop_filter_chroma_intra, 1,);
CHECK_LOOP_FILTER(h_loop_filter_chroma_intra, 0,);
CHECK_LOOP_FILTER(h_loop_filter_chroma_mbaff_intra, 0,);
ff_h264dsp_init(&h, bit_depth, 2);
CHECK_LOOP_FILTER(h264_h_loop_filter_chroma_intra, 0, 422);
CHECK_LOOP_FILTER(h264_h_loop_filter_chroma_mbaff_intra, 0, 422);
CHECK_LOOP_FILTER(h_loop_filter_chroma_intra, 0, 422);
CHECK_LOOP_FILTER(h_loop_filter_chroma_mbaff_intra, 0, 422);
#undef CHECK_LOOP_FILTER
}
}