diff mbox series

[FFmpeg-devel] lavc/qsvenc_h264: don't support P010 format

Message ID 20221124052209.520239-1-haihao.xiang@intel.com
State New
Headers show
Series [FFmpeg-devel] lavc/qsvenc_h264: don't support P010 format | expand

Checks

Context Check Description
yinshiyou/make_loongarch64 success Make finished
yinshiyou/make_fate_loongarch64 success Make fate finished
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

Xiang, Haihao Nov. 24, 2022, 5:22 a.m. UTC
From: Haihao Xiang <haihao.xiang@intel.com>

Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
---
 libavcodec/qsvenc_h264.c | 1 -
 1 file changed, 1 deletion(-)

Comments

Anton Khirnov Nov. 25, 2022, 1:45 p.m. UTC | #1
Why?
Soft Works Nov. 25, 2022, 6:03 p.m. UTC | #2
> -----Original Message-----
> From: ffmpeg-devel <ffmpeg-devel-bounces@ffmpeg.org> On Behalf Of
> Anton Khirnov
> Sent: Friday, November 25, 2022 2:46 PM
> To: FFmpeg development discussions and patches <ffmpeg-
> devel@ffmpeg.org>
> Cc: Haihao Xiang <haihao.xiang@intel.com>
> Subject: Re: [FFmpeg-devel] [PATCH] lavc/qsvenc_h264: don't support
> P010 format
> 
> Why?

It's rarely used. There's not even a hwaccel that can decode this.

softworkz
James Almer Nov. 25, 2022, 7:47 p.m. UTC | #3
On 11/25/2022 3:03 PM, Soft Works wrote:
> 
> 
>> -----Original Message-----
>> From: ffmpeg-devel <ffmpeg-devel-bounces@ffmpeg.org> On Behalf Of
>> Anton Khirnov
>> Sent: Friday, November 25, 2022 2:46 PM
>> To: FFmpeg development discussions and patches <ffmpeg-
>> devel@ffmpeg.org>
>> Cc: Haihao Xiang <haihao.xiang@intel.com>
>> Subject: Re: [FFmpeg-devel] [PATCH] lavc/qsvenc_h264: don't support
>> P010 format
>>
>> Why?
> 
> It's rarely used. There's not even a hwaccel that can decode this.

The dxva2/d3d11 hwaccels seemingly do, as does the qsv decoder. And 
being rarely used alone is not a reason to remove something. There needs 
to be some benefit to justify it (Simplifying maintenance, removing 
legacy code, etc).

Also, p010 can be generated by swscale, and the only other software 
pixel format supported in this list is nv12, which is 8bit. If we remove 
p010, we would be making 10bit encodings not longer work with the output 
of software decoders as input, right?
Soft Works Nov. 25, 2022, 11:20 p.m. UTC | #4
> -----Original Message-----
> From: ffmpeg-devel <ffmpeg-devel-bounces@ffmpeg.org> On Behalf Of
> James Almer
> Sent: Friday, November 25, 2022 8:48 PM
> To: ffmpeg-devel@ffmpeg.org
> Subject: Re: [FFmpeg-devel] [PATCH] lavc/qsvenc_h264: don't support
> P010 format
> 
> On 11/25/2022 3:03 PM, Soft Works wrote:
> >
> >
> >> -----Original Message-----
> >> From: ffmpeg-devel <ffmpeg-devel-bounces@ffmpeg.org> On Behalf Of
> >> Anton Khirnov
> >> Sent: Friday, November 25, 2022 2:46 PM
> >> To: FFmpeg development discussions and patches <ffmpeg-
> >> devel@ffmpeg.org>
> >> Cc: Haihao Xiang <haihao.xiang@intel.com>
> >> Subject: Re: [FFmpeg-devel] [PATCH] lavc/qsvenc_h264: don't
> support
> >> P010 format
> >>
> >> Why?
> >
> > It's rarely used. There's not even a hwaccel that can decode this.
> 
> The dxva2/d3d11 hwaccels seemingly do

No, only for HEVC and VP9. Probably for AV1 as well  in the near future.

But not for H.264. Not for the 3 decoder GUIDs that ffmpeg supports..

https://www.ffmpeg.org/doxygen/5.1/dxva2_8c_source.html (Line 39-41)

...neither for any of the others which are known.

I'm doing some comprehensive detection of HW capabilities, which 
includes enumerating DXVA2/DX11VA decoders and "render targets" 
(which map to color formats). I have a large collection of such detection
logs and I've never seen any H.264 DXVA2/DX11VA decoder which would
support 10bit decoding.

Here's an example how it looks like for a system with contemporary 
Nvidia and Intel GPUs:

"Detection Log",
"Debug:  Create DXGI Factory",
"Debug:  DXGI Factory created",
"Debug:  Detected 3 video adapters.",
"Info:   Adapter #0: 'NVIDIA Quadro RTX 4000' Id:7857 (Driver: , Vendor: 4318)",
"Debug:  Device successfully created",
"Debug:  VideoDevice successfully created",
"Info:   86695f12-340e-4f04-9fd3-9253dd327460: DXVA2_ModeMPEG2and1_VLD MPEG-2 & MPEG-1 variable-length decoder - mpeg2video",
"Info:   ee27417f-5e28-4e65-beea-1d26b508adc9: DXVA2_ModeMPEG2_VLD MPEG-2 variable-length decoder - mpeg2video",
"Info:   6f3ec719-3735-42cc-8063-65cc3cb36616: DXVA2_ModeMPEG1_VLD MPEG-1 variable-length decoder - mpeg1video",
"Info:   1b81bea4-a0c7-11d3-b984-00c04f2e73c5: DXVA2_ModeVC1_D2010 VC-1 variable-length decoder (2010) - vc1",
"Info:   1b81bea3-a0c7-11d3-b984-00c04f2e73c5: DXVA2_ModeVC1_D VC-1 variable-length decoder - vc1",
"Info:   32fcfe3f-de46-4a49-861b-ac71110649d5:   - ",
"Info:   d79be8da-0cf1-4c81-b82a-69a4e236f43d: DXVA2_ModeH264_VLD_Stereo_Progressive_NoFGT H.264 MVC variable-length decoder, stereo, progressive - h264",
"Info:   f9aaccbb-c2b6-4cfc-8779-5707b1760552: DXVA2_ModeH264_VLD_Stereo_NoFGT H.264 MVC variable-length decoder, stereo - h264",
"Info:   1b81be68-a0c7-11d3-b984-00c04f2e73c5: DXVA2_ModeH264_E H.264 variable-length decoder, no film grain technology - h264",
"Info:   5b11d51b-2f4c-4452-bcc3-09f2a1160cc0: DXVA2_ModeHEVC_VLD_Main H.265 variable-length decoder, Main profile - hevc",
"Info:   107af0e0-ef1a-4d19-aba8-67a163073d13: DXVA2_ModeHEVC_VLD_Main10 H.265 variable-length decoder, Main 10 profile - hevc",
"Info:   20bb8b0a-97aa-4571-8e99-64e60606c1a6:   - ",
"Info:   15df9b21-06c4-47f1-841e-a67c97d7f312:   - ",
"Info:   efd64d74-c9e8-41d7-a5e9-e9b0e39fa319: DXVA2_ModeMPEG4pt2_VLD_Simple MPEG-4 Part 2 variable-length decoder, Simple profile - mpeg4",
"Info:   ed418a9f-010d-4eda-9ae3-9a65358d8d2e: DXVA2_ModeMPEG4pt2_VLD_AdvSimple_NoGMC MPEG-4 Part 2 variable-length decoder, Simple & Advanced profile, no GMC - mpeg4",
"Info:   9947ec6f-689b-11dc-a320-0019dbbc4184: DXVA2_nVidia_MPEG4_ASP MPEG-4 Part 2 nVidia bitstream decoder - mpeg4",
"Info:   33fcfe41-de46-4a49-861b-ac71110649d5:   - ",
"Info:   463707f8-a1d0-4585-876d-83aa6d60b89e: DXVA2_ModeVP9_VLD_Profile0 VP9 Profile 0 - vp9",
"Info:   a4c749ef-6ecf-48aa-8448-50a7a1165ff7: DXVA2_ModeVP9_VLD_10bit_Profile2 VP9 10 bit Profile 2 - vp9",
"Info:   dda19dc7-93b5-49f5-a9b3-2bda28a2ce6e:   - ",
"Info:   6affd11e-1d96-42b1-a215-93a31f09a53d:   - ",
"Info:   914c84a3-4078-4fa9-984c-e2f262cb5c9c:   - ",
"Info:   8a1a1031-29bc-46d0-a007-e9b092ca6767:   - ",
"Debug:    DXVA2_ModeMPEG2and1_VLD - ColorFormat #0: NV12 => nv12",
"Debug:      Supported Resolutions:   160x120, 176x144, 320x240, 352x288, 720x480, 720x240, 720x576, 1280x720, 1920x1080, 2048x1024, 2048x1080, 3140x2160, 3680x1536, 3840x2160",
"Debug:      Unsupported Resolutions: 4096x2048, 4096x2160, 4096x2176, 7680x4320, 8192x4320, 8192x4352",
"Debug:      Max Resolution: 3840x2160",
"Debug:    DXVA2_ModeMPEG2and1_VLD - ColorFormat #1: Opaque420 => yuv420p",
"Debug:      Supported Resolutions:   160x120, 176x144, 320x240, 352x288, 720x480, 720x240, 720x576, 1280x720, 1920x1080, 2048x1024, 2048x1080, 3140x2160, 3680x1536, 3840x2160",
"Debug:      Unsupported Resolutions: 4096x2048, 4096x2160, 4096x2176, 7680x4320, 8192x4320, 8192x4352",
"Debug:      Max Resolution: 3840x2160",
"Debug:    DXVA2_ModeMPEG2_VLD - ColorFormat #0: NV12 => nv12",
"Debug:      Supported Resolutions:   160x120, 176x144, 320x240, 352x288, 720x480, 720x240, 720x576, 1280x720, 1920x1080, 2048x1024, 2048x1080, 3140x2160, 3680x1536, 3840x2160",
"Debug:      Unsupported Resolutions: 4096x2048, 4096x2160, 4096x2176, 7680x4320, 8192x4320, 8192x4352",
"Debug:      Max Resolution: 3840x2160",
"Debug:    DXVA2_ModeMPEG2_VLD - ColorFormat #1: Opaque420 => yuv420p",
"Debug:      Supported Resolutions:   160x120, 176x144, 320x240, 352x288, 720x480, 720x240, 720x576, 1280x720, 1920x1080, 2048x1024, 2048x1080, 3140x2160, 3680x1536, 3840x2160",
"Debug:      Unsupported Resolutions: 4096x2048, 4096x2160, 4096x2176, 7680x4320, 8192x4320, 8192x4352",
"Debug:      Max Resolution: 3840x2160",
"Debug:    DXVA2_ModeMPEG1_VLD - ColorFormat #0: NV12 => nv12",
"Debug:      Supported Resolutions:   160x120, 176x144, 320x240, 352x288, 720x480, 720x240, 720x576, 1280x720, 1920x1080, 2048x1024, 2048x1080, 3140x2160, 3680x1536, 3840x2160",
"Debug:      Unsupported Resolutions: 4096x2048, 4096x2160, 4096x2176, 7680x4320, 8192x4320, 8192x4352",
"Debug:      Max Resolution: 3840x2160",
"Debug:    DXVA2_ModeMPEG1_VLD - ColorFormat #1: Opaque420 => yuv420p",
"Debug:      Supported Resolutions:   160x120, 176x144, 320x240, 352x288, 720x480, 720x240, 720x576, 1280x720, 1920x1080, 2048x1024, 2048x1080, 3140x2160, 3680x1536, 3840x2160",
"Debug:      Unsupported Resolutions: 4096x2048, 4096x2160, 4096x2176, 7680x4320, 8192x4320, 8192x4352",
"Debug:      Max Resolution: 3840x2160",
"Debug:  Video decoder of unsupported type (mpeg1video) detected: mpeg1video ",
"Debug:    DXVA2_ModeVC1_D2010 - ColorFormat #0: NV12 => nv12",
"Debug:      Supported Resolutions:   160x120, 176x144, 320x240, 352x288, 720x480, 720x240, 720x576, 1280x720, 1920x1080",
"Debug:      Unsupported Resolutions: 2048x1024, 2048x1080, 3140x2160, 3680x1536, 3840x2160, 4096x2048, 4096x2160, 4096x2176, 7680x4320, 8192x4320, 8192x4352",
"Debug:      Max Resolution: 1920x1080",
"Debug:    DXVA2_ModeVC1_D2010 - ColorFormat #1: Opaque420 => yuv420p",
"Debug:      Supported Resolutions:   160x120, 176x144, 320x240, 352x288, 720x480, 720x240, 720x576, 1280x720, 1920x1080",
"Debug:      Unsupported Resolutions: 2048x1024, 2048x1080, 3140x2160, 3680x1536, 3840x2160, 4096x2048, 4096x2160, 4096x2176, 7680x4320, 8192x4320, 8192x4352",
"Debug:      Max Resolution: 1920x1080",
"Debug:    DXVA2_ModeVC1_D - ColorFormat #0: NV12 => nv12",
"Debug:      Supported Resolutions:   160x120, 176x144, 320x240, 352x288, 720x480, 720x240, 720x576, 1280x720, 1920x1080",
"Debug:      Unsupported Resolutions: 2048x1024, 2048x1080, 3140x2160, 3680x1536, 3840x2160, 4096x2048, 4096x2160, 4096x2176, 7680x4320, 8192x4320, 8192x4352",
"Debug:      Max Resolution: 1920x1080",
"Debug:    DXVA2_ModeVC1_D - ColorFormat #1: Opaque420 => yuv420p",
"Debug:      Supported Resolutions:   160x120, 176x144, 320x240, 352x288, 720x480, 720x240, 720x576, 1280x720, 1920x1080",
"Debug:      Unsupported Resolutions: 2048x1024, 2048x1080, 3140x2160, 3680x1536, 3840x2160, 4096x2048, 4096x2160, 4096x2176, 7680x4320, 8192x4320, 8192x4352",
"Debug:      Max Resolution: 1920x1080",
"Debug:    DXVA2_ModeH264_VLD_Stereo_Progressive_NoFGT - ColorFormat #0: NV12 => nv12",
"Debug:      Supported Resolutions:   128x96, 176x144, 352x288, 352x480, 352x576, 720x480, 720x576, 1280x720, 1280x1024, 1920x1080, 1920x1088, 2048x1024, 2048x1088, 2560x1920, 3680x1536, 3840x2106, 3840x2160, 4096x2048, 4096x2160, 4096x2304",
"Debug:      Unsupported Resolutions: 7680x4320, 8192x4320",
"Debug:      Max Resolution: 4096x2304",
"Debug:    DXVA2_ModeH264_VLD_Stereo_Progressive_NoFGT - ColorFormat #1: Opaque420 => yuv420p",
"Debug:      Supported Resolutions:   128x96, 176x144, 352x288, 352x480, 352x576, 720x480, 720x576, 1280x720, 1280x1024, 1920x1080, 1920x1088, 2048x1024, 2048x1088, 2560x1920, 3680x1536, 3840x2106, 3840x2160, 4096x2048, 4096x2160, 4096x2304",
"Debug:      Unsupported Resolutions: 7680x4320, 8192x4320",
"Debug:      Max Resolution: 4096x2304",
"Debug:    DXVA2_ModeH264_VLD_Stereo_NoFGT - ColorFormat #0: NV12 => nv12",
"Debug:      Supported Resolutions:   128x96, 176x144, 352x288, 352x480, 352x576, 720x480, 720x576, 1280x720, 1280x1024, 1920x1080, 1920x1088, 2048x1024, 2048x1088, 2560x1920, 3680x1536, 3840x2106, 3840x2160, 4096x2048, 4096x2160, 4096x2304",
"Debug:      Unsupported Resolutions: 7680x4320, 8192x4320",
"Debug:      Max Resolution: 4096x2304",
"Debug:    DXVA2_ModeH264_VLD_Stereo_NoFGT - ColorFormat #1: Opaque420 => yuv420p",
"Debug:      Supported Resolutions:   128x96, 176x144, 352x288, 352x480, 352x576, 720x480, 720x576, 1280x720, 1280x1024, 1920x1080, 1920x1088, 2048x1024, 2048x1088, 2560x1920, 3680x1536, 3840x2106, 3840x2160, 4096x2048, 4096x2160, 4096x2304",
"Debug:      Unsupported Resolutions: 7680x4320, 8192x4320",
"Debug:      Max Resolution: 4096x2304",
"Debug:    DXVA2_ModeH264_E - ColorFormat #0: NV12 => nv12",
"Debug:      Supported Resolutions:   128x96, 176x144, 352x288, 352x480, 352x576, 720x480, 720x576, 1280x720, 1280x1024, 1920x1080, 1920x1088, 2048x1024, 2048x1088, 2560x1920, 3680x1536, 3840x2106, 3840x2160, 4096x2048, 4096x2160, 4096x2304",
"Debug:      Unsupported Resolutions: 7680x4320, 8192x4320",
"Debug:      Max Resolution: 4096x2304",
"Debug:    DXVA2_ModeH264_E - ColorFormat #1: Opaque420 => yuv420p",
"Debug:      Supported Resolutions:   128x96, 176x144, 352x288, 352x480, 352x576, 720x480, 720x576, 1280x720, 1280x1024, 1920x1080, 1920x1088, 2048x1024, 2048x1088, 2560x1920, 3680x1536, 3840x2106, 3840x2160, 4096x2048, 4096x2160, 4096x2304",
"Debug:      Unsupported Resolutions: 7680x4320, 8192x4320",
"Debug:      Max Resolution: 4096x2304",
"Debug:    DXVA2_ModeHEVC_VLD_Main - ColorFormat #0: NV12 => nv12",
"Debug:      Supported Resolutions:   176x144, 352x288, 640x360, 720x576, 960x540, 1280x720, 1920x1080, 2048x1080, 3840x2160, 4096x2160, 7680x4320, 8192x4320, 8192x8192",
"Debug:      Unsupported Resolutions: 128x96",
"Debug:      Max Resolution: 8192x8192",
"Debug:    DXVA2_ModeHEVC_VLD_Main - ColorFormat #1: Opaque420 => yuv420p",
"Debug:      Supported Resolutions:   176x144, 352x288, 640x360, 720x576, 960x540, 1280x720, 1920x1080, 2048x1080, 3840x2160, 4096x2160, 7680x4320, 8192x4320, 8192x8192",
"Debug:      Unsupported Resolutions: 128x96",
"Debug:      Max Resolution: 8192x8192",
"Debug:    DXVA2_ModeHEVC_VLD_Main10 - ColorFormat #0: P010 => p010",
"Debug:      Supported Resolutions:   176x144, 352x288, 640x360, 720x576, 960x540, 1280x720, 1920x1080, 2048x1080, 3840x2160, 4096x2160, 7680x4320, 8192x4320, 8192x8192",
"Debug:      Unsupported Resolutions: 128x96",
"Debug:      Max Resolution: 8192x8192",
"Debug:    DXVA2_ModeMPEG4pt2_VLD_Simple - ColorFormat #0: NV12 => nv12",
"Debug:      Supported Resolutions:   128x96, 144x96, 176x144, 256x192, 304x192, 352x288, 352x576, 640x480, 704x288, 720x576, 1280x720",
"Debug:      Unsupported Resolutions: ",
"Debug:      Max Resolution: 1280x720",
"Debug:    DXVA2_ModeMPEG4pt2_VLD_Simple - ColorFormat #1: Opaque420 => yuv420p",
"Debug:      Supported Resolutions:   128x96, 144x96, 176x144, 256x192, 304x192, 352x288, 352x576, 640x480, 704x288, 720x576, 1280x720",
"Debug:      Unsupported Resolutions: ",
"Debug:      Max Resolution: 1280x720",
"Debug:    DXVA2_ModeMPEG4pt2_VLD_AdvSimple_NoGMC - ColorFormat #0: NV12 => nv12",
"Debug:      Supported Resolutions:   128x96, 144x96, 176x144, 256x192, 304x192, 352x288, 352x576, 640x480, 704x288, 720x576, 1280x720",
"Debug:      Unsupported Resolutions: ",
"Debug:      Max Resolution: 1280x720",
"Debug:    DXVA2_ModeMPEG4pt2_VLD_AdvSimple_NoGMC - ColorFormat #1: Opaque420 => yuv420p",
"Debug:      Supported Resolutions:   128x96, 144x96, 176x144, 256x192, 304x192, 352x288, 352x576, 640x480, 704x288, 720x576, 1280x720",
"Debug:      Unsupported Resolutions: ",
"Debug:      Max Resolution: 1280x720",
"Debug:    DXVA2_nVidia_MPEG4_ASP - ColorFormat #0: NV12 => nv12",
"Debug:      Supported Resolutions:   128x96, 144x96, 176x144, 256x192, 304x192, 352x288, 352x576, 640x480, 704x288, 720x576, 1280x720",
"Debug:      Unsupported Resolutions: ",
"Debug:      Max Resolution: 1280x720",
"Debug:    DXVA2_nVidia_MPEG4_ASP - ColorFormat #1: Opaque420 => yuv420p",
"Debug:      Supported Resolutions:   128x96, 144x96, 176x144, 256x192, 304x192, 352x288, 352x576, 640x480, 704x288, 720x576, 1280x720",
"Debug:      Unsupported Resolutions: ",
"Debug:      Max Resolution: 1280x720",
"Debug:  Video decoder of unsupported type (mpeg4) detected: mpeg4 ",
"Debug:    DXVA2_ModeVP9_VLD_Profile0 - ColorFormat #0: NV12 => nv12",
"Debug:      Supported Resolutions:   256x144, 384x192, 480x256, 640x384, 1080x512, 1280x768, 2048x1088, 4096x2176, 8192x4352",
"Debug:      Unsupported Resolutions: ",
"Debug:      Max Resolution: 8192x4352",
"Debug:    DXVA2_ModeVP9_VLD_Profile0 - ColorFormat #1: Opaque420 => yuv420p",
"Debug:      Supported Resolutions:   256x144, 384x192, 480x256, 640x384, 1080x512, 1280x768, 2048x1088, 4096x2176, 8192x4352",
"Debug:      Unsupported Resolutions: ",
"Debug:      Max Resolution: 8192x4352",
"Debug:    DXVA2_ModeVP9_VLD_10bit_Profile2 - ColorFormat #0: P010 => p010",
"Debug:      Supported Resolutions:   256x144, 384x192, 480x256, 640x384, 1080x512, 1280x768, 2048x1088, 4096x2176, 8192x4352",
"Debug:      Unsupported Resolutions: ",
"Debug:      Max Resolution: 8192x4352",
"Debug:    DXVA2_ModeVP9_VLD_10bit_Profile2 - ColorFormat #1: Opaque420 => yuv420p",
"Debug:      Supported Resolutions:   256x144, 384x192, 480x256, 640x384, 1080x512, 1280x768, 2048x1088, 4096x2176, 8192x4352",
"Debug:      Unsupported Resolutions: ",
"Debug:      Max Resolution: 8192x4352",
"Debug:  Dispose DecoderService",
"Debug:  DecoderService disposed",
"Debug:  Dispose Dx11Device",
"Debug:  Dx11Device disposed",
"Info:   Adapter #1: 'Intel(R) UHD Graphics 750' Id:19594 (Driver: , Vendor: 32902)",
"Debug:  Device successfully created",
"Debug:  VideoDevice successfully created",
"Info:   ee27417f-5e28-4e65-beea-1d26b508adc9: DXVA2_ModeMPEG2_VLD MPEG-2 variable-length decoder - mpeg2video",
"Info:   bf22ad00-03ea-4690-8077-473346209b7e: DXVA2_ModeMPEG2_IDCT MPEG-2 inverse discrete cosine transform - mpeg2video",
"Info:   1b81bea4-a0c7-11d3-b984-00c04f2e73c5: DXVA2_ModeVC1_D2010 VC-1 variable-length decoder (2010) - vc1",
"Info:   e07ec519-e651-4cd6-ac84-1370cceec851: DXVA2_Intel_VC1_ClearVideo_2 VC-1 variable-length decoder 2 (Intel) - vc1",
"Info:   bcc5db6d-a2b6-4af0-ace4-adb1f787bc89: DXVA2_Intel_VC1_ClearVideo VC-1 variable-length decoder (Intel) - vc1",
"Info:   1b81be94-a0c7-11d3-b984-00c04f2e73c5: DXVA2_ModeWMV9_C Windows Media Video 9 inverse discrete cosine transform - wmv3",
"Info:   1b81bea2-a0c7-11d3-b984-00c04f2e73c5: DXVA2_ModeVC1_C VC-1 inverse discrete cosine transform - vc1",
"Info:   1b81be68-a0c7-11d3-b984-00c04f2e73c5: DXVA2_ModeH264_E H.264 variable-length decoder, no film grain technology - h264",
"Info:   d79be8da-0cf1-4c81-b82a-69a4e236f43d: DXVA2_ModeH264_VLD_Stereo_Progressive_NoFGT H.264 MVC variable-length decoder, stereo, progressive - h264",
"Info:   f9aaccbb-c2b6-4cfc-8779-5707b1760552: DXVA2_ModeH264_VLD_Stereo_NoFGT H.264 MVC variable-length decoder, stereo - h264",
"Info:   705b9d82-76cf-49d6-b7e6-ac8872db013c: DXVA2_ModeH264_VLD_Multiview_NoFGT H.264 MVC variable-length decoder, multiview - h264",
"Info:   c528916c-c0af-4645-8cb2-372b6d4adc2a:   - ",
"Info:   91cd2d6e-897b-4fa1-b0d7-51dc88010e0a:   - ",
"Info:   97688186-56a8-4094-b543-fc9daaa49f4b:   - ",
"Info:   1424d4dc-7cf5-4bb1-9cd7-b63717a72a6b:   - ",
"Info:   c346e8a3-cbed-4d27-87cc-a70eb4dc8c27:   - ",
"Info:   ffc79924-5eaf-4666-a736-06190f281443:   - ",
"Info:   464bdb3c-91c4-4e9b-896f-225496ac4ed6:   - ",
"Info:   9b31316b-f204-455d-8a8c-9345dca77c01:   - ",
"Info:   afe4285c-ab63-4b2d-8278-e6baacea2ce9:   - ",
"Info:   277de9c5-ed83-48dd-ab8f-ac2d24b22943:   - ",
"Info:   04c5ba10-4e9a-4b8e-8dbf-4f4b48afa27c:   - ",
"Info:   0acef8bc-285f-415d-ab22-7bf2527a3d2e:   - ",
"Info:   24d19fca-c5a2-4b8e-9f93-f8f6ef15c890:   - ",
"Info:   353aca91-d945-4c13-ae7e-469060fac8d8:   - ",
"Info:   28566328-f041-4466-8b14-8f5831e78f8b:   - ",
"Info:   6b4a94db-54fe-4ae1-9be4-7a7dad004600:   - ",
"Info:   b8b28e0c-ecab-4217-8c82-eaaa9755aaf0:   - ",
"Info:   8732ecfd-9747-4897-b42a-e534f9ff2b7a:   - ",
"Info:   e139b5ca-47b2-40e1-af1c-ad71a67a1836:   - ",
"Info:   056a6e36-f3a8-4d00-9663-7e9430358bf9:   - ",
"Info:   5415a68c-231e-46f4-878b-5e9a22e967e9:   - ",
"Info:   161be912-44c2-49c0-b61e-d946852b32a1:   - ",
"Info:   d6d6bc4f-d51a-4712-97e8-750917c860fd:   - ",
"Info:   7fef652d-3233-44df-acf7-ecfb584dab35:   - ",
"Info:   87b2ae39-c9a5-4c53-86b8-a52d7edba488:   - ",
"Info:   10e19ac8-bf39-4443-bec3-1b0cbfe4c7aa:   - ",
"Info:   2dec00c7-21ee-4bf8-8f0e-773f11f126a2:   - ",
"Info:   c35153a0-23c0-4a81-b3bb-6a1326f2b76b:   - ",
"Info:   a33fd0ec-a9d3-4c21-9276-c241cc90f6c7:   - ",
"Info:   310e59d2-7ea4-47bb-b319-500e78855336:   - ",
"Info:   8c56eb1e-2b47-466f-8d33-7dbcd63f3df2:   - ",
"Info:   5b11d51b-2f4c-4452-bcc3-09f2a1160cc0: DXVA2_ModeHEVC_VLD_Main H.265 variable-length decoder, Main profile - hevc",
"Info:   75fc75f7-c589-4a07-a25b-72e03b0383b3:   - ",
"Info:   107af0e0-ef1a-4d19-aba8-67a163073d13: DXVA2_ModeHEVC_VLD_Main10 H.265 variable-length decoder, Main 10 profile - hevc",
"Info:   e484dcb8-cac9-4859-99f5-5c0d45069089:   - ",
"Info:   41a5af96-e415-4b0c-9d03-907858e23e78:   - ",
"Info:   6a6a81ba-912a-485d-b57f-ccd2d37b8d94:   - ",
"Info:   e4e3cf5b-97d2-4658-aacb-366e3ee2ceee:   - ",
"Info:   fd9d9559-0fd3-4917-a9a7-07e714ee9ef9:   - ",
"Info:   0e4bc693-5d2c-4936-b125-aefe32b16d8a:   - ",
"Info:   2f08b5b1-dbc2-4d48-883a-4e7b8174cff6:   - ",
"Info:   5467807a-295d-445d-bd2e-cba8c2457c3d:   - ",
"Info:   ae0d4e15-2360-40a8-bf82-028e6a0dd827:   - ",
"Info:   8ff8a3aa-c456-4132-b6ef-69d9dd72571d:   - ",
"Info:   c23dd857-874b-423c-b6e0-82ceaa9b118a:   - ",
"Info:   5b08e35d-0c66-4c51-a6f1-89d00cb2c197:   - ",
"Info:   07cfaffb-5a2e-4b99-b62a-e4ca53b6d5aa:   - ",
"Info:   463707f8-a1d0-4585-876d-83aa6d60b89e: DXVA2_ModeVP9_VLD_Profile0 VP9 Profile 0 - vp9",
"Info:   a4c749ef-6ecf-48aa-8448-50a7a1165ff7: DXVA2_ModeVP9_VLD_10bit_Profile2 VP9 10 bit Profile 2 - vp9",
"Info:   76988a52-df13-419a-8e64-ffcf4a336cf5:   - ",
"Info:   68a21c7b-d58f-4e74-9993-e4b8172b19a0:   - ",
"Info:   80a3a7bd-89d8-4497-a2b8-2126af7e6eb8:   - ",
"Info:   1d5c4d76-b55a-4430-904c-3383a7ae3b16:   - ",
"Info:   a7f759dd-5f54-4d7f-8291-42e883c546fe:   - ",
"Info:   f34fa92f-dc79-474c-b0db-b7bd4522df77:   - ",
"Info:   b8be4ccb-cf53-46ba-8d59-d6b8a6da5d2a:   - ",
"Info:   ca44afc5-e1d0-42e6-9154-b127186d4d40:   - ",
"Info:   f9a16190-3fb4-4dc5-9846-c8751f83d6d7:   - ",
"Info:   50925b7b-e931-4978-a12a-586630f095f9:   - ",
"Info:   b69c20e0-2508-8790-0305-875499e0a2d0:   - ",
"Info:   49761bec-4b63-4349-a5ff-87ffdf088466:   - ",
"Debug:    DXVA2_ModeMPEG2_VLD - ColorFormat #0: NV12 => nv12",
"Debug:      Supported Resolutions:   160x120, 176x144, 320x240, 352x288, 720x480, 720x240, 720x576, 1280x720, 1920x1080, 2048x1024, 2048x1080",
"Debug:      Unsupported Resolutions: 3140x2160, 3680x1536, 3840x2160, 4096x2048, 4096x2160, 4096x2176, 7680x4320, 8192x4320, 8192x4352",
"Debug:      Max Resolution: 2048x1080",
"Debug:    DXVA2_ModeMPEG2_VLD - ColorFormat #1: Opaque420 => yuv420p",
"Debug:      Supported Resolutions:   160x120, 176x144, 320x240, 352x288, 720x480, 720x240, 720x576, 1280x720, 1920x1080, 2048x1024, 2048x1080",
"Debug:      Unsupported Resolutions: 3140x2160, 3680x1536, 3840x2160, 4096x2048, 4096x2160, 4096x2176, 7680x4320, 8192x4320, 8192x4352",
"Debug:      Max Resolution: 2048x1080",
"Debug:    DXVA2_ModeMPEG2_IDCT - ColorFormat #0: NV12 => nv12",
"Debug:      Supported Resolutions:   160x120, 176x144, 320x240, 352x288, 720x480, 720x240, 720x576, 1280x720, 1920x1080, 2048x1024, 2048x1080",
"Debug:      Unsupported Resolutions: 3140x2160, 3680x1536, 3840x2160, 4096x2048, 4096x2160, 4096x2176, 7680x4320, 8192x4320, 8192x4352",
"Debug:      Max Resolution: 2048x1080",
"Debug:    DXVA2_ModeMPEG2_IDCT - ColorFormat #1: Opaque420 => yuv420p",
"Debug:      Supported Resolutions:   160x120, 176x144, 320x240, 352x288, 720x480, 720x240, 720x576, 1280x720, 1920x1080, 2048x1024, 2048x1080",
"Debug:      Unsupported Resolutions: 3140x2160, 3680x1536, 3840x2160, 4096x2048, 4096x2160, 4096x2176, 7680x4320, 8192x4320, 8192x4352",
"Debug:      Max Resolution: 2048x1080",
"Debug:    DXVA2_ModeVC1_D2010 - ColorFormat #0: NV12 => nv12",
"Debug:      Supported Resolutions:   160x120, 176x144, 320x240, 352x288, 720x480, 720x240, 720x576, 1280x720, 1920x1080, 2048x1024, 2048x1080, 3140x2160, 3680x1536, 3840x2160, 4096x2048, 4096x2160, 4096x2176",
"Debug:      Unsupported Resolutions: 7680x4320, 8192x4320, 8192x4352",
"Debug:      Max Resolution: 4096x2176",
"Debug:    DXVA2_ModeVC1_D2010 - ColorFormat #1: Opaque420 => yuv420p",
"Debug:      Supported Resolutions:   160x120, 176x144, 320x240, 352x288, 720x480, 720x240, 720x576, 1280x720, 1920x1080, 2048x1024, 2048x1080, 3140x2160, 3680x1536, 3840x2160, 4096x2048, 4096x2160, 4096x2176",
"Debug:      Unsupported Resolutions: 7680x4320, 8192x4320, 8192x4352",
"Debug:      Max Resolution: 4096x2176",
"Debug:    DXVA2_Intel_VC1_ClearVideo_2 - ColorFormat #0: NV12 => nv12",
"Debug:      Supported Resolutions:   160x120, 176x144, 320x240, 352x288, 720x480, 720x240, 720x576, 1280x720, 1920x1080, 2048x1024, 2048x1080, 3140x2160, 3680x1536, 3840x2160",
"Debug:      Unsupported Resolutions: 4096x2048, 4096x2160, 4096x2176, 7680x4320, 8192x4320, 8192x4352",
"Debug:      Max Resolution: 3840x2160",
"Debug:    DXVA2_Intel_VC1_ClearVideo_2 - ColorFormat #1: Opaque420 => yuv420p",
"Debug:      Supported Resolutions:   160x120, 176x144, 320x240, 352x288, 720x480, 720x240, 720x576, 1280x720, 1920x1080, 2048x1024, 2048x1080, 3140x2160, 3680x1536, 3840x2160",
"Debug:      Unsupported Resolutions: 4096x2048, 4096x2160, 4096x2176, 7680x4320, 8192x4320, 8192x4352",
"Debug:      Max Resolution: 3840x2160",
"Debug:    DXVA2_Intel_VC1_ClearVideo - ColorFormat #0: NV12 => nv12",
"Debug:      Supported Resolutions:   ",
"Debug:      Unsupported Resolutions: 160x120, 176x144, 320x240, 352x288, 720x480, 720x240, 720x576, 1280x720, 1920x1080, 2048x1024, 2048x1080, 3140x2160, 3680x1536, 3840x2160, 4096x2048, 4096x2160, 4096x2176, 7680x4320, 8192x4320, 8192x4352",
"Debug:    >>>>> Could not create any decoder instance",
"Debug:    DXVA2_Intel_VC1_ClearVideo - ColorFormat #1: Opaque420 => yuv420p",
"Debug:      Supported Resolutions:   ",
"Debug:      Unsupported Resolutions: 160x120, 176x144, 320x240, 352x288, 720x480, 720x240, 720x576, 1280x720, 1920x1080, 2048x1024, 2048x1080, 3140x2160, 3680x1536, 3840x2160, 4096x2048, 4096x2160, 4096x2176, 7680x4320, 8192x4320, 8192x4352",
"Debug:    >>>>> Could not create any decoder instance",
"Debug:    DXVA2_ModeVC1_C - ColorFormat #0: NV12 => nv12",
"Debug:      Supported Resolutions:   160x120, 176x144, 320x240, 352x288, 720x480, 720x240, 720x576, 1280x720, 1920x1080, 2048x1024, 2048x1080, 3140x2160, 3680x1536, 3840x2160",
"Debug:      Unsupported Resolutions: 4096x2048, 4096x2160, 4096x2176, 7680x4320, 8192x4320, 8192x4352",
"Debug:      Max Resolution: 3840x2160",
"Debug:    DXVA2_ModeVC1_C - ColorFormat #1: Opaque420 => yuv420p",
"Debug:      Supported Resolutions:   160x120, 176x144, 320x240, 352x288, 720x480, 720x240, 720x576, 1280x720, 1920x1080, 2048x1024, 2048x1080, 3140x2160, 3680x1536, 3840x2160",
"Debug:      Unsupported Resolutions: 4096x2048, 4096x2160, 4096x2176, 7680x4320, 8192x4320, 8192x4352",
"Debug:      Max Resolution: 3840x2160",
"Debug:    DXVA2_ModeWMV9_C - ColorFormat #0: NV12 => nv12",
"Debug:      Supported Resolutions:   160x120, 176x144, 320x240, 352x288, 720x480, 720x240, 720x576, 1280x720, 1920x1080, 2048x1024, 2048x1080, 3140x2160, 3680x1536, 3840x2160",
"Debug:      Unsupported Resolutions: 4096x2048, 4096x2160, 4096x2176, 7680x4320, 8192x4320, 8192x4352",
"Debug:      Max Resolution: 3840x2160",
"Debug:    DXVA2_ModeWMV9_C - ColorFormat #1: Opaque420 => yuv420p",
"Debug:      Supported Resolutions:   160x120, 176x144, 320x240, 352x288, 720x480, 720x240, 720x576, 1280x720, 1920x1080, 2048x1024, 2048x1080, 3140x2160, 3680x1536, 3840x2160",
"Debug:      Unsupported Resolutions: 4096x2048, 4096x2160, 4096x2176, 7680x4320, 8192x4320, 8192x4352",
"Debug:      Max Resolution: 3840x2160",
"Debug:  Video decoder of unsupported type (wmv3) detected: wmv3 ",
"Debug:    DXVA2_ModeH264_E - ColorFormat #0: AYUV => Unknown",
"Debug:      Supported Resolutions:   128x96, 176x144, 352x288, 352x480, 352x576, 720x480, 720x576, 1280x720, 1280x1024, 1920x1080, 1920x1088, 2048x1024, 2048x1088, 2560x1920, 3680x1536, 3840x2106, 3840x2160, 4096x2048, 4096x2160, 4096x2304",
"Debug:      Unsupported Resolutions: 7680x4320, 8192x4320",
"Debug:      Max Resolution: 4096x2304",
"Debug:    DXVA2_ModeH264_E - ColorFormat #1: NV12 => nv12",
"Debug:      Supported Resolutions:   128x96, 176x144, 352x288, 352x480, 352x576, 720x480, 720x576, 1280x720, 1280x1024, 1920x1080, 1920x1088, 2048x1024, 2048x1088, 2560x1920, 3680x1536, 3840x2106, 3840x2160, 4096x2048, 4096x2160, 4096x2304",
"Debug:      Unsupported Resolutions: 7680x4320, 8192x4320",
"Debug:      Max Resolution: 4096x2304",
"Debug:    DXVA2_ModeH264_E - ColorFormat #2: Opaque420 => yuv420p",
"Debug:      Supported Resolutions:   128x96, 176x144, 352x288, 352x480, 352x576, 720x480, 720x576, 1280x720, 1280x1024, 1920x1080, 1920x1088, 2048x1024, 2048x1088, 2560x1920, 3680x1536, 3840x2106, 3840x2160, 4096x2048, 4096x2160, 4096x2304",
"Debug:      Unsupported Resolutions: 7680x4320, 8192x4320",
"Debug:      Max Resolution: 4096x2304",
"Debug:    DXVA2_ModeH264_VLD_Stereo_Progressive_NoFGT - ColorFormat #0: NV12 => nv12",
"Debug:      Supported Resolutions:   128x96, 176x144, 352x288, 352x480, 352x576, 720x480, 720x576, 1280x720, 1280x1024, 1920x1080, 1920x1088, 2048x1024, 2048x1088, 2560x1920, 3680x1536, 3840x2106, 3840x2160, 4096x2048, 4096x2160, 4096x2304",
"Debug:      Unsupported Resolutions: 7680x4320, 8192x4320",
"Debug:      Max Resolution: 4096x2304",
"Debug:    DXVA2_ModeH264_VLD_Stereo_Progressive_NoFGT - ColorFormat #1: Opaque420 => yuv420p",
"Debug:      Supported Resolutions:   128x96, 176x144, 352x288, 352x480, 352x576, 720x480, 720x576, 1280x720, 1280x1024, 1920x1080, 1920x1088, 2048x1024, 2048x1088, 2560x1920, 3680x1536, 3840x2106, 3840x2160, 4096x2048, 4096x2160, 4096x2304",
"Debug:      Unsupported Resolutions: 7680x4320, 8192x4320",
"Debug:      Max Resolution: 4096x2304",
"Debug:    DXVA2_ModeH264_VLD_Stereo_NoFGT - ColorFormat #0: NV12 => nv12",
"Debug:      Supported Resolutions:   128x96, 176x144, 352x288, 352x480, 352x576, 720x480, 720x576, 1280x720, 1280x1024, 1920x1080, 1920x1088, 2048x1024, 2048x1088, 2560x1920, 3680x1536, 3840x2106, 3840x2160, 4096x2048, 4096x2160, 4096x2304",
"Debug:      Unsupported Resolutions: 7680x4320, 8192x4320",
"Debug:      Max Resolution: 4096x2304",
"Debug:    DXVA2_ModeH264_VLD_Stereo_NoFGT - ColorFormat #1: Opaque420 => yuv420p",
"Debug:      Supported Resolutions:   128x96, 176x144, 352x288, 352x480, 352x576, 720x480, 720x576, 1280x720, 1280x1024, 1920x1080, 1920x1088, 2048x1024, 2048x1088, 2560x1920, 3680x1536, 3840x2106, 3840x2160, 4096x2048, 4096x2160, 4096x2304",
"Debug:      Unsupported Resolutions: 7680x4320, 8192x4320",
"Debug:      Max Resolution: 4096x2304",
"Debug:    DXVA2_ModeH264_VLD_Multiview_NoFGT - ColorFormat #0: NV12 => nv12",
"Debug:      Supported Resolutions:   128x96, 176x144, 352x288, 352x480, 352x576, 720x480, 720x576, 1280x720, 1280x1024, 1920x1080, 1920x1088, 2048x1024, 2048x1088, 2560x1920, 3680x1536, 3840x2106, 3840x2160, 4096x2048, 4096x2160, 4096x2304",
"Debug:      Unsupported Resolutions: 7680x4320, 8192x4320",
"Debug:      Max Resolution: 4096x2304",
"Debug:    DXVA2_ModeH264_VLD_Multiview_NoFGT - ColorFormat #1: Opaque420 => yuv420p",
"Debug:      Supported Resolutions:   128x96, 176x144, 352x288, 352x480, 352x576, 720x480, 720x576, 1280x720, 1280x1024, 1920x1080, 1920x1088, 2048x1024, 2048x1088, 2560x1920, 3680x1536, 3840x2106, 3840x2160, 4096x2048, 4096x2160, 4096x2304",
"Debug:      Unsupported Resolutions: 7680x4320, 8192x4320",
"Debug:      Max Resolution: 4096x2304",
"Debug:    DXVA2_ModeHEVC_VLD_Main - ColorFormat #0: NV12 => nv12",
"Debug:      Supported Resolutions:   128x96, 176x144, 352x288, 640x360, 720x576, 960x540, 1280x720, 1920x1080, 2048x1080, 3840x2160, 4096x2160, 7680x4320, 8192x4320, 8192x8192",
"Debug:      Unsupported Resolutions: ",
"Debug:      Max Resolution: 8192x8192",
"Debug:    DXVA2_ModeHEVC_VLD_Main - ColorFormat #1: Opaque420 => yuv420p",
"Debug:      Supported Resolutions:   128x96, 176x144, 352x288, 640x360, 720x576, 960x540, 1280x720, 1920x1080, 2048x1080, 3840x2160, 4096x2160, 7680x4320, 8192x4320, 8192x8192",
"Debug:      Unsupported Resolutions: ",
"Debug:      Max Resolution: 8192x8192",
"Debug:    DXVA2_ModeHEVC_VLD_Main10 - ColorFormat #1: P010 => p010",
"Debug:      Supported Resolutions:   128x96, 176x144, 352x288, 640x360, 720x576, 960x540, 1280x720, 1920x1080, 2048x1080, 3840x2160, 4096x2160, 7680x4320, 8192x4320, 8192x8192",
"Debug:      Unsupported Resolutions: ",
"Debug:      Max Resolution: 8192x8192",
"Debug:    DXVA2_ModeVP9_VLD_Profile0 - ColorFormat #0: NV12 => nv12",
"Debug:      Supported Resolutions:   256x144, 384x192, 480x256, 640x384, 1080x512, 1280x768, 2048x1088, 4096x2176, 8192x4352",
"Debug:      Unsupported Resolutions: ",
"Debug:      Max Resolution: 8192x4352",
"Debug:    DXVA2_ModeVP9_VLD_Profile0 - ColorFormat #1: Opaque420 => yuv420p",
"Debug:      Supported Resolutions:   256x144, 384x192, 480x256, 640x384, 1080x512, 1280x768, 2048x1088, 4096x2176, 8192x4352",
"Debug:      Unsupported Resolutions: ",
"Debug:      Max Resolution: 8192x4352",
"Debug:    DXVA2_ModeVP9_VLD_10bit_Profile2 - ColorFormat #0: NV12 => nv12",
"Debug:      Supported Resolutions:   256x144, 384x192, 480x256, 640x384, 1080x512, 1280x768, 2048x1088, 4096x2176, 8192x4352",
"Debug:      Unsupported Resolutions: ",
"Debug:      Max Resolution: 8192x4352",
"Debug:    DXVA2_ModeVP9_VLD_10bit_Profile2 - ColorFormat #1: P010 => p010 (skipping test)",
"Debug:    DXVA2_ModeVP9_VLD_10bit_Profile2 - ColorFormat #2: P016 => p016",
"Debug:      Supported Resolutions:   256x144, 384x192, 480x256, 640x384, 1080x512, 1280x768, 2048x1088, 4096x2176, 8192x4352",
"Debug:      Unsupported Resolutions: ",
"Debug:      Max Resolution: 8192x4352",
"Debug:    DXVA2_ModeVP9_VLD_10bit_Profile2 - ColorFormat #3: Opaque420 => yuv420p",
"Debug:      Supported Resolutions:   256x144, 384x192, 480x256, 640x384, 1080x512, 1280x768, 2048x1088, 4096x2176, 8192x4352",
"Debug:      Unsupported Resolutions: ",
"Debug:      Max Resolution: 8192x4352",
"Debug:  Dispose DecoderService",
"Debug:  DecoderService disposed",
"Debug:  Dispose Dx11Device",
"Debug:  Dx11Device disposed",
"Debug:  Dispose DXGI Factory",
"Debug:  DXGI Factory disposed"

tbc..
James Almer Nov. 25, 2022, 11:25 p.m. UTC | #5
On 11/25/2022 8:20 PM, Soft Works wrote:
> 
> 
>> -----Original Message-----
>> From: ffmpeg-devel <ffmpeg-devel-bounces@ffmpeg.org> On Behalf Of
>> James Almer
>> Sent: Friday, November 25, 2022 8:48 PM
>> To: ffmpeg-devel@ffmpeg.org
>> Subject: Re: [FFmpeg-devel] [PATCH] lavc/qsvenc_h264: don't support
>> P010 format
>>
>> On 11/25/2022 3:03 PM, Soft Works wrote:
>>>
>>>
>>>> -----Original Message-----
>>>> From: ffmpeg-devel <ffmpeg-devel-bounces@ffmpeg.org> On Behalf Of
>>>> Anton Khirnov
>>>> Sent: Friday, November 25, 2022 2:46 PM
>>>> To: FFmpeg development discussions and patches <ffmpeg-
>>>> devel@ffmpeg.org>
>>>> Cc: Haihao Xiang <haihao.xiang@intel.com>
>>>> Subject: Re: [FFmpeg-devel] [PATCH] lavc/qsvenc_h264: don't
>> support
>>>> P010 format
>>>>
>>>> Why?
>>>
>>> It's rarely used. There's not even a hwaccel that can decode this.
>>
>> The dxva2/d3d11 hwaccels seemingly do
> 
> No, only for HEVC and VP9. Probably for AV1 as well  in the near future.

Well, then that is a good reason to not remove support in this encoder 
for a pixel format that not only our software scaler can generate, but 
decoders using hwaccel backends can output too.
Dong, Ruijing Nov. 25, 2022, 11:26 p.m. UTC | #6
[AMD Official Use Only - General]

Will it make sense to accept P010 input, however encode to h264 8bit?

Thanks,
Ruijing

-----Original Message-----
From: ffmpeg-devel <ffmpeg-devel-bounces@ffmpeg.org> On Behalf Of James Almer
Sent: Friday, November 25, 2022 6:25 PM
To: ffmpeg-devel@ffmpeg.org
Subject: Re: [FFmpeg-devel] [PATCH] lavc/qsvenc_h264: don't support P010 format

On 11/25/2022 8:20 PM, Soft Works wrote:
>
>
>> -----Original Message-----
>> From: ffmpeg-devel <ffmpeg-devel-bounces@ffmpeg.org> On Behalf Of
>> James Almer
>> Sent: Friday, November 25, 2022 8:48 PM
>> To: ffmpeg-devel@ffmpeg.org
>> Subject: Re: [FFmpeg-devel] [PATCH] lavc/qsvenc_h264: don't support
>> P010 format
>>
>> On 11/25/2022 3:03 PM, Soft Works wrote:
>>>
>>>
>>>> -----Original Message-----
>>>> From: ffmpeg-devel <ffmpeg-devel-bounces@ffmpeg.org> On Behalf Of
>>>> Anton Khirnov
>>>> Sent: Friday, November 25, 2022 2:46 PM
>>>> To: FFmpeg development discussions and patches <ffmpeg-
>>>> devel@ffmpeg.org>
>>>> Cc: Haihao Xiang <haihao.xiang@intel.com>
>>>> Subject: Re: [FFmpeg-devel] [PATCH] lavc/qsvenc_h264: don't
>> support
>>>> P010 format
>>>>
>>>> Why?
>>>
>>> It's rarely used. There's not even a hwaccel that can decode this.
>>
>> The dxva2/d3d11 hwaccels seemingly do
>
> No, only for HEVC and VP9. Probably for AV1 as well  in the near future.

Well, then that is a good reason to not remove support in this encoder for a pixel format that not only our software scaler can generate, but decoders using hwaccel backends can output too.
James Almer Nov. 25, 2022, 11:34 p.m. UTC | #7
On 11/25/2022 8:26 PM, Dong, Ruijing wrote:
> [AMD Official Use Only - General]
> 
> Will it make sense to accept P010 input, however encode to h264 8bit?

If it works (the encoder accepts the 10 bit input even if it encodes it 
as 8bit), then i don't see why not. I assume it would also be faster 
than using swscale to convert said 10bit input to nv12 before passing 
that to the encoder.

Removing support for a pixel format as input in an encoder needs a 
reason other than "It's rarely used", more so when it's a single line. 
It either needs to not work, or somehow get in the way of further 
improvements.

> 
> Thanks,
> Ruijing
> 
> -----Original Message-----
> From: ffmpeg-devel <ffmpeg-devel-bounces@ffmpeg.org> On Behalf Of James Almer
> Sent: Friday, November 25, 2022 6:25 PM
> To: ffmpeg-devel@ffmpeg.org
> Subject: Re: [FFmpeg-devel] [PATCH] lavc/qsvenc_h264: don't support P010 format
> 
> On 11/25/2022 8:20 PM, Soft Works wrote:
>>
>>
>>> -----Original Message-----
>>> From: ffmpeg-devel <ffmpeg-devel-bounces@ffmpeg.org> On Behalf Of
>>> James Almer
>>> Sent: Friday, November 25, 2022 8:48 PM
>>> To: ffmpeg-devel@ffmpeg.org
>>> Subject: Re: [FFmpeg-devel] [PATCH] lavc/qsvenc_h264: don't support
>>> P010 format
>>>
>>> On 11/25/2022 3:03 PM, Soft Works wrote:
>>>>
>>>>
>>>>> -----Original Message-----
>>>>> From: ffmpeg-devel <ffmpeg-devel-bounces@ffmpeg.org> On Behalf Of
>>>>> Anton Khirnov
>>>>> Sent: Friday, November 25, 2022 2:46 PM
>>>>> To: FFmpeg development discussions and patches <ffmpeg-
>>>>> devel@ffmpeg.org>
>>>>> Cc: Haihao Xiang <haihao.xiang@intel.com>
>>>>> Subject: Re: [FFmpeg-devel] [PATCH] lavc/qsvenc_h264: don't
>>> support
>>>>> P010 format
>>>>>
>>>>> Why?
>>>>
>>>> It's rarely used. There's not even a hwaccel that can decode this.
>>>
>>> The dxva2/d3d11 hwaccels seemingly do
>>
>> No, only for HEVC and VP9. Probably for AV1 as well  in the near future.
> 
> Well, then that is a good reason to not remove support in this encoder for a pixel format that not only our software scaler can generate, but decoders using hwaccel backends can output too.
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fffmpeg.org%2Fmailman%2Flistinfo%2Fffmpeg-devel&amp;data=05%7C01%7Cruijing.dong%40amd.com%7Cf449421fd89948ad96cc08dacf3c324b%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C638050154742304108%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;sdata=xFeOvsaJw%2F9BlPifrqx33Pv8GurJ1N2lVyuUYHIOClo%3D&amp;reserved=0
> 
> To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
> 
> 
> _______________________________________________
> 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".
Dong, Ruijing Nov. 25, 2022, 11:46 p.m. UTC | #8
[AMD Official Use Only - General]

We would like to add that in Mesa first to let vaapi path accept 10bit input and HW to convert it to 8bit if it makes sense to do so.
Then get a chance to apply it to ffmpeg.

Thanks
Ruijing

-----Original Message-----
From: ffmpeg-devel <ffmpeg-devel-bounces@ffmpeg.org> On Behalf Of James Almer
Sent: Friday, November 25, 2022 6:35 PM
To: ffmpeg-devel@ffmpeg.org
Subject: Re: [FFmpeg-devel] [PATCH] lavc/qsvenc_h264: don't support P010 format

On 11/25/2022 8:26 PM, Dong, Ruijing wrote:
> [AMD Official Use Only - General]
>
> Will it make sense to accept P010 input, however encode to h264 8bit?

If it works (the encoder accepts the 10 bit input even if it encodes it as 8bit), then i don't see why not. I assume it would also be faster than using swscale to convert said 10bit input to nv12 before passing that to the encoder.

Removing support for a pixel format as input in an encoder needs a reason other than "It's rarely used", more so when it's a single line.
It either needs to not work, or somehow get in the way of further improvements.

>
> Thanks,
> Ruijing
>
> -----Original Message-----
> From: ffmpeg-devel <ffmpeg-devel-bounces@ffmpeg.org> On Behalf Of
> James Almer
> Sent: Friday, November 25, 2022 6:25 PM
> To: ffmpeg-devel@ffmpeg.org
> Subject: Re: [FFmpeg-devel] [PATCH] lavc/qsvenc_h264: don't support
> P010 format
>
> On 11/25/2022 8:20 PM, Soft Works wrote:
>>
>>
>>> -----Original Message-----
>>> From: ffmpeg-devel <ffmpeg-devel-bounces@ffmpeg.org> On Behalf Of
>>> James Almer
>>> Sent: Friday, November 25, 2022 8:48 PM
>>> To: ffmpeg-devel@ffmpeg.org
>>> Subject: Re: [FFmpeg-devel] [PATCH] lavc/qsvenc_h264: don't support
>>> P010 format
>>>
>>> On 11/25/2022 3:03 PM, Soft Works wrote:
>>>>
>>>>
>>>>> -----Original Message-----
>>>>> From: ffmpeg-devel <ffmpeg-devel-bounces@ffmpeg.org> On Behalf Of
>>>>> Anton Khirnov
>>>>> Sent: Friday, November 25, 2022 2:46 PM
>>>>> To: FFmpeg development discussions and patches <ffmpeg-
>>>>> devel@ffmpeg.org>
>>>>> Cc: Haihao Xiang <haihao.xiang@intel.com>
>>>>> Subject: Re: [FFmpeg-devel] [PATCH] lavc/qsvenc_h264: don't
>>> support
>>>>> P010 format
>>>>>
>>>>> Why?
>>>>
>>>> It's rarely used. There's not even a hwaccel that can decode this.
>>>
>>> The dxva2/d3d11 hwaccels seemingly do
>>
>> No, only for HEVC and VP9. Probably for AV1 as well  in the near future.
>
> Well, then that is a good reason to not remove support in this encoder for a pixel format that not only our software scaler can generate, but decoders using hwaccel backends can output too.
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fffmp
> eg.org%2Fmailman%2Flistinfo%2Fffmpeg-devel&amp;data=05%7C01%7Cruijing.
> dong%40amd.com%7Cbcfc4e8b332b4a42691908dacf3d87e7%7C3dd8961fe4884e608e
> 11a82d994e183d%7C0%7C0%7C638050160442866421%7CUnknown%7CTWFpbGZsb3d8ey
> JWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C300
> 0%7C%7C%7C&amp;sdata=8UN5OD1Yt2fmSkiHi4cLtnDryBlwpa8DF4Oi%2FMhjxPk%3D&
> amp;reserved=0
>
> To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
>
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fffmp
> eg.org%2Fmailman%2Flistinfo%2Fffmpeg-devel&amp;data=05%7C01%7Cruijing.
> dong%40amd.com%7Cbcfc4e8b332b4a42691908dacf3d87e7%7C3dd8961fe4884e608e
> 11a82d994e183d%7C0%7C0%7C638050160442866421%7CUnknown%7CTWFpbGZsb3d8ey
> JWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C300
> 0%7C%7C%7C&amp;sdata=8UN5OD1Yt2fmSkiHi4cLtnDryBlwpa8DF4Oi%2FMhjxPk%3D&
> amp;reserved=0
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
Soft Works Nov. 25, 2022, 11:47 p.m. UTC | #9
> -----Original Message-----
> From: ffmpeg-devel <ffmpeg-devel-bounces@ffmpeg.org> On Behalf Of
> James Almer
> Sent: Saturday, November 26, 2022 12:25 AM
> To: ffmpeg-devel@ffmpeg.org
> Subject: Re: [FFmpeg-devel] [PATCH] lavc/qsvenc_h264: don't support
> P010 format
> 
> On 11/25/2022 8:20 PM, Soft Works wrote:
> >
> >
> >> -----Original Message-----
> >> From: ffmpeg-devel <ffmpeg-devel-bounces@ffmpeg.org> On Behalf Of
> >> James Almer
> >> Sent: Friday, November 25, 2022 8:48 PM
> >> To: ffmpeg-devel@ffmpeg.org
> >> Subject: Re: [FFmpeg-devel] [PATCH] lavc/qsvenc_h264: don't
> support
> >> P010 format
> >>
> >> On 11/25/2022 3:03 PM, Soft Works wrote:
> >>>
> >>>
> >>>> -----Original Message-----
> >>>> From: ffmpeg-devel <ffmpeg-devel-bounces@ffmpeg.org> On Behalf
> Of
> >>>> Anton Khirnov
> >>>> Sent: Friday, November 25, 2022 2:46 PM
> >>>> To: FFmpeg development discussions and patches <ffmpeg-
> >>>> devel@ffmpeg.org>
> >>>> Cc: Haihao Xiang <haihao.xiang@intel.com>
> >>>> Subject: Re: [FFmpeg-devel] [PATCH] lavc/qsvenc_h264: don't
> >> support
> >>>> P010 format
> >>>>
> >>>> Why?
> >>>
> >>> It's rarely used. There's not even a hwaccel that can decode
> this.
> >>
> >> The dxva2/d3d11 hwaccels seemingly do
> >
> > No, only for HEVC and VP9. Probably for AV1 as well  in the near
> future.
> 
> Well, then that is a good reason to not remove support in this
> encoder
> for a pixel format that not only our software scaler can generate,
> but
> decoders using hwaccel backends can output too.

That would be right when QSV would support it, but it doesn't,
neither for decoding nor for encoding and there are no plans to 
implement it.

I know this, because I had checked back with Intel on it, as I 
had been wondering about the existence of the MFX_PROFILE_AVC_HIGH10
constant, which is the profile for H.264 10bit encoding.

It existed because an earlier version of MSDK had supported this,
but only with their software implementations of H.264, never with
HWA. And unlikely with ffmpeg as that constant has never been used
there.

Nvidia doesn't support it either. Neither decoding nor encoding.
They don't even have a GUID constant mapping for the profile.

https://www.ffmpeg.org/doxygen/3.2/nvEncodeAPI_8h_source.html
(Line 151-)

Best wishes,
softworkz
Soft Works Nov. 25, 2022, 11:51 p.m. UTC | #10
> -----Original Message-----
> From: ffmpeg-devel <ffmpeg-devel-bounces@ffmpeg.org> On Behalf Of
> James Almer
> Sent: Saturday, November 26, 2022 12:35 AM
> To: ffmpeg-devel@ffmpeg.org
> Subject: Re: [FFmpeg-devel] [PATCH] lavc/qsvenc_h264: don't support
> P010 format
> 
> On 11/25/2022 8:26 PM, Dong, Ruijing wrote:
> > [AMD Official Use Only - General]
> >
> > Will it make sense to accept P010 input, however encode to h264
> 8bit?
> 
> If it works (the encoder accepts the 10 bit input even if it encodes
> it
> as 8bit), then i don't see why not. I assume it would also be faster
> than using swscale to convert said 10bit input to nv12 before passing
> that to the encoder.
> 
> Removing support for a pixel format as input in an encoder needs a
> reason other than "It's rarely used", more so when it's a single
> line.
> It either needs to not work, or somehow get in the way of further
> improvements.

Oh sorry, I noticed that there was a misunderstanding. 

When I said "It's rarely used", I didn't mean that as a justification
for the removal, it was meant as an explanation why none of the 
hwaccels has implemented it.

softworkz
James Almer Nov. 25, 2022, 11:57 p.m. UTC | #11
On 11/25/2022 8:51 PM, Soft Works wrote:
> 
> 
>> -----Original Message-----
>> From: ffmpeg-devel <ffmpeg-devel-bounces@ffmpeg.org> On Behalf Of
>> James Almer
>> Sent: Saturday, November 26, 2022 12:35 AM
>> To: ffmpeg-devel@ffmpeg.org
>> Subject: Re: [FFmpeg-devel] [PATCH] lavc/qsvenc_h264: don't support
>> P010 format
>>
>> On 11/25/2022 8:26 PM, Dong, Ruijing wrote:
>>> [AMD Official Use Only - General]
>>>
>>> Will it make sense to accept P010 input, however encode to h264
>> 8bit?
>>
>> If it works (the encoder accepts the 10 bit input even if it encodes
>> it
>> as 8bit), then i don't see why not. I assume it would also be faster
>> than using swscale to convert said 10bit input to nv12 before passing
>> that to the encoder.
>>
>> Removing support for a pixel format as input in an encoder needs a
>> reason other than "It's rarely used", more so when it's a single
>> line.
>> It either needs to not work, or somehow get in the way of further
>> improvements.
> 
> Oh sorry, I noticed that there was a misunderstanding.
> 
> When I said "It's rarely used", I didn't mean that as a justification
> for the removal, it was meant as an explanation why none of the
> hwaccels has implemented it.
> 
> softworkz

Alright, then i'll repeat my question: Does it work? And I don't mean 
the encoder outputting a 10bit h264 stream, since you made it clear it 
doesn't, i mean accepting 10bit input in p010 pixel format and 
outputting a valid stream and not garbage.
If it does, then there's no reason to remove this line. If it does not, 
then that should have been mentioned in the patch as the reason why this 
is being done.
Soft Works Nov. 26, 2022, 12:58 a.m. UTC | #12
> -----Original Message-----
> From: ffmpeg-devel <ffmpeg-devel-bounces@ffmpeg.org> On Behalf Of
> James Almer
> Sent: Saturday, November 26, 2022 12:58 AM
> To: ffmpeg-devel@ffmpeg.org
> Subject: Re: [FFmpeg-devel] [PATCH] lavc/qsvenc_h264: don't support
> P010 format
> 
> On 11/25/2022 8:51 PM, Soft Works wrote:
> >
> >
> >> -----Original Message-----
> >> From: ffmpeg-devel <ffmpeg-devel-bounces@ffmpeg.org> On Behalf Of
> >> James Almer
> >> Sent: Saturday, November 26, 2022 12:35 AM
> >> To: ffmpeg-devel@ffmpeg.org
> >> Subject: Re: [FFmpeg-devel] [PATCH] lavc/qsvenc_h264: don't
> support
> >> P010 format
> >>
> >> On 11/25/2022 8:26 PM, Dong, Ruijing wrote:
> >>> [AMD Official Use Only - General]
> >>>
> >>> Will it make sense to accept P010 input, however encode to h264
> >> 8bit?
> >>
> >> If it works (the encoder accepts the 10 bit input even if it
> encodes
> >> it
> >> as 8bit), then i don't see why not. I assume it would also be
> faster
> >> than using swscale to convert said 10bit input to nv12 before
> passing
> >> that to the encoder.
> >>
> >> Removing support for a pixel format as input in an encoder needs a
> >> reason other than "It's rarely used", more so when it's a single
> >> line.
> >> It either needs to not work, or somehow get in the way of further
> >> improvements.
> >
> > Oh sorry, I noticed that there was a misunderstanding.
> >
> > When I said "It's rarely used", I didn't mean that as a
> justification
> > for the removal, it was meant as an explanation why none of the
> > hwaccels has implemented it.
> >
> > softworkz
> 
> Alright, then i'll repeat my question: Does it work?

No.

> If it does
> not,
> then that should have been mentioned in the patch as the reason why
> this
> is being done.

For me it was clear, albeit a bit short. Anyway, I'll let Haihao, respond.

Best,
softworkz
James Almer Nov. 26, 2022, 1 a.m. UTC | #13
On 11/25/2022 9:58 PM, Soft Works wrote:
> 
> 
>> -----Original Message-----
>> From: ffmpeg-devel <ffmpeg-devel-bounces@ffmpeg.org> On Behalf Of
>> James Almer
>> Sent: Saturday, November 26, 2022 12:58 AM
>> To: ffmpeg-devel@ffmpeg.org
>> Subject: Re: [FFmpeg-devel] [PATCH] lavc/qsvenc_h264: don't support
>> P010 format
>>
>> On 11/25/2022 8:51 PM, Soft Works wrote:
>>>
>>>
>>>> -----Original Message-----
>>>> From: ffmpeg-devel <ffmpeg-devel-bounces@ffmpeg.org> On Behalf Of
>>>> James Almer
>>>> Sent: Saturday, November 26, 2022 12:35 AM
>>>> To: ffmpeg-devel@ffmpeg.org
>>>> Subject: Re: [FFmpeg-devel] [PATCH] lavc/qsvenc_h264: don't
>> support
>>>> P010 format
>>>>
>>>> On 11/25/2022 8:26 PM, Dong, Ruijing wrote:
>>>>> [AMD Official Use Only - General]
>>>>>
>>>>> Will it make sense to accept P010 input, however encode to h264
>>>> 8bit?
>>>>
>>>> If it works (the encoder accepts the 10 bit input even if it
>> encodes
>>>> it
>>>> as 8bit), then i don't see why not. I assume it would also be
>> faster
>>>> than using swscale to convert said 10bit input to nv12 before
>> passing
>>>> that to the encoder.
>>>>
>>>> Removing support for a pixel format as input in an encoder needs a
>>>> reason other than "It's rarely used", more so when it's a single
>>>> line.
>>>> It either needs to not work, or somehow get in the way of further
>>>> improvements.
>>>
>>> Oh sorry, I noticed that there was a misunderstanding.
>>>
>>> When I said "It's rarely used", I didn't mean that as a
>> justification
>>> for the removal, it was meant as an explanation why none of the
>>> hwaccels has implemented it.
>>>
>>> softworkz
>>
>> Alright, then i'll repeat my question: Does it work?
> 
> No.

What does this encoder currently do when you feed it p010 input? What 
does it output?

> 
>> If it does
>> not,
>> then that should have been mentioned in the patch as the reason why
>> this
>> is being done.
> 
> For me it was clear, albeit a bit short. Anyway, I'll let Haihao, respond.
> 
> Best,
> softworkz
> 
> 
> 
> 
> _______________________________________________
> 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".
Soft Works Nov. 26, 2022, 2:31 a.m. UTC | #14
> -----Original Message-----
> From: ffmpeg-devel <ffmpeg-devel-bounces@ffmpeg.org> On Behalf Of
> James Almer
> Sent: Saturday, November 26, 2022 2:01 AM
> To: ffmpeg-devel@ffmpeg.org
> Subject: Re: [FFmpeg-devel] [PATCH] lavc/qsvenc_h264: don't support
> P010 format
> 
> On 11/25/2022 9:58 PM, Soft Works wrote:
> >
> >
> >> -----Original Message-----
> >> From: ffmpeg-devel <ffmpeg-devel-bounces@ffmpeg.org> On Behalf Of
> >> James Almer
> >> Sent: Saturday, November 26, 2022 12:58 AM
> >> To: ffmpeg-devel@ffmpeg.org
> >> Subject: Re: [FFmpeg-devel] [PATCH] lavc/qsvenc_h264: don't
> support
> >> P010 format
> >>
> >> On 11/25/2022 8:51 PM, Soft Works wrote:
> >>>
> >>>
> >>>> -----Original Message-----
> >>>> From: ffmpeg-devel <ffmpeg-devel-bounces@ffmpeg.org> On Behalf
> Of
> >>>> James Almer
> >>>> Sent: Saturday, November 26, 2022 12:35 AM
> >>>> To: ffmpeg-devel@ffmpeg.org
> >>>> Subject: Re: [FFmpeg-devel] [PATCH] lavc/qsvenc_h264: don't
> >> support
> >>>> P010 format
> >>>>
> >>>> On 11/25/2022 8:26 PM, Dong, Ruijing wrote:
> >>>>> [AMD Official Use Only - General]
> >>>>>
> >>>>> Will it make sense to accept P010 input, however encode to h264
> >>>> 8bit?
> >>>>
> >>>> If it works (the encoder accepts the 10 bit input even if it
> >> encodes
> >>>> it
> >>>> as 8bit), then i don't see why not. I assume it would also be
> >> faster
> >>>> than using swscale to convert said 10bit input to nv12 before
> >> passing
> >>>> that to the encoder.
> >>>>
> >>>> Removing support for a pixel format as input in an encoder needs
> a
> >>>> reason other than "It's rarely used", more so when it's a single
> >>>> line.
> >>>> It either needs to not work, or somehow get in the way of
> further
> >>>> improvements.
> >>>
> >>> Oh sorry, I noticed that there was a misunderstanding.
> >>>
> >>> When I said "It's rarely used", I didn't mean that as a
> >> justification
> >>> for the removal, it was meant as an explanation why none of the
> >>> hwaccels has implemented it.
> >>>
> >>> softworkz
> >>
> >> Alright, then i'll repeat my question: Does it work?
> >
> > No.
> 
> What does this encoder currently do when you feed it p010 input? What
> does it output?

An error:


1. 10bit from HW context:


[graph 0 video input from stream 0:0 @ 000001dc301aeec0] w:3840 h:2160 pixfmt:yuv420p10le tb:1/60000 fr:60000/1001 sar:1/1
[auto_scale_0 @ 000001dc2362a700] w:iw h:ih flags:'' interl:0
[hwupload@f1 @ 000001dc2944ef00] auto-inserting filter 'auto_scale_0' between the filter 'graph 0 video input from stream 0:0' and the filter 'hwupload@f1'
[auto_scale_0 @ 000001dc2362a700] w:3840 h:2160 fmt:yuv420p10le sar:1/1 -> w:3840 h:2160 fmt:p010le sar:1/1 flags:0x0
[AVHWDeviceContext @ 000001dc444f9a00] D3D11 Init
[AVHWDeviceContext @ 000001dc444fab80] D3D11 Init
[vpp_qsv@f2 @ 000001dc22a3d880] VPP: input is video memory surface
[vpp_qsv@f2 @ 000001dc22a3d880] VPP: output is video memory surface
[auto_scale_0 @ 000001dc2362a700] w:3840 h:2160 fmt:yuv420p10le sar:1/1 -> w:3840 h:2160 fmt:p010le sar:1/1 flags:0x0
    Last message repeated 2 times
[h264_qsv @ 000001dc161b6040] Using input frames context (format qsv) with h264_qsv encoder.
[h264_qsv @ 000001dc161b6040] Encoder: input is video memory surface
[h264_qsv @ 000001dc161b6040] Using the average variable bitrate (AVBR) ratecontrol method
[h264_qsv @ 000001dc161b6040] Current pixel format is unsupported
[h264_qsv @ 000001dc161b6040] some encoding parameters are not supported by the QSV runtime. Please double check the input parameters.
Error initializing output stream 0:0 -- Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height
[AVHWDeviceContext @ 000001dc444f9a00] D3D11 Uninit
[AVIOContext @ 000001dc16197c80] Statistics: 0 bytes written, 0 seeks, 0 writeouts
[AVHWDeviceContext @ 000001dc444fab80] D3D11 Uninit
[AVIOContext @ 000001dc161839c0] Statistics: 131146 bytes read, 2 seeks
Conversion failed!


2. 10bit from SW context:


[graph 0 video input from stream 0:0 @ 0000019e915dee00] w:3840 h:2160 pixfmt:yuv420p10le tb:1/60000 fr:60000/1001 sar:1/1
[auto_scale_0 @ 0000019ee99936c0] w:iw h:ih flags:'' interl:0
[format @ 0000019ee9993240] auto-inserting filter 'auto_scale_0' between the filter 'Parsed_null_0' and the filter 'format'
[auto_scale_0 @ 0000019ee99936c0] w:3840 h:2160 fmt:yuv420p10le sar:1/1 -> w:3840 h:2160 fmt:p010le sar:1/1 flags:0x0
    Last message repeated 3 times
[h264_qsv @ 0000019ee9995dc0] Using device qd1 (type qsv) with h264_qsv encoder.
[h264_qsv @ 0000019ee9995dc0] Encoder: input is system memory surface
[h264_qsv @ 0000019ee9995dc0] Using the average variable bitrate (AVBR) ratecontrol method
[h264_qsv @ 0000019ee9995dc0] Current pixel format is unsupported
[h264_qsv @ 0000019ee9995dc0] some encoding parameters are not supported by the QSV runtime. Please double check the input parameters.
Error initializing output stream 0:0 -- Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height
[AVIOContext @ 0000019ef62b4000] Statistics: 0 bytes written, 0 seeks, 0 writeouts
[AVIOContext @ 0000019ee995abc0] Statistics: 131146 bytes read, 2 seeks
Conversion failed!

softworkz
James Almer Nov. 26, 2022, 2:35 a.m. UTC | #15
On 11/25/2022 11:31 PM, Soft Works wrote:
> 
> 
>> -----Original Message-----
>> From: ffmpeg-devel <ffmpeg-devel-bounces@ffmpeg.org> On Behalf Of
>> James Almer
>> Sent: Saturday, November 26, 2022 2:01 AM
>> To: ffmpeg-devel@ffmpeg.org
>> Subject: Re: [FFmpeg-devel] [PATCH] lavc/qsvenc_h264: don't support
>> P010 format
>>
>> On 11/25/2022 9:58 PM, Soft Works wrote:
>>>
>>>
>>>> -----Original Message-----
>>>> From: ffmpeg-devel <ffmpeg-devel-bounces@ffmpeg.org> On Behalf Of
>>>> James Almer
>>>> Sent: Saturday, November 26, 2022 12:58 AM
>>>> To: ffmpeg-devel@ffmpeg.org
>>>> Subject: Re: [FFmpeg-devel] [PATCH] lavc/qsvenc_h264: don't
>> support
>>>> P010 format
>>>>
>>>> On 11/25/2022 8:51 PM, Soft Works wrote:
>>>>>
>>>>>
>>>>>> -----Original Message-----
>>>>>> From: ffmpeg-devel <ffmpeg-devel-bounces@ffmpeg.org> On Behalf
>> Of
>>>>>> James Almer
>>>>>> Sent: Saturday, November 26, 2022 12:35 AM
>>>>>> To: ffmpeg-devel@ffmpeg.org
>>>>>> Subject: Re: [FFmpeg-devel] [PATCH] lavc/qsvenc_h264: don't
>>>> support
>>>>>> P010 format
>>>>>>
>>>>>> On 11/25/2022 8:26 PM, Dong, Ruijing wrote:
>>>>>>> [AMD Official Use Only - General]
>>>>>>>
>>>>>>> Will it make sense to accept P010 input, however encode to h264
>>>>>> 8bit?
>>>>>>
>>>>>> If it works (the encoder accepts the 10 bit input even if it
>>>> encodes
>>>>>> it
>>>>>> as 8bit), then i don't see why not. I assume it would also be
>>>> faster
>>>>>> than using swscale to convert said 10bit input to nv12 before
>>>> passing
>>>>>> that to the encoder.
>>>>>>
>>>>>> Removing support for a pixel format as input in an encoder needs
>> a
>>>>>> reason other than "It's rarely used", more so when it's a single
>>>>>> line.
>>>>>> It either needs to not work, or somehow get in the way of
>> further
>>>>>> improvements.
>>>>>
>>>>> Oh sorry, I noticed that there was a misunderstanding.
>>>>>
>>>>> When I said "It's rarely used", I didn't mean that as a
>>>> justification
>>>>> for the removal, it was meant as an explanation why none of the
>>>>> hwaccels has implemented it.
>>>>>
>>>>> softworkz
>>>>
>>>> Alright, then i'll repeat my question: Does it work?
>>>
>>> No.
>>
>> What does this encoder currently do when you feed it p010 input? What
>> does it output?
> 
> An error:
> 
> 
> 1. 10bit from HW context:
> 
> 
> [graph 0 video input from stream 0:0 @ 000001dc301aeec0] w:3840 h:2160 pixfmt:yuv420p10le tb:1/60000 fr:60000/1001 sar:1/1
> [auto_scale_0 @ 000001dc2362a700] w:iw h:ih flags:'' interl:0
> [hwupload@f1 @ 000001dc2944ef00] auto-inserting filter 'auto_scale_0' between the filter 'graph 0 video input from stream 0:0' and the filter 'hwupload@f1'
> [auto_scale_0 @ 000001dc2362a700] w:3840 h:2160 fmt:yuv420p10le sar:1/1 -> w:3840 h:2160 fmt:p010le sar:1/1 flags:0x0
> [AVHWDeviceContext @ 000001dc444f9a00] D3D11 Init
> [AVHWDeviceContext @ 000001dc444fab80] D3D11 Init
> [vpp_qsv@f2 @ 000001dc22a3d880] VPP: input is video memory surface
> [vpp_qsv@f2 @ 000001dc22a3d880] VPP: output is video memory surface
> [auto_scale_0 @ 000001dc2362a700] w:3840 h:2160 fmt:yuv420p10le sar:1/1 -> w:3840 h:2160 fmt:p010le sar:1/1 flags:0x0
>      Last message repeated 2 times
> [h264_qsv @ 000001dc161b6040] Using input frames context (format qsv) with h264_qsv encoder.
> [h264_qsv @ 000001dc161b6040] Encoder: input is video memory surface
> [h264_qsv @ 000001dc161b6040] Using the average variable bitrate (AVBR) ratecontrol method
> [h264_qsv @ 000001dc161b6040] Current pixel format is unsupported
> [h264_qsv @ 000001dc161b6040] some encoding parameters are not supported by the QSV runtime. Please double check the input parameters.
> Error initializing output stream 0:0 -- Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height
> [AVHWDeviceContext @ 000001dc444f9a00] D3D11 Uninit
> [AVIOContext @ 000001dc16197c80] Statistics: 0 bytes written, 0 seeks, 0 writeouts
> [AVHWDeviceContext @ 000001dc444fab80] D3D11 Uninit
> [AVIOContext @ 000001dc161839c0] Statistics: 131146 bytes read, 2 seeks
> Conversion failed!
> 
> 
> 2. 10bit from SW context:
> 
> 
> [graph 0 video input from stream 0:0 @ 0000019e915dee00] w:3840 h:2160 pixfmt:yuv420p10le tb:1/60000 fr:60000/1001 sar:1/1
> [auto_scale_0 @ 0000019ee99936c0] w:iw h:ih flags:'' interl:0
> [format @ 0000019ee9993240] auto-inserting filter 'auto_scale_0' between the filter 'Parsed_null_0' and the filter 'format'
> [auto_scale_0 @ 0000019ee99936c0] w:3840 h:2160 fmt:yuv420p10le sar:1/1 -> w:3840 h:2160 fmt:p010le sar:1/1 flags:0x0
>      Last message repeated 3 times
> [h264_qsv @ 0000019ee9995dc0] Using device qd1 (type qsv) with h264_qsv encoder.
> [h264_qsv @ 0000019ee9995dc0] Encoder: input is system memory surface
> [h264_qsv @ 0000019ee9995dc0] Using the average variable bitrate (AVBR) ratecontrol method
> [h264_qsv @ 0000019ee9995dc0] Current pixel format is unsupported
> [h264_qsv @ 0000019ee9995dc0] some encoding parameters are not supported by the QSV runtime. Please double check the input parameters.
> Error initializing output stream 0:0 -- Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height
> [AVIOContext @ 0000019ef62b4000] Statistics: 0 bytes written, 0 seeks, 0 writeouts
> [AVIOContext @ 0000019ee995abc0] Statistics: 131146 bytes read, 2 seeks
> Conversion failed!
> 
> softworkz

Alright, thanks for testing it. The commit message should mention the 
pixel format is being removed as it's unsupported, then.
Soft Works Nov. 26, 2022, 2:54 a.m. UTC | #16
> -----Original Message-----
> From: ffmpeg-devel <ffmpeg-devel-bounces@ffmpeg.org> On Behalf Of
> James Almer
> Sent: Saturday, November 26, 2022 3:36 AM
> To: ffmpeg-devel@ffmpeg.org
> Subject: Re: [FFmpeg-devel] [PATCH] lavc/qsvenc_h264: don't support
> P010 format
> 
> On 11/25/2022 11:31 PM, Soft Works wrote:
> >
> >
> >> -----Original Message-----
> >> From: ffmpeg-devel <ffmpeg-devel-bounces@ffmpeg.org> On Behalf Of
> >> James Almer
> >> Sent: Saturday, November 26, 2022 2:01 AM
> >> To: ffmpeg-devel@ffmpeg.org
> >> Subject: Re: [FFmpeg-devel] [PATCH] lavc/qsvenc_h264: don't
> support
> >> P010 format
> >>
> >> On 11/25/2022 9:58 PM, Soft Works wrote:
> >>>
> >>>
> >>>> -----Original Message-----
> >>>> From: ffmpeg-devel <ffmpeg-devel-bounces@ffmpeg.org> On Behalf
> Of
> >>>> James Almer
> >>>> Sent: Saturday, November 26, 2022 12:58 AM
> >>>> To: ffmpeg-devel@ffmpeg.org
> >>>> Subject: Re: [FFmpeg-devel] [PATCH] lavc/qsvenc_h264: don't
> >> support
> >>>> P010 format
> >>>>
> >>>> On 11/25/2022 8:51 PM, Soft Works wrote:
> >>>>>
> >>>>>
> >>>>>> -----Original Message-----
> >>>>>> From: ffmpeg-devel <ffmpeg-devel-bounces@ffmpeg.org> On Behalf
> >> Of
> >>>>>> James Almer
> >>>>>> Sent: Saturday, November 26, 2022 12:35 AM
> >>>>>> To: ffmpeg-devel@ffmpeg.org
> >>>>>> Subject: Re: [FFmpeg-devel] [PATCH] lavc/qsvenc_h264: don't
> >>>> support
> >>>>>> P010 format
> >>>>>>
> >>>>>> On 11/25/2022 8:26 PM, Dong, Ruijing wrote:
> >>>>>>> [AMD Official Use Only - General]
> >>>>>>>
> >>>>>>> Will it make sense to accept P010 input, however encode to
> h264
> >>>>>> 8bit?
> >>>>>>
> >>>>>> If it works (the encoder accepts the 10 bit input even if it
> >>>> encodes
> >>>>>> it
> >>>>>> as 8bit), then i don't see why not. I assume it would also be
> >>>> faster
> >>>>>> than using swscale to convert said 10bit input to nv12 before
> >>>> passing
> >>>>>> that to the encoder.
> >>>>>>
> >>>>>> Removing support for a pixel format as input in an encoder
> needs
> >> a
> >>>>>> reason other than "It's rarely used", more so when it's a
> single
> >>>>>> line.
> >>>>>> It either needs to not work, or somehow get in the way of
> >> further
> >>>>>> improvements.
> >>>>>
> >>>>> Oh sorry, I noticed that there was a misunderstanding.
> >>>>>
> >>>>> When I said "It's rarely used", I didn't mean that as a
> >>>> justification
> >>>>> for the removal, it was meant as an explanation why none of the
> >>>>> hwaccels has implemented it.
> >>>>>
> >>>>> softworkz
> >>>>
> >>>> Alright, then i'll repeat my question: Does it work?
> >>>
> >>> No.
> >>
> >> What does this encoder currently do when you feed it p010 input?
> What
> >> does it output?
> >
> > An error:
> >
> >
> > 1. 10bit from HW context:
> >
> >
> > [graph 0 video input from stream 0:0 @ 000001dc301aeec0] w:3840
> h:2160 pixfmt:yuv420p10le tb:1/60000 fr:60000/1001 sar:1/1
> > [auto_scale_0 @ 000001dc2362a700] w:iw h:ih flags:'' interl:0
> > [hwupload@f1 @ 000001dc2944ef00] auto-inserting filter
> 'auto_scale_0' between the filter 'graph 0 video input from stream
> 0:0' and the filter 'hwupload@f1'
> > [auto_scale_0 @ 000001dc2362a700] w:3840 h:2160 fmt:yuv420p10le
> sar:1/1 -> w:3840 h:2160 fmt:p010le sar:1/1 flags:0x0
> > [AVHWDeviceContext @ 000001dc444f9a00] D3D11 Init
> > [AVHWDeviceContext @ 000001dc444fab80] D3D11 Init
> > [vpp_qsv@f2 @ 000001dc22a3d880] VPP: input is video memory surface
> > [vpp_qsv@f2 @ 000001dc22a3d880] VPP: output is video memory surface
> > [auto_scale_0 @ 000001dc2362a700] w:3840 h:2160 fmt:yuv420p10le
> sar:1/1 -> w:3840 h:2160 fmt:p010le sar:1/1 flags:0x0
> >      Last message repeated 2 times
> > [h264_qsv @ 000001dc161b6040] Using input frames context (format
> qsv) with h264_qsv encoder.
> > [h264_qsv @ 000001dc161b6040] Encoder: input is video memory
> surface
> > [h264_qsv @ 000001dc161b6040] Using the average variable bitrate
> (AVBR) ratecontrol method
> > [h264_qsv @ 000001dc161b6040] Current pixel format is unsupported
> > [h264_qsv @ 000001dc161b6040] some encoding parameters are not
> supported by the QSV runtime. Please double check the input
> parameters.
> > Error initializing output stream 0:0 -- Error while opening encoder
> for output stream #0:0 - maybe incorrect parameters such as bit_rate,
> rate, width or height
> > [AVHWDeviceContext @ 000001dc444f9a00] D3D11 Uninit
> > [AVIOContext @ 000001dc16197c80] Statistics: 0 bytes written, 0
> seeks, 0 writeouts
> > [AVHWDeviceContext @ 000001dc444fab80] D3D11 Uninit
> > [AVIOContext @ 000001dc161839c0] Statistics: 131146 bytes read, 2
> seeks
> > Conversion failed!
> >
> >
> > 2. 10bit from SW context:
> >
> >
> > [graph 0 video input from stream 0:0 @ 0000019e915dee00] w:3840
> h:2160 pixfmt:yuv420p10le tb:1/60000 fr:60000/1001 sar:1/1
> > [auto_scale_0 @ 0000019ee99936c0] w:iw h:ih flags:'' interl:0
> > [format @ 0000019ee9993240] auto-inserting filter 'auto_scale_0'
> between the filter 'Parsed_null_0' and the filter 'format'
> > [auto_scale_0 @ 0000019ee99936c0] w:3840 h:2160 fmt:yuv420p10le
> sar:1/1 -> w:3840 h:2160 fmt:p010le sar:1/1 flags:0x0
> >      Last message repeated 3 times
> > [h264_qsv @ 0000019ee9995dc0] Using device qd1 (type qsv) with
> h264_qsv encoder.
> > [h264_qsv @ 0000019ee9995dc0] Encoder: input is system memory
> surface
> > [h264_qsv @ 0000019ee9995dc0] Using the average variable bitrate
> (AVBR) ratecontrol method
> > [h264_qsv @ 0000019ee9995dc0] Current pixel format is unsupported
> > [h264_qsv @ 0000019ee9995dc0] some encoding parameters are not
> supported by the QSV runtime. Please double check the input
> parameters.
> > Error initializing output stream 0:0 -- Error while opening encoder
> for output stream #0:0 - maybe incorrect parameters such as bit_rate,
> rate, width or height
> > [AVIOContext @ 0000019ef62b4000] Statistics: 0 bytes written, 0
> seeks, 0 writeouts
> > [AVIOContext @ 0000019ee995abc0] Statistics: 131146 bytes read, 2
> seeks
> > Conversion failed!
> >
> > softworkz
> 
> Alright, thanks for testing it. The commit message should mention the
> pixel format is being removed as it's unsupported, then.


The QuickSync architecture does not have any scaling/color conversion
capabilities at the encoder stage. There's the VPP filtering and they
also have a decoder-size fixed-function scaling which is separate from
VPP scaling (similar to CUVID). It's not yet exposed via ffmpeg, though.

Generally - when other video processing is required, it doesn't make 
much sense to do encoder-side scaling/conversion. You'll rather
want to scale down first and then do the other processing on the 
smaller frames.

The only case where I've seen an encoder-side scaling feature is 
MediaCodec, but well - there's no custom processing anyway.

Best,
softworkz
Xiang, Haihao Nov. 28, 2022, 1:57 a.m. UTC | #17
On Sat, 2022-11-26 at 02:54 +0000, Soft Works wrote:
> > -----Original Message-----
> > From: ffmpeg-devel <ffmpeg-devel-bounces@ffmpeg.org> On Behalf Of
> > James Almer
> > Sent: Saturday, November 26, 2022 3:36 AM
> > To: ffmpeg-devel@ffmpeg.org
> > Subject: Re: [FFmpeg-devel] [PATCH] lavc/qsvenc_h264: don't support
> > P010 format
> > 
> > On 11/25/2022 11:31 PM, Soft Works wrote:
> > > 
> > > > -----Original Message-----
> > > > From: ffmpeg-devel <ffmpeg-devel-bounces@ffmpeg.org> On Behalf Of
> > > > James Almer
> > > > Sent: Saturday, November 26, 2022 2:01 AM
> > > > To: ffmpeg-devel@ffmpeg.org
> > > > Subject: Re: [FFmpeg-devel] [PATCH] lavc/qsvenc_h264: don't
> > support
> > > > P010 format
> > > > 
> > > > On 11/25/2022 9:58 PM, Soft Works wrote:
> > > > > 
> > > > > > -----Original Message-----
> > > > > > From: ffmpeg-devel <ffmpeg-devel-bounces@ffmpeg.org> On Behalf
> > Of
> > > > > > James Almer
> > > > > > Sent: Saturday, November 26, 2022 12:58 AM
> > > > > > To: ffmpeg-devel@ffmpeg.org
> > > > > > Subject: Re: [FFmpeg-devel] [PATCH] lavc/qsvenc_h264: don't
> > > > support
> > > > > > P010 format
> > > > > > 
> > > > > > On 11/25/2022 8:51 PM, Soft Works wrote:
> > > > > > > 
> > > > > > > > -----Original Message-----
> > > > > > > > From: ffmpeg-devel <ffmpeg-devel-bounces@ffmpeg.org> On Behalf
> > > > Of
> > > > > > > > James Almer
> > > > > > > > Sent: Saturday, November 26, 2022 12:35 AM
> > > > > > > > To: ffmpeg-devel@ffmpeg.org
> > > > > > > > Subject: Re: [FFmpeg-devel] [PATCH] lavc/qsvenc_h264: don't
> > > > > > support
> > > > > > > > P010 format
> > > > > > > > 
> > > > > > > > On 11/25/2022 8:26 PM, Dong, Ruijing wrote:
> > > > > > > > > [AMD Official Use Only - General]
> > > > > > > > > 
> > > > > > > > > Will it make sense to accept P010 input, however encode to
> > h264
> > > > > > > > 8bit?
> > > > > > > > 
> > > > > > > > If it works (the encoder accepts the 10 bit input even if it
> > > > > > encodes
> > > > > > > > it
> > > > > > > > as 8bit), then i don't see why not. I assume it would also be
> > > > > > faster
> > > > > > > > than using swscale to convert said 10bit input to nv12 before
> > > > > > passing
> > > > > > > > that to the encoder.
> > > > > > > > 
> > > > > > > > Removing support for a pixel format as input in an encoder
> > needs
> > > > a
> > > > > > > > reason other than "It's rarely used", more so when it's a
> > single
> > > > > > > > line.
> > > > > > > > It either needs to not work, or somehow get in the way of
> > > > further
> > > > > > > > improvements.
> > > > > > > 
> > > > > > > Oh sorry, I noticed that there was a misunderstanding.
> > > > > > > 
> > > > > > > When I said "It's rarely used", I didn't mean that as a
> > > > > > justification
> > > > > > > for the removal, it was meant as an explanation why none of the
> > > > > > > hwaccels has implemented it.
> > > > > > > 
> > > > > > > softworkz
> > > > > > 
> > > > > > Alright, then i'll repeat my question: Does it work?
> > > > > 
> > > > > No.
> > > > 
> > > > What does this encoder currently do when you feed it p010 input?
> > What
> > > > does it output?
> > > 
> > > An error:
> > > 
> > > 
> > > 1. 10bit from HW context:
> > > 
> > > 
> > > [graph 0 video input from stream 0:0 @ 000001dc301aeec0] w:3840
> > h:2160 pixfmt:yuv420p10le tb:1/60000 fr:60000/1001 sar:1/1
> > > [auto_scale_0 @ 000001dc2362a700] w:iw h:ih flags:'' interl:0
> > > [hwupload@f1 @ 000001dc2944ef00] auto-inserting filter
> > 'auto_scale_0' between the filter 'graph 0 video input from stream
> > 0:0' and the filter 'hwupload@f1'
> > > [auto_scale_0 @ 000001dc2362a700] w:3840 h:2160 fmt:yuv420p10le
> > sar:1/1 -> w:3840 h:2160 fmt:p010le sar:1/1 flags:0x0
> > > [AVHWDeviceContext @ 000001dc444f9a00] D3D11 Init
> > > [AVHWDeviceContext @ 000001dc444fab80] D3D11 Init
> > > [vpp_qsv@f2 @ 000001dc22a3d880] VPP: input is video memory surface
> > > [vpp_qsv@f2 @ 000001dc22a3d880] VPP: output is video memory surface
> > > [auto_scale_0 @ 000001dc2362a700] w:3840 h:2160 fmt:yuv420p10le
> > sar:1/1 -> w:3840 h:2160 fmt:p010le sar:1/1 flags:0x0
> > >      Last message repeated 2 times
> > > [h264_qsv @ 000001dc161b6040] Using input frames context (format
> > qsv) with h264_qsv encoder.
> > > [h264_qsv @ 000001dc161b6040] Encoder: input is video memory
> > surface
> > > [h264_qsv @ 000001dc161b6040] Using the average variable bitrate
> > (AVBR) ratecontrol method
> > > [h264_qsv @ 000001dc161b6040] Current pixel format is unsupported
> > > [h264_qsv @ 000001dc161b6040] some encoding parameters are not
> > supported by the QSV runtime. Please double check the input
> > parameters.
> > > Error initializing output stream 0:0 -- Error while opening encoder
> > for output stream #0:0 - maybe incorrect parameters such as bit_rate,
> > rate, width or height
> > > [AVHWDeviceContext @ 000001dc444f9a00] D3D11 Uninit
> > > [AVIOContext @ 000001dc16197c80] Statistics: 0 bytes written, 0
> > seeks, 0 writeouts
> > > [AVHWDeviceContext @ 000001dc444fab80] D3D11 Uninit
> > > [AVIOContext @ 000001dc161839c0] Statistics: 131146 bytes read, 2
> > seeks
> > > Conversion failed!
> > > 
> > > 
> > > 2. 10bit from SW context:
> > > 
> > > 
> > > [graph 0 video input from stream 0:0 @ 0000019e915dee00] w:3840
> > h:2160 pixfmt:yuv420p10le tb:1/60000 fr:60000/1001 sar:1/1
> > > [auto_scale_0 @ 0000019ee99936c0] w:iw h:ih flags:'' interl:0
> > > [format @ 0000019ee9993240] auto-inserting filter 'auto_scale_0'
> > between the filter 'Parsed_null_0' and the filter 'format'
> > > [auto_scale_0 @ 0000019ee99936c0] w:3840 h:2160 fmt:yuv420p10le
> > sar:1/1 -> w:3840 h:2160 fmt:p010le sar:1/1 flags:0x0
> > >      Last message repeated 3 times
> > > [h264_qsv @ 0000019ee9995dc0] Using device qd1 (type qsv) with
> > h264_qsv encoder.
> > > [h264_qsv @ 0000019ee9995dc0] Encoder: input is system memory
> > surface
> > > [h264_qsv @ 0000019ee9995dc0] Using the average variable bitrate
> > (AVBR) ratecontrol method
> > > [h264_qsv @ 0000019ee9995dc0] Current pixel format is unsupported
> > > [h264_qsv @ 0000019ee9995dc0] some encoding parameters are not
> > supported by the QSV runtime. Please double check the input
> > parameters.
> > > Error initializing output stream 0:0 -- Error while opening encoder
> > for output stream #0:0 - maybe incorrect parameters such as bit_rate,
> > rate, width or height
> > > [AVIOContext @ 0000019ef62b4000] Statistics: 0 bytes written, 0
> > seeks, 0 writeouts
> > > [AVIOContext @ 0000019ee995abc0] Statistics: 131146 bytes read, 2
> > seeks
> > > Conversion failed!
> > > 
> > > softworkz
> > 
> > Alright, thanks for testing it. The commit message should mention the
> > pixel format is being removed as it's unsupported, then.
> 
> The QuickSync architecture does not have any scaling/color conversion
> capabilities at the encoder stage. There's the VPP filtering and they
> also have a decoder-size fixed-function scaling which is separate from
> VPP scaling (similar to CUVID). It's not yet exposed via ffmpeg, though.
> 
> Generally - when other video processing is required, it doesn't make 
> much sense to do encoder-side scaling/conversion. You'll rather
> want to scale down first and then do the other processing on the 
> smaller frames.
> 
> The only case where I've seen an encoder-side scaling feature is 
> MediaCodec, but well - there's no custom processing anyway.
> 

Right, P010 is not supported by h264_qsv encoder, I'll update the commit
message. 

Thanks
Haihao
diff mbox series

Patch

diff --git a/libavcodec/qsvenc_h264.c b/libavcodec/qsvenc_h264.c
index 0ff7356346..bbdedc3335 100644
--- a/libavcodec/qsvenc_h264.c
+++ b/libavcodec/qsvenc_h264.c
@@ -197,7 +197,6 @@  const FFCodec ff_h264_qsv_encoder = {
     .close          = qsv_enc_close,
     .p.capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_HYBRID,
     .p.pix_fmts     = (const enum AVPixelFormat[]){ AV_PIX_FMT_NV12,
-                                                    AV_PIX_FMT_P010,
                                                     AV_PIX_FMT_QSV,
                                                     AV_PIX_FMT_NONE },
     .p.priv_class   = &class,