[vlc-commits] chroma: copy: remove CopyFromI420_10ToP010

Thomas Guillem git at videolan.org
Fri Mar 16 16:08:36 CET 2018


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Fri Mar 16 08:59:33 2018 +0100| [3980ea2c239ab521f51091db08a9434631c4581d] | committer: Thomas Guillem

chroma: copy: remove CopyFromI420_10ToP010

Replaced by the faster Copy420_16_P_to_SP function.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=3980ea2c239ab521f51091db08a9434631c4581d
---

 modules/video_chroma/copy.c | 41 -----------------------------------------
 modules/video_chroma/copy.h |  5 -----
 2 files changed, 46 deletions(-)

diff --git a/modules/video_chroma/copy.c b/modules/video_chroma/copy.c
index 861f6543be..f5b0b68617 100644
--- a/modules/video_chroma/copy.c
+++ b/modules/video_chroma/copy.c
@@ -865,47 +865,6 @@ void Copy420_16_P_to_SP(picture_t *dst, const uint8_t *src[static 3],
         INTERLEAVE_UV_SHIFTL((-bitshift) & 0xf);
 }
 
-void CopyFromI420_10ToP010(picture_t *dst, const uint8_t *src[static 3],
-                           const size_t src_pitch[static 3],
-                           unsigned height, const copy_cache_t *cache)
-{
-    (void) cache;
-
-    const int i_extra_pitch_dst_y = (dst->p[0].i_pitch  - src_pitch[0]) / 2;
-    const int i_extra_pitch_src_y = (src_pitch[Y_PLANE] - src_pitch[0]) / 2;
-    uint16_t *dstY = (uint16_t *) dst->p[0].p_pixels;
-    const uint16_t *srcY = (const uint16_t *) src[Y_PLANE];
-    for (unsigned y = 0; y < height; y++) {
-        for (unsigned x = 0; x < (src_pitch[0] / 2); x++) {
-            *dstY++ = *srcY++ << 6;
-        }
-        dstY += i_extra_pitch_dst_y;
-        srcY += i_extra_pitch_src_y;
-    }
-
-    const unsigned copy_lines = height / 2;
-    const unsigned copy_pitch = src_pitch[1] / 2;
-
-    const int i_extra_pitch_uv = dst->p[1].i_pitch / 2 - 2 * copy_pitch;
-    const int i_extra_pitch_u  = src_pitch[U_PLANE] / 2 - copy_pitch;
-    const int i_extra_pitch_v  = src_pitch[V_PLANE] / 2 - copy_pitch;
-
-    uint16_t *dstUV = (uint16_t *) dst->p[1].p_pixels;
-    const uint16_t *srcU  = (const uint16_t *) src[U_PLANE];
-    const uint16_t *srcV  = (const uint16_t *) src[V_PLANE];
-    for ( unsigned int line = 0; line < copy_lines; line++ )
-    {
-        for ( unsigned int col = 0; col < copy_pitch; col++ )
-        {
-            *dstUV++ = *srcU++ << 6;
-            *dstUV++ = *srcV++ << 6;
-        }
-        dstUV += i_extra_pitch_uv;
-        srcU  += i_extra_pitch_u;
-        srcV  += i_extra_pitch_v;
-    }
-}
-
 void Copy420_P_to_P(picture_t *dst, const uint8_t *src[static 3],
                     const size_t src_pitch[static 3], unsigned height,
                     const copy_cache_t *cache)
diff --git a/modules/video_chroma/copy.h b/modules/video_chroma/copy.h
index a58fbb0377..5fbc75b7c9 100644
--- a/modules/video_chroma/copy.h
+++ b/modules/video_chroma/copy.h
@@ -73,11 +73,6 @@ void Copy420_16_SP_to_P(picture_t *dst, const uint8_t *src[static 2],
                         const size_t src_pitch[static 2], unsigned height,
                         int bitshift, const copy_cache_t *cache);
 
-/* XXX: Not optimized copy (no SEE) */
-void CopyFromI420_10ToP010(picture_t *dst, const uint8_t *src[static 3],
-                           const size_t src_pitch[static 3],
-                           unsigned height, const copy_cache_t *cache);
-
 /**
  * This functions sets the internal plane pointers/dimensions for the given
  * buffer.



More information about the vlc-commits mailing list