diff mbox series

[FFmpeg-devel,v2,4/5] avcodec/x86/v210enc: expand and correct comments

Message ID 20221125151720.1655051-4-jdarnley@obe.tv
State Accepted
Commit c67a2b14a2631040aea4dde9fe03f469f89bf7b0
Headers show
Series [FFmpeg-devel,1/3] checkasm/v210enc: test the entire width of 10-bit planar input arrays | expand

Checks

Context Check Description
yinshiyou/make_loongarch64 success Make finished
yinshiyou/make_fate_loongarch64 success Make fate finished
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

James Darnley Nov. 25, 2022, 3:17 p.m. UTC
---
 libavcodec/x86/v210enc.asm | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
diff mbox series

Patch

diff --git a/libavcodec/x86/v210enc.asm b/libavcodec/x86/v210enc.asm
index 552164a8be..d3639cd440 100644
--- a/libavcodec/x86/v210enc.asm
+++ b/libavcodec/x86/v210enc.asm
@@ -314,7 +314,7 @@  cglobal v210_planar_pack_8, 5, 5, 7+notcpuflag(avx512icl), y, u, v, dst, width
             movu         ym1, [yq + 2*widthq]
             vinserti32x4  m1, [uq + 1*widthq], 2
             vinserti32x4  m1, [vq + 1*widthq], 3
-            vpermb        m1, m2, m1                 ; uyv0 yuy0 vyu0 yvy0
+            vpermb        m1, m2, m1                 ; uyvx yuyx vyux yvyx
         %else
             movq         xm0, [uq + 1*widthq]        ; uuuu uuxx
             movq         xm1, [vq + 1*widthq]        ; vvvv vvxx
@@ -325,10 +325,10 @@  cglobal v210_planar_pack_8, 5, 5, 7+notcpuflag(avx512icl), y, u, v, dst, width
         %endif
         CLIPUB       m1, m4, m5
 
-        pmaddubsw  m0, m1, m3
-        pslld      m1,  4
+        pmaddubsw  m0, m1, m3 ; shift high and low samples of each dword and mask out other bits
+        pslld      m1,  4     ; shift center sample of each dword
         %if cpuflag(avx512)
-            vpternlogd m0, m1, m6, 0xd8 ; C?B:A
+            vpternlogd m0, m1, m6, 0xd8 ; C?B:A ; merge and mask out bad bits from B
         %else
             pand       m1, m6, m1
             pandn      m0, m6, m0