* [FFmpeg-devel] [PATCH] avcodec/av1_vaapi: Enable AV1Profile2 VAAPI support.
@ 2024-07-30 20:02 David (Ming Qiang) Wu via ffmpeg-devel
2024-08-05 1:45 ` Xiang, Haihao
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: David (Ming Qiang) Wu via ffmpeg-devel @ 2024-07-30 20:02 UTC (permalink / raw)
To: ffmpeg-devel; +Cc: David (Ming Qiang) Wu, leo.liu
AV1Profile2 VAAPI is supported and tested on AMD VCN5.
Signed-off-by: David (Ming Qiang) Wu <David.Wu3@amd.com>
---
libavcodec/av1dec.c | 3 +++
libavcodec/vaapi_decode.c | 3 +++
2 files changed, 6 insertions(+)
diff --git a/libavcodec/av1dec.c b/libavcodec/av1dec.c
index 1d5b9ef4f4..77f63661a0 100644
--- a/libavcodec/av1dec.c
+++ b/libavcodec/av1dec.c
@@ -599,6 +599,9 @@ static int get_pixel_format(AVCodecContext *avctx)
case AV_PIX_FMT_YUV420P12:
#if CONFIG_AV1_VULKAN_HWACCEL
*fmtp++ = AV_PIX_FMT_VULKAN;
+#endif
+#if CONFIG_AV1_VAAPI_HWACCEL
+ *fmtp++ = AV_PIX_FMT_VAAPI;
#endif
break;
case AV_PIX_FMT_YUV422P:
diff --git a/libavcodec/vaapi_decode.c b/libavcodec/vaapi_decode.c
index a59194340f..a077e47326 100644
--- a/libavcodec/vaapi_decode.c
+++ b/libavcodec/vaapi_decode.c
@@ -448,6 +448,9 @@ static const struct {
MAP(AV1, AV1_MAIN, AV1Profile0),
MAP(AV1, AV1_HIGH, AV1Profile1),
#endif
+#if VA_CHECK_VERSION(1, 23, 0)
+ MAP(AV1, AV1_PROFESSIONAL, AV1Profile2),
+#endif
#undef MAP
};
--
2.34.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".
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [FFmpeg-devel] [PATCH] avcodec/av1_vaapi: Enable AV1Profile2 VAAPI support.
2024-07-30 20:02 [FFmpeg-devel] [PATCH] avcodec/av1_vaapi: Enable AV1Profile2 VAAPI support David (Ming Qiang) Wu via ffmpeg-devel
@ 2024-08-05 1:45 ` Xiang, Haihao
2024-08-05 10:18 ` Andreas Rheinhardt
2024-08-11 18:27 ` Mark Thompson
2 siblings, 0 replies; 6+ messages in thread
From: Xiang, Haihao @ 2024-08-05 1:45 UTC (permalink / raw)
To: ffmpeg-devel; +Cc: David.Wu3, leo.liu
On Di, 2024-07-30 at 16:02 -0400, David (Ming Qiang) Wu via ffmpeg-devel wrote:
> AV1Profile2 VAAPI is supported and tested on AMD VCN5.
>
> Signed-off-by: David (Ming Qiang) Wu <David.Wu3@amd.com>
> ---
> libavcodec/av1dec.c | 3 +++
> libavcodec/vaapi_decode.c | 3 +++
> 2 files changed, 6 insertions(+)
>
> diff --git a/libavcodec/av1dec.c b/libavcodec/av1dec.c
> index 1d5b9ef4f4..77f63661a0 100644
> --- a/libavcodec/av1dec.c
> +++ b/libavcodec/av1dec.c
> @@ -599,6 +599,9 @@ static int get_pixel_format(AVCodecContext *avctx)
> case AV_PIX_FMT_YUV420P12:
> #if CONFIG_AV1_VULKAN_HWACCEL
> *fmtp++ = AV_PIX_FMT_VULKAN;
> +#endif
> +#if CONFIG_AV1_VAAPI_HWACCEL
> + *fmtp++ = AV_PIX_FMT_VAAPI;
> #endif
> break;
> case AV_PIX_FMT_YUV422P:
> diff --git a/libavcodec/vaapi_decode.c b/libavcodec/vaapi_decode.c
> index a59194340f..a077e47326 100644
> --- a/libavcodec/vaapi_decode.c
> +++ b/libavcodec/vaapi_decode.c
> @@ -448,6 +448,9 @@ static const struct {
> MAP(AV1, AV1_MAIN, AV1Profile0),
> MAP(AV1, AV1_HIGH, AV1Profile1),
> #endif
> +#if VA_CHECK_VERSION(1, 23, 0)
> + MAP(AV1, AV1_PROFESSIONAL, AV1Profile2),
> +#endif
>
> #undef MAP
LGTM, Please ping when libva 2.23 (VA-API 1.23) is released officially.
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".
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [FFmpeg-devel] [PATCH] avcodec/av1_vaapi: Enable AV1Profile2 VAAPI support.
2024-07-30 20:02 [FFmpeg-devel] [PATCH] avcodec/av1_vaapi: Enable AV1Profile2 VAAPI support David (Ming Qiang) Wu via ffmpeg-devel
2024-08-05 1:45 ` Xiang, Haihao
@ 2024-08-05 10:18 ` Andreas Rheinhardt
2024-08-11 18:27 ` Mark Thompson
2 siblings, 0 replies; 6+ messages in thread
From: Andreas Rheinhardt @ 2024-08-05 10:18 UTC (permalink / raw)
To: ffmpeg-devel
David (Ming Qiang) Wu via ffmpeg-devel:
> AV1Profile2 VAAPI is supported and tested on AMD VCN5.
>
> Signed-off-by: David (Ming Qiang) Wu <David.Wu3@amd.com>
> ---
> libavcodec/av1dec.c | 3 +++
> libavcodec/vaapi_decode.c | 3 +++
> 2 files changed, 6 insertions(+)
>
> diff --git a/libavcodec/av1dec.c b/libavcodec/av1dec.c
> index 1d5b9ef4f4..77f63661a0 100644
> --- a/libavcodec/av1dec.c
> +++ b/libavcodec/av1dec.c
> @@ -599,6 +599,9 @@ static int get_pixel_format(AVCodecContext *avctx)
> case AV_PIX_FMT_YUV420P12:
> #if CONFIG_AV1_VULKAN_HWACCEL
> *fmtp++ = AV_PIX_FMT_VULKAN;
> +#endif
> +#if CONFIG_AV1_VAAPI_HWACCEL
> + *fmtp++ = AV_PIX_FMT_VAAPI;
> #endif
> break;
> case AV_PIX_FMT_YUV422P:
> diff --git a/libavcodec/vaapi_decode.c b/libavcodec/vaapi_decode.c
> index a59194340f..a077e47326 100644
> --- a/libavcodec/vaapi_decode.c
> +++ b/libavcodec/vaapi_decode.c
> @@ -448,6 +448,9 @@ static const struct {
> MAP(AV1, AV1_MAIN, AV1Profile0),
> MAP(AV1, AV1_HIGH, AV1Profile1),
> #endif
> +#if VA_CHECK_VERSION(1, 23, 0)
> + MAP(AV1, AV1_PROFESSIONAL, AV1Profile2),
> +#endif
>
> #undef MAP
> };
What happens if the #if condition is false? Does the AV1 decoders
get_format callback then advertise support for a pixel format that is
actually unsupported?
- Andreas
_______________________________________________
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".
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [FFmpeg-devel] [PATCH] avcodec/av1_vaapi: Enable AV1Profile2 VAAPI support.
2024-07-30 20:02 [FFmpeg-devel] [PATCH] avcodec/av1_vaapi: Enable AV1Profile2 VAAPI support David (Ming Qiang) Wu via ffmpeg-devel
2024-08-05 1:45 ` Xiang, Haihao
2024-08-05 10:18 ` Andreas Rheinhardt
@ 2024-08-11 18:27 ` Mark Thompson
2024-08-11 18:42 ` Mark Thompson
2 siblings, 1 reply; 6+ messages in thread
From: Mark Thompson @ 2024-08-11 18:27 UTC (permalink / raw)
To: ffmpeg-devel
On 30/07/2024 21:02, David (Ming Qiang) Wu via ffmpeg-devel wrote:
> AV1Profile2 VAAPI is supported and tested on AMD VCN5.
>
> Signed-off-by: David (Ming Qiang) Wu <David.Wu3@amd.com>
> ---
> libavcodec/av1dec.c | 3 +++
> libavcodec/vaapi_decode.c | 3 +++
> 2 files changed, 6 insertions(+)
>
> diff --git a/libavcodec/av1dec.c b/libavcodec/av1dec.c
> index 1d5b9ef4f4..77f63661a0 100644
> --- a/libavcodec/av1dec.c
> +++ b/libavcodec/av1dec.c
> @@ -599,6 +599,9 @@ static int get_pixel_format(AVCodecContext *avctx)
> case AV_PIX_FMT_YUV420P12:
> #if CONFIG_AV1_VULKAN_HWACCEL
> *fmtp++ = AV_PIX_FMT_VULKAN;
> +#endif
> +#if CONFIG_AV1_VAAPI_HWACCEL
> + *fmtp++ = AV_PIX_FMT_VAAPI;
> #endif
> break;
> case AV_PIX_FMT_YUV422P:
> diff --git a/libavcodec/vaapi_decode.c b/libavcodec/vaapi_decode.c
> index a59194340f..a077e47326 100644
> --- a/libavcodec/vaapi_decode.c
> +++ b/libavcodec/vaapi_decode.c
> @@ -448,6 +448,9 @@ static const struct {
> MAP(AV1, AV1_MAIN, AV1Profile0),
> MAP(AV1, AV1_HIGH, AV1Profile1),
> #endif
> +#if VA_CHECK_VERSION(1, 23, 0)
> + MAP(AV1, AV1_PROFESSIONAL, AV1Profile2),
> +#endif
>
> #undef MAP
> };
Based on <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30429> this is supporting profile 2 only for 4:2:0 12-bit, and therefore can't advertise profile 2 generally for the decoder because that would imply support for all 4:2:2 and 4:4:4 cases as well.
I think this wants something added to VAAPI in order to be able to advertise partial support for a profile?
(It would be very confusing if we got "AV1Profile2" in VAAPI meaning only 4:2:0 12-bit and then have to add a separate "AV1Profile2exceptreallythistime" to meant actual AV1 profile 2.)
Thanks,
- Mark
_______________________________________________
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".
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [FFmpeg-devel] [PATCH] avcodec/av1_vaapi: Enable AV1Profile2 VAAPI support.
2024-08-11 18:27 ` Mark Thompson
@ 2024-08-11 18:42 ` Mark Thompson
2024-08-12 18:56 ` David Wu via ffmpeg-devel
0 siblings, 1 reply; 6+ messages in thread
From: Mark Thompson @ 2024-08-11 18:42 UTC (permalink / raw)
To: ffmpeg-devel
On 11/08/2024 19:27, Mark Thompson wrote:
> On 30/07/2024 21:02, David (Ming Qiang) Wu via ffmpeg-devel wrote:
>> AV1Profile2 VAAPI is supported and tested on AMD VCN5.
>>
>> Signed-off-by: David (Ming Qiang) Wu <David.Wu3@amd.com>
>> ---
>> libavcodec/av1dec.c | 3 +++
>> libavcodec/vaapi_decode.c | 3 +++
>> 2 files changed, 6 insertions(+)
>>
>> diff --git a/libavcodec/av1dec.c b/libavcodec/av1dec.c
>> index 1d5b9ef4f4..77f63661a0 100644
>> --- a/libavcodec/av1dec.c
>> +++ b/libavcodec/av1dec.c
>> @@ -599,6 +599,9 @@ static int get_pixel_format(AVCodecContext *avctx)
>> case AV_PIX_FMT_YUV420P12:
>> #if CONFIG_AV1_VULKAN_HWACCEL
>> *fmtp++ = AV_PIX_FMT_VULKAN;
>> +#endif
>> +#if CONFIG_AV1_VAAPI_HWACCEL
>> + *fmtp++ = AV_PIX_FMT_VAAPI;
>> #endif
>> break;
>> case AV_PIX_FMT_YUV422P:
>> diff --git a/libavcodec/vaapi_decode.c b/libavcodec/vaapi_decode.c
>> index a59194340f..a077e47326 100644
>> --- a/libavcodec/vaapi_decode.c
>> +++ b/libavcodec/vaapi_decode.c
>> @@ -448,6 +448,9 @@ static const struct {
>> MAP(AV1, AV1_MAIN, AV1Profile0),
>> MAP(AV1, AV1_HIGH, AV1Profile1),
>> #endif
>> +#if VA_CHECK_VERSION(1, 23, 0)
>> + MAP(AV1, AV1_PROFESSIONAL, AV1Profile2),
>> +#endif
>>
>> #undef MAP
>> };
>
> Based on <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30429> this is supporting profile 2 only for 4:2:0 12-bit, and therefore can't advertise profile 2 generally for the decoder because that would imply support for all 4:2:2 and 4:4:4 cases as well.
>
> I think this wants something added to VAAPI in order to be able to advertise partial support for a profile?
>
> (It would be very confusing if we got "AV1Profile2" in VAAPI meaning only 4:2:0 12-bit and then have to add a separate "AV1Profile2exceptreallythistime" to meant actual AV1 profile 2.)
I commented in <https://github.com/intel/libva/pull/828>.
Please fix this before it get further in Mesa, having a version reporting incorrect decoder capabilities which we need to hack around elsewhere would be non-ideal.
Thanks,
- Mark
_______________________________________________
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".
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [FFmpeg-devel] [PATCH] avcodec/av1_vaapi: Enable AV1Profile2 VAAPI support.
2024-08-11 18:42 ` Mark Thompson
@ 2024-08-12 18:56 ` David Wu via ffmpeg-devel
0 siblings, 0 replies; 6+ messages in thread
From: David Wu via ffmpeg-devel @ 2024-08-12 18:56 UTC (permalink / raw)
To: ffmpeg-devel; +Cc: David Wu
thanks you Mark! will follow up on libva changes first.
David
On 2024-08-11 14:42, Mark Thompson wrote:
> On 11/08/2024 19:27, Mark Thompson wrote:
>> On 30/07/2024 21:02, David (Ming Qiang) Wu via ffmpeg-devel wrote:
>>> AV1Profile2 VAAPI is supported and tested on AMD VCN5.
>>>
>>> Signed-off-by: David (Ming Qiang) Wu <David.Wu3@amd.com>
>>> ---
>>> libavcodec/av1dec.c | 3 +++
>>> libavcodec/vaapi_decode.c | 3 +++
>>> 2 files changed, 6 insertions(+)
>>>
>>> diff --git a/libavcodec/av1dec.c b/libavcodec/av1dec.c
>>> index 1d5b9ef4f4..77f63661a0 100644
>>> --- a/libavcodec/av1dec.c
>>> +++ b/libavcodec/av1dec.c
>>> @@ -599,6 +599,9 @@ static int get_pixel_format(AVCodecContext *avctx)
>>> case AV_PIX_FMT_YUV420P12:
>>> #if CONFIG_AV1_VULKAN_HWACCEL
>>> *fmtp++ = AV_PIX_FMT_VULKAN;
>>> +#endif
>>> +#if CONFIG_AV1_VAAPI_HWACCEL
>>> + *fmtp++ = AV_PIX_FMT_VAAPI;
>>> #endif
>>> break;
>>> case AV_PIX_FMT_YUV422P:
>>> diff --git a/libavcodec/vaapi_decode.c b/libavcodec/vaapi_decode.c
>>> index a59194340f..a077e47326 100644
>>> --- a/libavcodec/vaapi_decode.c
>>> +++ b/libavcodec/vaapi_decode.c
>>> @@ -448,6 +448,9 @@ static const struct {
>>> MAP(AV1, AV1_MAIN, AV1Profile0),
>>> MAP(AV1, AV1_HIGH, AV1Profile1),
>>> #endif
>>> +#if VA_CHECK_VERSION(1, 23, 0)
>>> + MAP(AV1, AV1_PROFESSIONAL, AV1Profile2),
>>> +#endif
>>>
>>> #undef MAP
>>> };
>> Based on <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30429> this is supporting profile 2 only for 4:2:0 12-bit, and therefore can't advertise profile 2 generally for the decoder because that would imply support for all 4:2:2 and 4:4:4 cases as well.
>>
>> I think this wants something added to VAAPI in order to be able to advertise partial support for a profile?
>>
>> (It would be very confusing if we got "AV1Profile2" in VAAPI meaning only 4:2:0 12-bit and then have to add a separate "AV1Profile2exceptreallythistime" to meant actual AV1 profile 2.)
> I commented in <https://github.com/intel/libva/pull/828>.
>
> Please fix this before it get further in Mesa, having a version reporting incorrect decoder capabilities which we need to hack around elsewhere would be non-ideal.
>
> Thanks,
>
> - Mark
> _______________________________________________
> 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".
_______________________________________________
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".
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2024-08-12 18:57 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-07-30 20:02 [FFmpeg-devel] [PATCH] avcodec/av1_vaapi: Enable AV1Profile2 VAAPI support David (Ming Qiang) Wu via ffmpeg-devel
2024-08-05 1:45 ` Xiang, Haihao
2024-08-05 10:18 ` Andreas Rheinhardt
2024-08-11 18:27 ` Mark Thompson
2024-08-11 18:42 ` Mark Thompson
2024-08-12 18:56 ` David Wu via ffmpeg-devel
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
This inbox may be cloned and mirrored by anyone:
git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
ffmpegdev@gitmailbox.com
public-inbox-index ffmpegdev
Example config snippet for mirrors.
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git