lavc/qsv: default PicStruct to progressive.

Message ID 1518424636-12095-1-git-send-email-ruiling.song@intel.com
State Committed
Commit 8ca39b855a7b0e4d9f726fa9d285bc8edcb953e6
Headers show
Series
  • lavc/qsv: default PicStruct to progressive.
Related show

Commit Message

Ruiling Song Feb. 12, 2018, 8:37 a.m.
the PicStruct is required by MediaSDK, so give a default value.
hwupload does not work without this.

Signed-off-by: Ruiling Song <ruiling.song@intel.com>
---
 libavutil/hwcontext_qsv.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Luca Barbato Feb. 12, 2018, 9:28 a.m. | #1
On 12/02/2018 09:37, Ruiling Song wrote:
> the PicStruct is required by MediaSDK, so give a default value.
> hwupload does not work without this.
> 
> Signed-off-by: Ruiling Song <ruiling.song@intel.com>
> ---
>   libavutil/hwcontext_qsv.c | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/libavutil/hwcontext_qsv.c b/libavutil/hwcontext_qsv.c
> index 9fa603c..73b5f24 100644
> --- a/libavutil/hwcontext_qsv.c
> +++ b/libavutil/hwcontext_qsv.c
> @@ -313,6 +313,7 @@ static int qsv_init_surface(AVHWFramesContext *ctx, mfxFrameSurface1 *surf)
>       surf->Info.CropH          = ctx->height;
>       surf->Info.FrameRateExtN  = 25;
>       surf->Info.FrameRateExtD  = 1;
> +    surf->Info.PicStruct      = MFX_PICSTRUCT_PROGRESSIVE;
>   
>       return 0;
>   }
> 

Sure.
Ruiling Song Feb. 22, 2018, 4:57 a.m. | #2
> -----Original Message-----
> From: libav-devel [mailto:libav-devel-bounces@libav.org] On Behalf Of Luca
> Barbato
> Sent: Monday, February 12, 2018 5:29 PM
> To: libav-devel@libav.org
> Subject: Re: [libav-devel] [PATCH] lavc/qsv: default PicStruct to progressive.
> 
> On 12/02/2018 09:37, Ruiling Song wrote:
> > the PicStruct is required by MediaSDK, so give a default value.
> > hwupload does not work without this.
> >
> > Signed-off-by: Ruiling Song <ruiling.song@intel.com>
> > ---
> >   libavutil/hwcontext_qsv.c | 1 +
> >   1 file changed, 1 insertion(+)
> >
> > diff --git a/libavutil/hwcontext_qsv.c b/libavutil/hwcontext_qsv.c
> > index 9fa603c..73b5f24 100644
> > --- a/libavutil/hwcontext_qsv.c
> > +++ b/libavutil/hwcontext_qsv.c
> > @@ -313,6 +313,7 @@ static int qsv_init_surface(AVHWFramesContext *ctx,
> mfxFrameSurface1 *surf)
> >       surf->Info.CropH          = ctx->height;
> >       surf->Info.FrameRateExtN  = 25;
> >       surf->Info.FrameRateExtD  = 1;
> > +    surf->Info.PicStruct      = MFX_PICSTRUCT_PROGRESSIVE;
> >
> >       return 0;
> >   }
> >
> 
> Sure.
Can you help merge?

Ruiling
Luca Barbato Feb. 22, 2018, 10:25 a.m. | #3
On 22/02/2018 05:57, Song, Ruiling wrote:
>> -----Original Message-----
>> From: libav-devel [mailto:libav-devel-bounces@libav.org] On Behalf Of Luca
>> Barbato
>> Sent: Monday, February 12, 2018 5:29 PM
>> To: libav-devel@libav.org
>> Subject: Re: [libav-devel] [PATCH] lavc/qsv: default PicStruct to progressive.
>>
>> On 12/02/2018 09:37, Ruiling Song wrote:
>>> the PicStruct is required by MediaSDK, so give a default value.
>>> hwupload does not work without this.
>>>
>>> Signed-off-by: Ruiling Song <ruiling.song@intel.com>
>>> ---
>>>    libavutil/hwcontext_qsv.c | 1 +
>>>    1 file changed, 1 insertion(+)
>>>
>>> diff --git a/libavutil/hwcontext_qsv.c b/libavutil/hwcontext_qsv.c
>>> index 9fa603c..73b5f24 100644
>>> --- a/libavutil/hwcontext_qsv.c
>>> +++ b/libavutil/hwcontext_qsv.c
>>> @@ -313,6 +313,7 @@ static int qsv_init_surface(AVHWFramesContext *ctx,
>> mfxFrameSurface1 *surf)
>>>        surf->Info.CropH          = ctx->height;
>>>        surf->Info.FrameRateExtN  = 25;
>>>        surf->Info.FrameRateExtD  = 1;
>>> +    surf->Info.PicStruct      = MFX_PICSTRUCT_PROGRESSIVE;
>>>
>>>        return 0;
>>>    }
>>>
>>
>> Sure.
> Can you help merge?
> 

Merged, sorry for the delay :)

Patch

diff --git a/libavutil/hwcontext_qsv.c b/libavutil/hwcontext_qsv.c
index 9fa603c..73b5f24 100644
--- a/libavutil/hwcontext_qsv.c
+++ b/libavutil/hwcontext_qsv.c
@@ -313,6 +313,7 @@  static int qsv_init_surface(AVHWFramesContext *ctx, mfxFrameSurface1 *surf)
     surf->Info.CropH          = ctx->height;
     surf->Info.FrameRateExtN  = 25;
     surf->Info.FrameRateExtD  = 1;
+    surf->Info.PicStruct      = MFX_PICSTRUCT_PROGRESSIVE;
 
     return 0;
 }