/*****************************************************************************
* dct.c: transform and zigzag
*****************************************************************************
- * Copyright (C) 2003-2014 x264 project
+ * Copyright (C) 2003-2016 x264 project
*
* Authors: Loren Merritt <lorenm@u.washington.edu>
* Laurent Aimar <fenrir@via.ecp.fr>
#if ARCH_AARCH64
# include "aarch64/dct.h"
#endif
+#if ARCH_MIPS
+# include "mips/dct.h"
+#endif
/* the inverse of the scaling factors introduced by 8x8 fdct */
/* uint32 is for the asm implementation of trellis. the actual values fit in uint16. */
dctf->add4x4_idct = x264_add4x4_idct_sse2;
dctf->dct4x4dc = x264_dct4x4dc_sse2;
dctf->idct4x4dc = x264_idct4x4dc_sse2;
+ dctf->dct2x4dc = x264_dct2x4dc_sse2;
dctf->sub8x8_dct8 = x264_sub8x8_dct8_sse2;
dctf->sub16x16_dct8 = x264_sub16x16_dct8_sse2;
dctf->add8x8_idct = x264_add8x8_idct_sse2;
dctf->add4x4_idct = x264_add4x4_idct_avx;
dctf->dct4x4dc = x264_dct4x4dc_avx;
dctf->idct4x4dc = x264_idct4x4dc_avx;
+ dctf->dct2x4dc = x264_dct2x4dc_avx;
dctf->sub8x8_dct8 = x264_sub8x8_dct8_avx;
dctf->sub16x16_dct8 = x264_sub16x16_dct8_avx;
dctf->add8x8_idct = x264_add8x8_idct_avx;
{
dctf->sub4x4_dct = x264_sub4x4_dct_mmx;
dctf->add4x4_idct = x264_add4x4_idct_mmx;
- dctf->dct4x4dc = x264_dct4x4dc_mmx;
dctf->idct4x4dc = x264_idct4x4dc_mmx;
dctf->sub8x8_dct_dc = x264_sub8x8_dct_dc_mmx2;
if( cpu&X264_CPU_MMX2 )
{
+ dctf->dct4x4dc = x264_dct4x4dc_mmx2;
+ dctf->dct2x4dc = x264_dct2x4dc_mmx2;
dctf->add8x8_idct_dc = x264_add8x8_idct_dc_mmx2;
dctf->add16x16_idct_dc = x264_add16x16_idct_dc_mmx2;
}
dctf->add8x8_idct8 = x264_add8x8_idct8_neon;
dctf->add16x16_idct8= x264_add16x16_idct8_neon;
+ dctf->sub8x16_dct_dc= x264_sub8x16_dct_dc_neon;
+ }
+#endif
+
+#if HAVE_MSA
+ if( cpu&X264_CPU_MSA )
+ {
+ dctf->sub4x4_dct = x264_sub4x4_dct_msa;
+ dctf->sub8x8_dct = x264_sub8x8_dct_msa;
+ dctf->sub16x16_dct = x264_sub16x16_dct_msa;
+ dctf->sub8x8_dct_dc = x264_sub8x8_dct_dc_msa;
+ dctf->sub8x16_dct_dc = x264_sub8x16_dct_dc_msa;
+ dctf->dct4x4dc = x264_dct4x4dc_msa;
+ dctf->idct4x4dc = x264_idct4x4dc_msa;
+ dctf->add4x4_idct = x264_add4x4_idct_msa;
+ dctf->add8x8_idct = x264_add8x8_idct_msa;
+ dctf->add8x8_idct_dc = x264_add8x8_idct_dc_msa;
+ dctf->add16x16_idct = x264_add16x16_idct_msa;
+ dctf->add16x16_idct_dc = x264_add16x16_idct_dc_msa;
+ dctf->add8x8_idct8 = x264_add8x8_idct8_msa;
+ dctf->add16x16_idct8 = x264_add16x16_idct8_msa;
}
#endif
+
#endif // HIGH_BIT_DEPTH
}
#endif
#if HAVE_ARMV6 || ARCH_AARCH64
if( cpu&X264_CPU_NEON )
- pf_progressive->scan_4x4 = x264_zigzag_scan_4x4_frame_neon;
+ {
+ pf_progressive->scan_4x4 = x264_zigzag_scan_4x4_frame_neon;
+#if ARCH_AARCH64
+ pf_interlaced->scan_4x4 = x264_zigzag_scan_4x4_field_neon;
+ pf_interlaced->scan_8x8 = x264_zigzag_scan_8x8_field_neon;
+ pf_interlaced->sub_4x4 = x264_zigzag_sub_4x4_field_neon;
+ pf_interlaced->sub_4x4ac = x264_zigzag_sub_4x4ac_field_neon;
+ pf_interlaced->sub_8x8 = x264_zigzag_sub_8x8_field_neon;
+ pf_progressive->scan_8x8 = x264_zigzag_scan_8x8_frame_neon;
+ pf_progressive->sub_4x4 = x264_zigzag_sub_4x4_frame_neon;
+ pf_progressive->sub_4x4ac = x264_zigzag_sub_4x4ac_frame_neon;
+ pf_progressive->sub_8x8 = x264_zigzag_sub_8x8_frame_neon;
+#endif // ARCH_AARCH64
+ }
#endif // HAVE_ARMV6 || ARCH_AARCH64
#endif // HIGH_BIT_DEPTH
}
#endif // HIGH_BIT_DEPTH
#endif
+#if !HIGH_BIT_DEPTH
+#if ARCH_AARCH64
+ if( cpu&X264_CPU_NEON )
+ {
+ pf_interlaced->interleave_8x8_cavlc =
+ pf_progressive->interleave_8x8_cavlc = x264_zigzag_interleave_8x8_cavlc_neon;
+ }
+#endif // ARCH_AARCH64
+#endif // !HIGH_BIT_DEPTH
+#if !HIGH_BIT_DEPTH
+#if HAVE_MSA
+ if( cpu&X264_CPU_MSA )
+ {
+ pf_progressive->scan_4x4 = x264_zigzag_scan_4x4_frame_msa;
+ }
+#endif
+#endif
}