]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/x86/h264_intrapred_init.c
Port pred4x4_vertical_left_mmxext (H.264 intra prediction) from x264 (authors:
[ffmpeg] / libavcodec / x86 / h264_intrapred_init.c
index 8d4dd4ba0b9af8f58bf8a516da765b628ef99111..202bbd859329ecdc7a1503bb6d7f33b9c1f7016d 100644 (file)
@@ -59,8 +59,32 @@ void ff_pred8x8_tm_vp8_mmx         (uint8_t *src, int stride);
 void ff_pred8x8_tm_vp8_mmxext      (uint8_t *src, int stride);
 void ff_pred8x8_tm_vp8_sse2        (uint8_t *src, int stride);
 void ff_pred8x8_tm_vp8_ssse3       (uint8_t *src, int stride);
+void ff_pred8x8l_top_dc_mmxext     (uint8_t *src, int has_topleft, int has_topright, int stride);
+void ff_pred8x8l_top_dc_ssse3      (uint8_t *src, int has_topleft, int has_topright, int stride);
+void ff_pred8x8l_dc_mmxext         (uint8_t *src, int has_topleft, int has_topright, int stride);
+void ff_pred8x8l_dc_ssse3          (uint8_t *src, int has_topleft, int has_topright, int stride);
+void ff_pred8x8l_horizontal_mmxext (uint8_t *src, int has_topleft, int has_topright, int stride);
+void ff_pred8x8l_horizontal_ssse3  (uint8_t *src, int has_topleft, int has_topright, int stride);
+void ff_pred8x8l_vertical_mmxext   (uint8_t *src, int has_topleft, int has_topright, int stride);
+void ff_pred8x8l_vertical_ssse3    (uint8_t *src, int has_topleft, int has_topright, int stride);
+void ff_pred8x8l_down_left_sse2    (uint8_t *src, int has_topleft, int has_topright, int stride);
+void ff_pred8x8l_down_left_ssse3   (uint8_t *src, int has_topleft, int has_topright, int stride);
+void ff_pred8x8l_down_right_mmxext (uint8_t *src, int has_topleft, int has_topright, int stride);
+void ff_pred8x8l_down_right_sse2   (uint8_t *src, int has_topleft, int has_topright, int stride);
+void ff_pred8x8l_down_right_ssse3  (uint8_t *src, int has_topleft, int has_topright, int stride);
+void ff_pred8x8l_vertical_right_mmxext(uint8_t *src, int has_topleft, int has_topright, int stride);
+void ff_pred8x8l_vertical_right_sse2(uint8_t *src, int has_topleft, int has_topright, int stride);
+void ff_pred8x8l_vertical_right_ssse3(uint8_t *src, int has_topleft, int has_topright, int stride);
+void ff_pred8x8l_vertical_left_sse2(uint8_t *src, int has_topleft, int has_topright, int stride);
+void ff_pred8x8l_vertical_left_ssse3(uint8_t *src, int has_topleft, int has_topright, int stride);
+void ff_pred8x8l_horizontal_up_mmxext(uint8_t *src, int has_topleft, int has_topright, int stride);
+void ff_pred8x8l_horizontal_up_ssse3(uint8_t *src, int has_topleft, int has_topright, int stride);
+void ff_pred8x8l_horizontal_down_mmxext(uint8_t *src, int has_topleft, int has_topright, int stride);
+void ff_pred8x8l_horizontal_down_sse2(uint8_t *src, int has_topleft, int has_topright, int stride);
+void ff_pred8x8l_horizontal_down_ssse3(uint8_t *src, int has_topleft, int has_topright, int stride);
 void ff_pred4x4_dc_mmxext          (uint8_t *src, const uint8_t *topright, int stride);
 void ff_pred4x4_down_left_mmxext   (uint8_t *src, const uint8_t *topright, int stride);
+void ff_pred4x4_vertical_left_mmxext(uint8_t *src, const uint8_t *topright, int stride);
 void ff_pred4x4_tm_vp8_mmx         (uint8_t *src, const uint8_t *topright, int stride);
 void ff_pred4x4_tm_vp8_mmxext      (uint8_t *src, const uint8_t *topright, int stride);
 void ff_pred4x4_tm_vp8_ssse3       (uint8_t *src, const uint8_t *topright, int stride);
@@ -96,10 +120,22 @@ void ff_h264_pred_init_x86(H264PredContext *h, int codec_id)
         h->pred16x16[HOR_PRED8x8 ] = ff_pred16x16_horizontal_mmxext;
         h->pred16x16[DC_PRED8x8  ] = ff_pred16x16_dc_mmxext;
         h->pred8x8  [HOR_PRED8x8 ] = ff_pred8x8_horizontal_mmxext;
+#if CONFIG_GPL
+        h->pred8x8l [TOP_DC_PRED ] = ff_pred8x8l_top_dc_mmxext;
+        h->pred8x8l [DC_PRED     ] = ff_pred8x8l_dc_mmxext;
+        h->pred8x8l [HOR_PRED    ] = ff_pred8x8l_horizontal_mmxext;
+        h->pred8x8l [VERT_PRED   ] = ff_pred8x8l_vertical_mmxext;
+        h->pred8x8l [DIAG_DOWN_RIGHT_PRED] = ff_pred8x8l_down_right_mmxext;
+        h->pred8x8l [VERT_RIGHT_PRED     ] = ff_pred8x8l_vertical_right_mmxext;
+        h->pred8x8l [HOR_UP_PRED         ] = ff_pred8x8l_horizontal_up_mmxext;
+        h->pred8x8l [HOR_DOWN_PRED       ] = ff_pred8x8l_horizontal_down_mmxext;
+#endif
         h->pred4x4  [DC_PRED     ] = ff_pred4x4_dc_mmxext;
 #if CONFIG_GPL
         if (codec_id == CODEC_ID_VP8 || codec_id == CODEC_ID_H264)
             h->pred4x4  [DIAG_DOWN_LEFT_PRED ] = ff_pred4x4_down_left_mmxext;
+        if (codec_id == CODEC_ID_SVQ3 || codec_id == CODEC_ID_H264)
+            h->pred4x4  [VERT_LEFT_PRED      ] = ff_pred4x4_vertical_left_mmxext;
         if (codec_id == CODEC_ID_SVQ3 || codec_id == CODEC_ID_H264) {
             h->pred8x8  [TOP_DC_PRED8x8      ] = ff_pred8x8_top_dc_mmxext;
             h->pred8x8  [DC_PRED8x8          ] = ff_pred8x8_dc_mmxext;
@@ -129,6 +165,13 @@ void ff_h264_pred_init_x86(H264PredContext *h, int codec_id)
 
     if (mm_flags & AV_CPU_FLAG_SSE2) {
         h->pred16x16[DC_PRED8x8  ] = ff_pred16x16_dc_sse2;
+#if CONFIG_GPL
+        h->pred8x8l [DIAG_DOWN_LEFT_PRED ] = ff_pred8x8l_down_left_sse2;
+        h->pred8x8l [DIAG_DOWN_RIGHT_PRED] = ff_pred8x8l_down_right_sse2;
+        h->pred8x8l [VERT_RIGHT_PRED     ] = ff_pred8x8l_vertical_right_sse2;
+        h->pred8x8l [VERT_LEFT_PRED      ] = ff_pred8x8l_vertical_left_sse2;
+        h->pred8x8l [HOR_DOWN_PRED       ] = ff_pred8x8l_horizontal_down_sse2;
+#endif
         if (codec_id == CODEC_ID_VP8) {
             h->pred16x16[PLANE_PRED8x8] = ff_pred16x16_tm_vp8_sse2;
             h->pred8x8  [PLANE_PRED8x8] = ff_pred8x8_tm_vp8_sse2;
@@ -148,6 +191,18 @@ void ff_h264_pred_init_x86(H264PredContext *h, int codec_id)
         h->pred16x16[HOR_PRED8x8 ] = ff_pred16x16_horizontal_ssse3;
         h->pred16x16[DC_PRED8x8  ] = ff_pred16x16_dc_ssse3;
         h->pred8x8  [HOR_PRED8x8 ] = ff_pred8x8_horizontal_ssse3;
+#if CONFIG_GPL
+        h->pred8x8l [TOP_DC_PRED ] = ff_pred8x8l_top_dc_ssse3;
+        h->pred8x8l [DC_PRED     ] = ff_pred8x8l_dc_ssse3;
+        h->pred8x8l [HOR_PRED    ] = ff_pred8x8l_horizontal_ssse3;
+        h->pred8x8l [VERT_PRED   ] = ff_pred8x8l_vertical_ssse3;
+        h->pred8x8l [DIAG_DOWN_LEFT_PRED ] = ff_pred8x8l_down_left_ssse3;
+        h->pred8x8l [DIAG_DOWN_RIGHT_PRED] = ff_pred8x8l_down_right_ssse3;
+        h->pred8x8l [VERT_RIGHT_PRED     ] = ff_pred8x8l_vertical_right_ssse3;
+        h->pred8x8l [VERT_LEFT_PRED      ] = ff_pred8x8l_vertical_left_ssse3;
+        h->pred8x8l [HOR_UP_PRED         ] = ff_pred8x8l_horizontal_up_ssse3;
+        h->pred8x8l [HOR_DOWN_PRED       ] = ff_pred8x8l_horizontal_down_ssse3;
+#endif
         if (codec_id == CODEC_ID_VP8) {
             h->pred8x8  [PLANE_PRED8x8] = ff_pred8x8_tm_vp8_ssse3;
             h->pred4x4  [TM_VP8_PRED  ] = ff_pred4x4_tm_vp8_ssse3;