diff mbox

[FFmpeg-devel,v3] lavu/hwcontext_qsv: Fix the realign check for hwupload

Message ID 20190415132340.20256-1-linjie.fu@intel.com
State Accepted
Commit 2d81acaa1adf2280d74d280491f05f0baa4a31d9
Headers show

Commit Message

Fu, Linjie April 15, 2019, 1:23 p.m. UTC
Fix the aligned check in hwupload, input surface should be 16 aligned
too.

Fix #7830.

Signed-off-by: Linjie Fu <linjie.fu@intel.com>
---
 libavutil/hwcontext_qsv.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

Zhong Li April 29, 2019, 5:05 a.m. UTC | #1
> From: ffmpeg-devel [mailto:ffmpeg-devel-bounces@ffmpeg.org] On Behalf

> Of Linjie Fu

> Sent: Monday, April 15, 2019 9:24 PM

> To: ffmpeg-devel@ffmpeg.org

> Cc: Fu, Linjie <linjie.fu@intel.com>

> Subject: [FFmpeg-devel] [PATCH, v3] lavu/hwcontext_qsv: Fix the realign

> check for hwupload

> 

> Fix the aligned check in hwupload, input surface should be 16 aligned too.

> 

> Fix #7830.

> 

> Signed-off-by: Linjie Fu <linjie.fu@intel.com>

> ---

>  libavutil/hwcontext_qsv.c | 3 +--

>  1 file changed, 1 insertion(+), 2 deletions(-)

> 

> diff --git a/libavutil/hwcontext_qsv.c b/libavutil/hwcontext_qsv.c index

> b6d8bfe2bf..197dd8002a 100644

> --- a/libavutil/hwcontext_qsv.c

> +++ b/libavutil/hwcontext_qsv.c

> @@ -891,8 +891,7 @@ static int

> qsv_transfer_data_to(AVHWFramesContext *ctx, AVFrame *dst,

>      if (ret < 0)

>          return ret;

> 

> -

> -    if (src->height & 16 || src->linesize[0] & 16) {

> +    if (src->height & 15 || src->linesize[0] & 15) {

>          realigned = 1;

>          memset(&tmp_frame, 0, sizeof(tmp_frame));

>          tmp_frame.format         = src->format;

> --

> 2.17.1


LGTM, will apply.
diff mbox

Patch

diff --git a/libavutil/hwcontext_qsv.c b/libavutil/hwcontext_qsv.c
index b6d8bfe2bf..197dd8002a 100644
--- a/libavutil/hwcontext_qsv.c
+++ b/libavutil/hwcontext_qsv.c
@@ -891,8 +891,7 @@  static int qsv_transfer_data_to(AVHWFramesContext *ctx, AVFrame *dst,
     if (ret < 0)
         return ret;
 
-
-    if (src->height & 16 || src->linesize[0] & 16) {
+    if (src->height & 15 || src->linesize[0] & 15) {
         realigned = 1;
         memset(&tmp_frame, 0, sizeof(tmp_frame));
         tmp_frame.format         = src->format;