diff mbox

[FFmpeg-devel,1/2] avcodec/lossless_videodsp: fix output of add_hfyu_left_pred_int16_c()

Message ID 20161226025938.6660-1-jamrial@gmail.com
State Accepted
Commit c3d822855cb5220e478d8b0ba0bafde18aa2f122
Headers show

Commit Message

James Almer Dec. 26, 2016, 2:59 a.m. UTC
It is now bitexact with the ssse3 and sse4.1 versions of the function.

Signed-off-by: James Almer <jamrial@gmail.com>
---
 libavcodec/lossless_videodsp.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Comments

Paul B Mahol Dec. 26, 2016, 7:51 a.m. UTC | #1
On 12/26/16, James Almer <jamrial@gmail.com> wrote:
> It is now bitexact with the ssse3 and sse4.1 versions of the function.
>
> Signed-off-by: James Almer <jamrial@gmail.com>
> ---
>  libavcodec/lossless_videodsp.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)

OK if tested.
James Almer Dec. 26, 2016, 3:03 p.m. UTC | #2
On 12/26/2016 4:51 AM, Paul B Mahol wrote:
> On 12/26/16, James Almer <jamrial@gmail.com> wrote:
>> It is now bitexact with the ssse3 and sse4.1 versions of the function.
>>
>> Signed-off-by: James Almer <jamrial@gmail.com>
>> ---
>>  libavcodec/lossless_videodsp.c | 6 +++---
>>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> OK if tested.

As i said it's bitexact to the simd versions with this change, and the
output looks correct instead of full of artifacts.

Pushed, thanks.
diff mbox

Patch

diff --git a/libavcodec/lossless_videodsp.c b/libavcodec/lossless_videodsp.c
index 3491621..231c25f 100644
--- a/libavcodec/lossless_videodsp.c
+++ b/libavcodec/lossless_videodsp.c
@@ -100,15 +100,15 @@  static int add_hfyu_left_pred_int16_c(uint16_t *dst, const uint16_t *src, unsign
 
     for(i=0; i<w-1; i++){
         acc+= src[i];
-        dst[i]= acc & mask;
+        dst[i]= acc &= mask;
         i++;
         acc+= src[i];
-        dst[i]= acc & mask;
+        dst[i]= acc &= mask;
     }
 
     for(; i<w; i++){
         acc+= src[i];
-        dst[i]= acc & mask;
+        dst[i]= acc &= mask;
     }
 
     return acc;