[FFmpeg-devel] [PATCH v3 2/5] avcodec/v210enc: make 8bit and 10bit function consistent

lance.lmwang at gmail.com lance.lmwang at gmail.com
Sun Sep 1 16:20:20 EEST 2019


From: Limin Wang <lance.lmwang at gmail.com>

I have benchmarked the performance with c code and haven't see any
performance impact.

Signed-off-by: Limin Wang <lance.lmwang at gmail.com>
---
 libavcodec/v210enc.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/libavcodec/v210enc.c b/libavcodec/v210enc.c
index 1b840b2..69a2efe 100644
--- a/libavcodec/v210enc.c
+++ b/libavcodec/v210enc.c
@@ -43,12 +43,7 @@ static void v210_planar_pack_8_c(const uint8_t *y, const uint8_t *u,
     uint32_t val;
     int i;
 
-    /* unroll this to match the assembly */
-    for (i = 0; i < width - 11; i += 12) {
-        WRITE_PIXELS(u, y, v, 8);
-        WRITE_PIXELS(y, u, y, 8);
-        WRITE_PIXELS(v, y, u, 8);
-        WRITE_PIXELS(y, v, y, 8);
+    for (i = 0; i < width - 5; i += 6) {
         WRITE_PIXELS(u, y, v, 8);
         WRITE_PIXELS(y, u, y, 8);
         WRITE_PIXELS(v, y, u, 8);
-- 
2.6.4



More information about the ffmpeg-devel mailing list