summaryrefslogtreecommitdiff
path: root/media/ffvpx/libavcodec/x86/h264_intrapred_init.c
diff options
context:
space:
mode:
Diffstat (limited to 'media/ffvpx/libavcodec/x86/h264_intrapred_init.c')
-rw-r--r--media/ffvpx/libavcodec/x86/h264_intrapred_init.c82
1 files changed, 4 insertions, 78 deletions
diff --git a/media/ffvpx/libavcodec/x86/h264_intrapred_init.c b/media/ffvpx/libavcodec/x86/h264_intrapred_init.c
index bdd5125d68..ee46927a24 100644
--- a/media/ffvpx/libavcodec/x86/h264_intrapred_init.c
+++ b/media/ffvpx/libavcodec/x86/h264_intrapred_init.c
@@ -18,10 +18,13 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include <stddef.h>
+#include <stdint.h>
+#include "config.h"
#include "libavutil/attributes.h"
#include "libavutil/cpu.h"
#include "libavutil/x86/cpu.h"
-#include "libavcodec/avcodec.h"
+#include "libavcodec/codec_id.h"
#include "libavcodec/h264pred.h"
#define PRED4x4(TYPE, DEPTH, OPT) \
@@ -49,7 +52,6 @@ PRED4x4(horizontal_down, 10, avx)
void ff_pred8x8_ ## TYPE ## _ ## DEPTH ## _ ## OPT (uint8_t *src, \
ptrdiff_t stride);
-PRED8x8(dc, 10, mmxext)
PRED8x8(dc, 10, sse2)
PRED8x8(top_dc, 10, sse2)
PRED8x8(plane, 10, sse2)
@@ -64,7 +66,6 @@ void ff_pred8x8l_ ## TYPE ## _ ## DEPTH ## _ ## OPT (uint8_t *src, \
PRED8x8L(dc, 10, sse2)
PRED8x8L(dc, 10, avx)
-PRED8x8L(128_dc, 10, mmxext)
PRED8x8L(128_dc, 10, sse2)
PRED8x8L(top_dc, 10, sse2)
PRED8x8L(top_dc, 10, avx)
@@ -90,42 +91,25 @@ PRED8x8L(horizontal_up, 10, avx)
void ff_pred16x16_ ## TYPE ## _ ## DEPTH ## _ ## OPT (uint8_t *src, \
ptrdiff_t stride);
-PRED16x16(dc, 10, mmxext)
PRED16x16(dc, 10, sse2)
-PRED16x16(top_dc, 10, mmxext)
PRED16x16(top_dc, 10, sse2)
-PRED16x16(128_dc, 10, mmxext)
PRED16x16(128_dc, 10, sse2)
-PRED16x16(left_dc, 10, mmxext)
PRED16x16(left_dc, 10, sse2)
-PRED16x16(vertical, 10, mmxext)
PRED16x16(vertical, 10, sse2)
-PRED16x16(horizontal, 10, mmxext)
PRED16x16(horizontal, 10, sse2)
/* 8-bit versions */
-PRED16x16(vertical, 8, mmx)
PRED16x16(vertical, 8, sse)
-PRED16x16(horizontal, 8, mmx)
PRED16x16(horizontal, 8, mmxext)
PRED16x16(horizontal, 8, ssse3)
-PRED16x16(dc, 8, mmxext)
PRED16x16(dc, 8, sse2)
PRED16x16(dc, 8, ssse3)
-PRED16x16(plane_h264, 8, mmx)
-PRED16x16(plane_h264, 8, mmxext)
PRED16x16(plane_h264, 8, sse2)
PRED16x16(plane_h264, 8, ssse3)
-PRED16x16(plane_rv40, 8, mmx)
-PRED16x16(plane_rv40, 8, mmxext)
PRED16x16(plane_rv40, 8, sse2)
PRED16x16(plane_rv40, 8, ssse3)
-PRED16x16(plane_svq3, 8, mmx)
-PRED16x16(plane_svq3, 8, mmxext)
PRED16x16(plane_svq3, 8, sse2)
PRED16x16(plane_svq3, 8, ssse3)
-PRED16x16(tm_vp8, 8, mmx)
-PRED16x16(tm_vp8, 8, mmxext)
PRED16x16(tm_vp8, 8, sse2)
PRED16x16(tm_vp8, 8, avx2)
@@ -133,15 +117,10 @@ PRED8x8(top_dc, 8, mmxext)
PRED8x8(dc_rv40, 8, mmxext)
PRED8x8(dc, 8, mmxext)
PRED8x8(vertical, 8, mmx)
-PRED8x8(horizontal, 8, mmx)
PRED8x8(horizontal, 8, mmxext)
PRED8x8(horizontal, 8, ssse3)
-PRED8x8(plane, 8, mmx)
-PRED8x8(plane, 8, mmxext)
PRED8x8(plane, 8, sse2)
PRED8x8(plane, 8, ssse3)
-PRED8x8(tm_vp8, 8, mmx)
-PRED8x8(tm_vp8, 8, mmxext)
PRED8x8(tm_vp8, 8, sse2)
PRED8x8(tm_vp8, 8, ssse3)
@@ -153,20 +132,16 @@ PRED8x8L(horizontal, 8, mmxext)
PRED8x8L(horizontal, 8, ssse3)
PRED8x8L(vertical, 8, mmxext)
PRED8x8L(vertical, 8, ssse3)
-PRED8x8L(down_left, 8, mmxext)
PRED8x8L(down_left, 8, sse2)
PRED8x8L(down_left, 8, ssse3)
-PRED8x8L(down_right, 8, mmxext)
PRED8x8L(down_right, 8, sse2)
PRED8x8L(down_right, 8, ssse3)
-PRED8x8L(vertical_right, 8, mmxext)
PRED8x8L(vertical_right, 8, sse2)
PRED8x8L(vertical_right, 8, ssse3)
PRED8x8L(vertical_left, 8, sse2)
PRED8x8L(vertical_left, 8, ssse3)
PRED8x8L(horizontal_up, 8, mmxext)
PRED8x8L(horizontal_up, 8, ssse3)
-PRED8x8L(horizontal_down, 8, mmxext)
PRED8x8L(horizontal_down, 8, sse2)
PRED8x8L(horizontal_down, 8, ssse3)
@@ -177,7 +152,6 @@ PRED4x4(vertical_left, 8, mmxext)
PRED4x4(vertical_right, 8, mmxext)
PRED4x4(horizontal_up, 8, mmxext)
PRED4x4(horizontal_down, 8, mmxext)
-PRED4x4(tm_vp8, 8, mmx)
PRED4x4(tm_vp8, 8, mmxext)
PRED4x4(tm_vp8, 8, ssse3)
PRED4x4(vertical_vp8, 8, mmxext)
@@ -190,44 +164,20 @@ av_cold void ff_h264_pred_init_x86(H264PredContext *h, int codec_id,
if (bit_depth == 8) {
if (EXTERNAL_MMX(cpu_flags)) {
- h->pred16x16[VERT_PRED8x8 ] = ff_pred16x16_vertical_8_mmx;
- h->pred16x16[HOR_PRED8x8 ] = ff_pred16x16_horizontal_8_mmx;
if (chroma_format_idc <= 1) {
h->pred8x8 [VERT_PRED8x8 ] = ff_pred8x8_vertical_8_mmx;
- h->pred8x8 [HOR_PRED8x8 ] = ff_pred8x8_horizontal_8_mmx;
- }
- if (codec_id == AV_CODEC_ID_VP7 || codec_id == AV_CODEC_ID_VP8) {
- h->pred16x16[PLANE_PRED8x8 ] = ff_pred16x16_tm_vp8_8_mmx;
- h->pred8x8 [PLANE_PRED8x8 ] = ff_pred8x8_tm_vp8_8_mmx;
- h->pred4x4 [TM_VP8_PRED ] = ff_pred4x4_tm_vp8_8_mmx;
- } else {
- if (chroma_format_idc <= 1)
- h->pred8x8 [PLANE_PRED8x8] = ff_pred8x8_plane_8_mmx;
- if (codec_id == AV_CODEC_ID_SVQ3) {
- if (cpu_flags & AV_CPU_FLAG_CMOV)
- h->pred16x16[PLANE_PRED8x8] = ff_pred16x16_plane_svq3_8_mmx;
- } else if (codec_id == AV_CODEC_ID_RV40) {
- h->pred16x16[PLANE_PRED8x8] = ff_pred16x16_plane_rv40_8_mmx;
- } else {
- h->pred16x16[PLANE_PRED8x8] = ff_pred16x16_plane_h264_8_mmx;
- }
}
}
if (EXTERNAL_MMXEXT(cpu_flags)) {
h->pred16x16[HOR_PRED8x8 ] = ff_pred16x16_horizontal_8_mmxext;
- h->pred16x16[DC_PRED8x8 ] = ff_pred16x16_dc_8_mmxext;
if (chroma_format_idc <= 1)
h->pred8x8[HOR_PRED8x8 ] = ff_pred8x8_horizontal_8_mmxext;
h->pred8x8l [TOP_DC_PRED ] = ff_pred8x8l_top_dc_8_mmxext;
h->pred8x8l [DC_PRED ] = ff_pred8x8l_dc_8_mmxext;
h->pred8x8l [HOR_PRED ] = ff_pred8x8l_horizontal_8_mmxext;
h->pred8x8l [VERT_PRED ] = ff_pred8x8l_vertical_8_mmxext;
- h->pred8x8l [DIAG_DOWN_RIGHT_PRED ] = ff_pred8x8l_down_right_8_mmxext;
- h->pred8x8l [VERT_RIGHT_PRED ] = ff_pred8x8l_vertical_right_8_mmxext;
h->pred8x8l [HOR_UP_PRED ] = ff_pred8x8l_horizontal_up_8_mmxext;
- h->pred8x8l [DIAG_DOWN_LEFT_PRED ] = ff_pred8x8l_down_left_8_mmxext;
- h->pred8x8l [HOR_DOWN_PRED ] = ff_pred8x8l_horizontal_down_8_mmxext;
h->pred4x4 [DIAG_DOWN_RIGHT_PRED ] = ff_pred4x4_down_right_8_mmxext;
h->pred4x4 [VERT_RIGHT_PRED ] = ff_pred4x4_vertical_right_8_mmxext;
h->pred4x4 [HOR_DOWN_PRED ] = ff_pred4x4_horizontal_down_8_mmxext;
@@ -249,21 +199,9 @@ av_cold void ff_h264_pred_init_x86(H264PredContext *h, int codec_id,
}
}
if (codec_id == AV_CODEC_ID_VP7 || codec_id == AV_CODEC_ID_VP8) {
- h->pred16x16[PLANE_PRED8x8 ] = ff_pred16x16_tm_vp8_8_mmxext;
h->pred8x8 [DC_PRED8x8 ] = ff_pred8x8_dc_rv40_8_mmxext;
- h->pred8x8 [PLANE_PRED8x8 ] = ff_pred8x8_tm_vp8_8_mmxext;
h->pred4x4 [TM_VP8_PRED ] = ff_pred4x4_tm_vp8_8_mmxext;
h->pred4x4 [VERT_PRED ] = ff_pred4x4_vertical_vp8_8_mmxext;
- } else {
- if (chroma_format_idc <= 1)
- h->pred8x8 [PLANE_PRED8x8] = ff_pred8x8_plane_8_mmxext;
- if (codec_id == AV_CODEC_ID_SVQ3) {
- h->pred16x16[PLANE_PRED8x8 ] = ff_pred16x16_plane_svq3_8_mmxext;
- } else if (codec_id == AV_CODEC_ID_RV40) {
- h->pred16x16[PLANE_PRED8x8 ] = ff_pred16x16_plane_rv40_8_mmxext;
- } else {
- h->pred16x16[PLANE_PRED8x8 ] = ff_pred16x16_plane_h264_8_mmxext;
- }
}
}
@@ -334,18 +272,6 @@ av_cold void ff_h264_pred_init_x86(H264PredContext *h, int codec_id,
if (EXTERNAL_MMXEXT(cpu_flags)) {
h->pred4x4[DC_PRED ] = ff_pred4x4_dc_10_mmxext;
h->pred4x4[HOR_UP_PRED ] = ff_pred4x4_horizontal_up_10_mmxext;
-
- if (chroma_format_idc <= 1)
- h->pred8x8[DC_PRED8x8 ] = ff_pred8x8_dc_10_mmxext;
-
- h->pred8x8l[DC_128_PRED ] = ff_pred8x8l_128_dc_10_mmxext;
-
- h->pred16x16[DC_PRED8x8 ] = ff_pred16x16_dc_10_mmxext;
- h->pred16x16[TOP_DC_PRED8x8 ] = ff_pred16x16_top_dc_10_mmxext;
- h->pred16x16[DC_128_PRED8x8 ] = ff_pred16x16_128_dc_10_mmxext;
- h->pred16x16[LEFT_DC_PRED8x8 ] = ff_pred16x16_left_dc_10_mmxext;
- h->pred16x16[VERT_PRED8x8 ] = ff_pred16x16_vertical_10_mmxext;
- h->pred16x16[HOR_PRED8x8 ] = ff_pred16x16_horizontal_10_mmxext;
}
if (EXTERNAL_SSE2(cpu_flags)) {
h->pred4x4[DIAG_DOWN_LEFT_PRED ] = ff_pred4x4_down_left_10_sse2;