diff mbox series

[FFmpeg-devel,v2,13/22] lavfi/scale_qsv: add more input / output pixel formats

Message ID 20210517032426.3376661-14-haihao.xiang@intel.com
State Superseded
Headers show
Series clean-up QSV filters | expand

Checks

Context Check Description
andriy/x86_make success Make finished
andriy/x86_make_fate success Make fate finished
andriy/PPC64_make success Make finished
andriy/PPC64_make_fate success Make fate finished

Commit Message

Xiang, Haihao May 17, 2021, 3:24 a.m. UTC
NV12 and P010 are added

$ ffmpeg -init_hw_device qsv -c:v h264_qsv -i input.h264 -vf
"scale_qsv=format=p010" -f null -
---
 libavfilter/vf_vpp_qsv.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

Comments

Linjie Fu June 6, 2021, 2:53 p.m. UTC | #1
On Mon, May 17, 2021 at 11:30 AM Haihao Xiang <haihao.xiang@intel.com> wrote:
>
> NV12 and P010 are added
>
> $ ffmpeg -init_hw_device qsv -c:v h264_qsv -i input.h264 -vf
> "scale_qsv=format=p010" -f null -
> ---
>  libavfilter/vf_vpp_qsv.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/libavfilter/vf_vpp_qsv.c b/libavfilter/vf_vpp_qsv.c
> index bceee8c4df..29ba220665 100644
> --- a/libavfilter/vf_vpp_qsv.c
> +++ b/libavfilter/vf_vpp_qsv.c
> @@ -665,7 +665,10 @@ DEFINE_QSV_FILTER(vpp, vpp, "VPP");
>  static int qsvscale_query_formats(AVFilterContext *ctx)
>  {
>      static const enum AVPixelFormat pixel_formats[] = {
> -        AV_PIX_FMT_QSV, AV_PIX_FMT_NONE,
> +        AV_PIX_FMT_NV12,
> +        AV_PIX_FMT_P010,
> +        AV_PIX_FMT_QSV,
> +        AV_PIX_FMT_NONE,
>      };
>      AVFilterFormats *pix_fmts = ff_make_format_list(pixel_formats);
>

LGTM, also verified it works as expected, thx.

- Linjie
Valerii Zapodovnikov June 6, 2021, 3:27 p.m. UTC | #2
I hope it is the case since there was a problem with Intel P010 in Intel.

#8055, comment 1, sample_YUV_intel10bits(P010LE).7z

I still do not know what pixel format to force to decode that sample :)
Xiang, Haihao June 6, 2021, 4:51 p.m. UTC | #3
> I hope it is the case since there was a problem with Intel P010 in Intel.
> 
> #8055, comment 1, sample_YUV_intel10bits(P010LE).7z

The MSB 10bit is available for P010 in FFmpeg, however it is the LSB 10bit in
your file. 

> 
> I still do not know what pixel format to force to decode that sample :)

AFAIK FFmpeg didn't define a pixel format for your sample. 

Thanks
Haihao

> _______________________________________________
> 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".
Valerii Zapodovnikov June 6, 2021, 4:58 p.m. UTC | #4
So there are 4 formats two for le and 2 for be? Oogh. Do you know which one
is used for dshow?
Xiang, Haihao June 7, 2021, 1:57 a.m. UTC | #5
> So there are 4 formats two for le and 2 for be?

Yes, I think so.

>  Oogh. Do you know which one
> is used for dshow?

I didn't use dshow, but I think it should be the format using MSB 10bit, see 
https://docs.microsoft.com/en-us/windows/win32/medfound/10-bit-and-16-bit-yuv-video-formats#overview

> _______________________________________________
> 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/libavfilter/vf_vpp_qsv.c b/libavfilter/vf_vpp_qsv.c
index bceee8c4df..29ba220665 100644
--- a/libavfilter/vf_vpp_qsv.c
+++ b/libavfilter/vf_vpp_qsv.c
@@ -665,7 +665,10 @@  DEFINE_QSV_FILTER(vpp, vpp, "VPP");
 static int qsvscale_query_formats(AVFilterContext *ctx)
 {
     static const enum AVPixelFormat pixel_formats[] = {
-        AV_PIX_FMT_QSV, AV_PIX_FMT_NONE,
+        AV_PIX_FMT_NV12,
+        AV_PIX_FMT_P010,
+        AV_PIX_FMT_QSV,
+        AV_PIX_FMT_NONE,
     };
     AVFilterFormats *pix_fmts = ff_make_format_list(pixel_formats);