diff mbox series

[FFmpeg-devel] libswscale/x86/yuv2rgb: Fix Segmentation Fault when load unaligned data

Message ID 20200225062919.16887-1-ting.fu@intel.com
State Superseded
Headers show
Series [FFmpeg-devel] libswscale/x86/yuv2rgb: Fix Segmentation Fault when load unaligned data
Related show

Checks

Context Check Description
andriy/ffmpeg-patchwork pending
andriy/ffmpeg-patchwork success Applied patch
andriy/ffmpeg-patchwork success Configure finished
andriy/ffmpeg-patchwork success Make finished
andriy/ffmpeg-patchwork success Make fate finished

Commit Message

Ting Fu Feb. 25, 2020, 6:29 a.m. UTC
Signed-off-by: Ting Fu <ting.fu@intel.com>
---
 libswscale/x86/yuv_2_rgb.asm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Paul B Mahol Feb. 25, 2020, 9:36 a.m. UTC | #1
lgtm

On 2/25/20, Ting Fu <ting.fu@intel.com> wrote:
> Signed-off-by: Ting Fu <ting.fu@intel.com>
> ---
>  libswscale/x86/yuv_2_rgb.asm | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/libswscale/x86/yuv_2_rgb.asm b/libswscale/x86/yuv_2_rgb.asm
> index e05bbb89f5..575a84d921 100644
> --- a/libswscale/x86/yuv_2_rgb.asm
> +++ b/libswscale/x86/yuv_2_rgb.asm
> @@ -139,7 +139,7 @@ cglobal %1_420_%2%3, GPR_num, GPR_num, reg_num,
> parameters
>      VBROADCASTSD vr_coff,  [pointer_c_ditherq + 4  * 8]
>  %endif
>  %endif
> -    mova m_y, [py_2indexq + 2 * indexq]
> +    movu m_y, [py_2indexq + 2 * indexq]
>      movh m_u, [pu_indexq  +     indexq]
>      movh m_v, [pv_indexq  +     indexq]
>  .loop0:
> @@ -347,7 +347,7 @@ cglobal %1_420_%2%3, GPR_num, GPR_num, reg_num,
> parameters
>  %endif ; PACK RGB15/16
>  %endif ; PACK RGB15/16/32
>
> -mova m_y, [py_2indexq + 2 * indexq + 8 * time_num]
> +movu m_y, [py_2indexq + 2 * indexq + 8 * time_num]
>  movh m_v, [pv_indexq  +     indexq + 4 * time_num]
>  movh m_u, [pu_indexq  +     indexq + 4 * time_num]
>  add imageq, 8 * depth * time_num
> --
> 2.17.1
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
Carl Eugen Hoyos Feb. 25, 2020, 9:42 a.m. UTC | #2
> Am 25.02.2020 um 07:29 schrieb Ting Fu <ting.fu@intel.com>:
> 
> Signed-off-by: Ting Fu <ting.fu@intel.com>
> ---
> libswscale/x86/yuv_2_rgb.asm | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/libswscale/x86/yuv_2_rgb.asm b/libswscale/x86/yuv_2_rgb.asm
> index e05bbb89f5..575a84d921 100644
> --- a/libswscale/x86/yuv_2_rgb.asm
> +++ b/libswscale/x86/yuv_2_rgb.asm
> @@ -139,7 +139,7 @@ cglobal %1_420_%2%3, GPR_num, GPR_num, reg_num, parameters
>     VBROADCASTSD vr_coff,  [pointer_c_ditherq + 4  * 8]
> %endif
> %endif
> -    mova m_y, [py_2indexq + 2 * indexq]
> +    movu m_y, [py_2indexq + 2 * indexq]
>     movh m_u, [pu_indexq  +     indexq]
>     movh m_v, [pv_indexq  +     indexq]
> .loop0:
> @@ -347,7 +347,7 @@ cglobal %1_420_%2%3, GPR_num, GPR_num, reg_num, parameters
> %endif ; PACK RGB15/16
> %endif ; PACK RGB15/16/32
> 
> -mova m_y, [py_2indexq + 2 * indexq + 8 * time_num]
> +movu m_y, [py_2indexq + 2 * indexq + 8 * time_num]

If there is a related ticket in trac, please mention it in the commit message.

Carl Eugen
Ting Fu Feb. 26, 2020, 3 a.m. UTC | #3
> -----Original Message-----
> From: ffmpeg-devel <ffmpeg-devel-bounces@ffmpeg.org> On Behalf Of Carl
> Eugen Hoyos
> Sent: Tuesday, February 25, 2020 05:43 PM
> To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org>
> Subject: Re: [FFmpeg-devel] [PATCH] libswscale/x86/yuv2rgb: Fix Segmentation
> Fault when load unaligned data
> 
> 
> 
> > Am 25.02.2020 um 07:29 schrieb Ting Fu <ting.fu@intel.com>:
> >
> > Signed-off-by: Ting Fu <ting.fu@intel.com>
> > ---
> > libswscale/x86/yuv_2_rgb.asm | 4 ++--
> > 1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/libswscale/x86/yuv_2_rgb.asm
> > b/libswscale/x86/yuv_2_rgb.asm index e05bbb89f5..575a84d921 100644
> > --- a/libswscale/x86/yuv_2_rgb.asm
> > +++ b/libswscale/x86/yuv_2_rgb.asm
> > @@ -139,7 +139,7 @@ cglobal %1_420_%2%3, GPR_num, GPR_num,
> reg_num, parameters
> >     VBROADCASTSD vr_coff,  [pointer_c_ditherq + 4  * 8] %endif %endif
> > -    mova m_y, [py_2indexq + 2 * indexq]
> > +    movu m_y, [py_2indexq + 2 * indexq]
> >     movh m_u, [pu_indexq  +     indexq]
> >     movh m_v, [pv_indexq  +     indexq]
> > .loop0:
> > @@ -347,7 +347,7 @@ cglobal %1_420_%2%3, GPR_num, GPR_num,
> reg_num,
> > parameters %endif ; PACK RGB15/16 %endif ; PACK RGB15/16/32
> >
> > -mova m_y, [py_2indexq + 2 * indexq + 8 * time_num]
> > +movu m_y, [py_2indexq + 2 * indexq + 8 * time_num]
> 
> If there is a related ticket in trac, please mention it in the commit message.
> 
> Carl Eugen

Sorry for the missing ticket info. Added in patch V2.

Thank you,
Ting Fu
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> 
> To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org
> with subject "unsubscribe".
diff mbox series

Patch

diff --git a/libswscale/x86/yuv_2_rgb.asm b/libswscale/x86/yuv_2_rgb.asm
index e05bbb89f5..575a84d921 100644
--- a/libswscale/x86/yuv_2_rgb.asm
+++ b/libswscale/x86/yuv_2_rgb.asm
@@ -139,7 +139,7 @@  cglobal %1_420_%2%3, GPR_num, GPR_num, reg_num, parameters
     VBROADCASTSD vr_coff,  [pointer_c_ditherq + 4  * 8]
 %endif
 %endif
-    mova m_y, [py_2indexq + 2 * indexq]
+    movu m_y, [py_2indexq + 2 * indexq]
     movh m_u, [pu_indexq  +     indexq]
     movh m_v, [pv_indexq  +     indexq]
 .loop0:
@@ -347,7 +347,7 @@  cglobal %1_420_%2%3, GPR_num, GPR_num, reg_num, parameters
 %endif ; PACK RGB15/16
 %endif ; PACK RGB15/16/32
 
-mova m_y, [py_2indexq + 2 * indexq + 8 * time_num]
+movu m_y, [py_2indexq + 2 * indexq + 8 * time_num]
 movh m_v, [pv_indexq  +     indexq + 4 * time_num]
 movh m_u, [pu_indexq  +     indexq + 4 * time_num]
 add imageq, 8 * depth * time_num