Browse Source

avcodec/mips: MSA (MIPS-SIMD-Arch) optimizations for HEVC mc epel functions

This patch adds MSA (MIPS-SIMD-Arch) optimizations for HEVC mc epel functions.

Signed-off-by: Shivraj Patil <shivraj.patil@imgtec.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
tags/n2.7
Shivraj Patil Michael Niedermayer 10 years ago
parent
commit
c96c73b0b0
3 changed files with 2327 additions and 0 deletions
  1. +32
    -0
      libavcodec/mips/hevcdsp_init_mips.c
  2. +30
    -0
      libavcodec/mips/hevcdsp_mips.h
  3. +2265
    -0
      libavcodec/mips/hevcdsp_msa.c

+ 32
- 0
libavcodec/mips/hevcdsp_init_mips.c View File

@@ -62,6 +62,38 @@ static av_cold void hevc_dsp_init_msa(HEVCDSPContext *c,
c->put_hevc_qpel[8][1][1] = ff_hevc_put_hevc_qpel_hv48_8_msa;
c->put_hevc_qpel[9][1][1] = ff_hevc_put_hevc_qpel_hv64_8_msa;

c->put_hevc_epel[1][0][0] = ff_hevc_put_hevc_pel_pixels4_8_msa;
c->put_hevc_epel[2][0][0] = ff_hevc_put_hevc_pel_pixels6_8_msa;
c->put_hevc_epel[3][0][0] = ff_hevc_put_hevc_pel_pixels8_8_msa;
c->put_hevc_epel[4][0][0] = ff_hevc_put_hevc_pel_pixels12_8_msa;
c->put_hevc_epel[5][0][0] = ff_hevc_put_hevc_pel_pixels16_8_msa;
c->put_hevc_epel[6][0][0] = ff_hevc_put_hevc_pel_pixels24_8_msa;
c->put_hevc_epel[7][0][0] = ff_hevc_put_hevc_pel_pixels32_8_msa;

c->put_hevc_epel[1][0][1] = ff_hevc_put_hevc_epel_h4_8_msa;
c->put_hevc_epel[2][0][1] = ff_hevc_put_hevc_epel_h6_8_msa;
c->put_hevc_epel[3][0][1] = ff_hevc_put_hevc_epel_h8_8_msa;
c->put_hevc_epel[4][0][1] = ff_hevc_put_hevc_epel_h12_8_msa;
c->put_hevc_epel[5][0][1] = ff_hevc_put_hevc_epel_h16_8_msa;
c->put_hevc_epel[6][0][1] = ff_hevc_put_hevc_epel_h24_8_msa;
c->put_hevc_epel[7][0][1] = ff_hevc_put_hevc_epel_h32_8_msa;

c->put_hevc_epel[1][1][0] = ff_hevc_put_hevc_epel_v4_8_msa;
c->put_hevc_epel[2][1][0] = ff_hevc_put_hevc_epel_v6_8_msa;
c->put_hevc_epel[3][1][0] = ff_hevc_put_hevc_epel_v8_8_msa;
c->put_hevc_epel[4][1][0] = ff_hevc_put_hevc_epel_v12_8_msa;
c->put_hevc_epel[5][1][0] = ff_hevc_put_hevc_epel_v16_8_msa;
c->put_hevc_epel[6][1][0] = ff_hevc_put_hevc_epel_v24_8_msa;
c->put_hevc_epel[7][1][0] = ff_hevc_put_hevc_epel_v32_8_msa;

c->put_hevc_epel[1][1][1] = ff_hevc_put_hevc_epel_hv4_8_msa;
c->put_hevc_epel[2][1][1] = ff_hevc_put_hevc_epel_hv6_8_msa;
c->put_hevc_epel[3][1][1] = ff_hevc_put_hevc_epel_hv8_8_msa;
c->put_hevc_epel[4][1][1] = ff_hevc_put_hevc_epel_hv12_8_msa;
c->put_hevc_epel[5][1][1] = ff_hevc_put_hevc_epel_hv16_8_msa;
c->put_hevc_epel[6][1][1] = ff_hevc_put_hevc_epel_hv24_8_msa;
c->put_hevc_epel[7][1][1] = ff_hevc_put_hevc_epel_hv32_8_msa;

c->put_hevc_qpel_uni[3][0][0] = ff_hevc_put_hevc_uni_pel_pixels8_8_msa;
c->put_hevc_qpel_uni[4][0][0] = ff_hevc_put_hevc_uni_pel_pixels12_8_msa;
c->put_hevc_qpel_uni[5][0][0] = ff_hevc_put_hevc_uni_pel_pixels16_8_msa;


+ 30
- 0
libavcodec/mips/hevcdsp_mips.h View File

@@ -66,6 +66,36 @@ MC(qpel, hv, 32);
MC(qpel, hv, 48);
MC(qpel, hv, 64);

MC(epel, h, 4);
MC(epel, h, 6);
MC(epel, h, 8);
MC(epel, h, 12);
MC(epel, h, 16);
MC(epel, h, 24);
MC(epel, h, 32);
MC(epel, h, 48);
MC(epel, h, 64);

MC(epel, v, 4);
MC(epel, v, 6);
MC(epel, v, 8);
MC(epel, v, 12);
MC(epel, v, 16);
MC(epel, v, 24);
MC(epel, v, 32);
MC(epel, v, 48);
MC(epel, v, 64);

MC(epel, hv, 4);
MC(epel, hv, 6);
MC(epel, hv, 8);
MC(epel, hv, 12);
MC(epel, hv, 16);
MC(epel, hv, 24);
MC(epel, hv, 32);
MC(epel, hv, 48);
MC(epel, hv, 64);

#undef MC

#define UNI_MC(PEL, DIR, WIDTH) \


+ 2265
- 0
libavcodec/mips/hevcdsp_msa.c
File diff suppressed because it is too large
View File


Loading…
Cancel
Save