aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRamiro Polla <ramiro.polla@gmail.com>2024-08-21 16:55:49 +0200
committerRamiro Polla <ramiro.polla@gmail.com>2024-08-26 12:44:02 +0200
commitf9074427dbcafbd4a07fa65e52f62cf6bf97c117 (patch)
treed12a3da40ea24b787119e0d231a42a4f9b8f444a
parent98610fe95f93258f31a7cd297fb5b0c199bdcc3f (diff)
downloadffmpeg-f9074427dbcafbd4a07fa65e52f62cf6bf97c117.tar.gz
avcodec/x86/mpegvideoencdsp: support negative strides in draw_edges_mmx()
-rw-r--r--libavcodec/x86/mpegvideoencdsp_init.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libavcodec/x86/mpegvideoencdsp_init.c b/libavcodec/x86/mpegvideoencdsp_init.c
index ec174b15aa..c901e4dbaa 100644
--- a/libavcodec/x86/mpegvideoencdsp_init.c
+++ b/libavcodec/x86/mpegvideoencdsp_init.c
@@ -121,7 +121,7 @@ static void draw_edges_mmx(uint8_t *buf, int wrap, int width, int height,
"movq %%mm1, (%0, %2) \n\t"
"add %1, %0 \n\t"
"cmp %3, %0 \n\t"
- "jb 1b \n\t"
+ "jnz 1b \n\t"
: "+r" (ptr)
: "r" ((x86_reg) wrap), "r" ((x86_reg) width),
"r" (ptr + wrap * height));
@@ -142,7 +142,7 @@ static void draw_edges_mmx(uint8_t *buf, int wrap, int width, int height,
"movq %%mm1, 8(%0, %2) \n\t"
"add %1, %0 \n\t"
"cmp %3, %0 \n\t"
- "jb 1b \n\t"
+ "jnz 1b \n\t"
: "+r"(ptr)
: "r"((x86_reg)wrap), "r"((x86_reg)width), "r"(ptr + wrap * height)
);
@@ -161,7 +161,7 @@ static void draw_edges_mmx(uint8_t *buf, int wrap, int width, int height,
"movd %%mm1, (%0, %2) \n\t"
"add %1, %0 \n\t"
"cmp %3, %0 \n\t"
- "jb 1b \n\t"
+ "jnz 1b \n\t"
: "+r" (ptr)
: "r" ((x86_reg) wrap), "r" ((x86_reg) width),
"r" (ptr + wrap * height));