Re: [FFmpeg-devel] [PATCH v4 1/5] configure: Remove libva 1.x support

2024-05-07 Thread Mark Thompson
On 07/05/2024 06:27, Xiang, Haihao wrote: > On So, 2024-05-05 at 20:01 +0100, Mark Thompson wrote: >> libva 2.0 was released in 2017 and the 2.x versions are included in all >> supported distributions nowadays.  Various features no longer need any >> configure check after th

Re: [FFmpeg-devel] [PATCH] lavc/vaapi_h264: Fix merging fields in DPB with missing references

2024-05-07 Thread Mark Thompson
On 07/05/2024 07:00, David Rosca wrote: > If there are missing references, h264 decode does error concealment > by copying previous refs which means there will be duplicated surfaces > and this code would try to merge them instead of correctly appending > to DPB. Make sure the fields were actually

Re: [FFmpeg-devel] [PATCH 2/2] lavc/vaapi_av1: Avoid sending the same slice buffer multiple times

2024-05-07 Thread Mark Thompson
On 28/04/2024 08:26, David Rosca wrote: > When there are multiple tiles in one slice buffer, use multiple slice > params to avoid sending the same slice buffer multiple times and thus > increasing the bitstream size the driver will need to upload to hw. > --- > libavcodec/vaapi_av1.c | 37

Re: [FFmpeg-devel] [PATCH v2 1/3] lavc/h265_profile_level: Expand profile compatibility checking

2024-05-06 Thread Mark Thompson
On 06/05/2024 20:56, Andreas Rheinhardt wrote: > Mark Thompson: >> Replace existing get_profile() with find_profile(), which finds the >> lowest compatible profile rather than requiring an exact match. >> --- >> Series changes since v1: >> * Added H265_PROFIL

Re: [FFmpeg-devel] [PATCH] lavc/vaapi_h264: Don't try to merge fields in DPB for non-field pics

2024-05-06 Thread Mark Thompson
On 05/05/2024 17:36, David Rosca wrote: > This path can be hit when there are missing references while decoding > progressive stream and would completely break the DPB contents. > --- > libavcodec/vaapi_h264.c | 30 -- > 1 file changed, 16 insertions(+), 14

Re: [FFmpeg-devel] [PATCH 4/6] nvdec_av1: Use av1dec force_integer_mv value

2024-05-06 Thread Mark Thompson
On 06/05/2024 18:19, Timo Rothenpieler wrote: > On 27.04.2024 17:30, Mark Thompson wrote: >> --- >>   libavcodec/nvdec_av1.c | 4 +--- >>   1 file changed, 1 insertion(+), 3 deletions(-) >> >> diff --git a/libavcodec/nvdec_av1.c b/libavcodec/nvdec_av1.c >&

[FFmpeg-devel] [PATCH v2 3/3] lavc/vaapi_hevc: Don't require exact profiles

2024-05-06 Thread Mark Thompson
Rather than turning the constraint flags into a single profile and then searching for that profile (and failing if it doesn't match any profile exactly), instead search all supported profiles and use the first one which supports the given set of constraint flags. --- libavcodec/vaapi_decode.c |

[FFmpeg-devel] [PATCH v2 2/3] lavc: Add test for H.265 profile handling

2024-05-06 Thread Mark Thompson
--- libavcodec/Makefile | 2 +- libavcodec/tests/.gitignore | 1 + libavcodec/tests/h265_profiles.c | 440 +++ tests/fate/libavcodec.mak| 5 + 4 files changed, 447 insertions(+), 1 deletion(-) create mode 100644

[FFmpeg-devel] [PATCH v2 1/3] lavc/h265_profile_level: Expand profile compatibility checking

2024-05-06 Thread Mark Thompson
Replace existing get_profile() with find_profile(), which finds the lowest compatible profile rather than requiring an exact match. --- Series changes since v1: * Added H265_PROFILE_INVALID with value zero because it simplifies some code (and the values don't matter). * Fixed the h265-levels

[FFmpeg-devel] [PATCH v4 5/5] hwcontext_vaapi: Deprecate quirks

2024-05-05 Thread Mark Thompson
These only apply to obsolete drivers which do not work with the now-required libva 2.x. --- libavutil/hwcontext_vaapi.c | 123 ++-- libavutil/hwcontext_vaapi.h | 15 + 2 files changed, 50 insertions(+), 88 deletions(-) diff --git a/libavutil/hwcontext_vaapi.c

[FFmpeg-devel] [PATCH v4 4/5] lavu: Remove libva 1.x support

2024-05-05 Thread Mark Thompson
libva 2.0 was released in 2017 and the 2.x versions are included in all supported distributions nowadays. --- libavutil/hwcontext_vaapi.c | 22 -- 1 file changed, 22 deletions(-) diff --git a/libavutil/hwcontext_vaapi.c b/libavutil/hwcontext_vaapi.c index

[FFmpeg-devel] [PATCH v4 3/5] lavc: Remove libva 1.x support

2024-05-05 Thread Mark Thompson
libva 2.0 was released in 2017 and the 2.x versions are included in all supported distributions nowadays. --- libavcodec/vaapi_decode.c | 39 ++--- libavcodec/vaapi_encode.c | 78 ++ libavcodec/vaapi_encode.h | 9

[FFmpeg-devel] [PATCH v4 1/5] configure: Remove libva 1.x support

2024-05-05 Thread Mark Thompson
libva 2.0 was released in 2017 and the 2.x versions are included in all supported distributions nowadays. Various features no longer need any configure check after this command, including all codecs except AV1. Note that the libva version is the API version plus one, so this is removing support

[FFmpeg-devel] [PATCH v4 2/5] lavfi: Remove libva 1.x support

2024-05-05 Thread Mark Thompson
libva 2.0 was released in 2017 and the 2.x versions are included in all supported distributions nowadays. --- libavfilter/vaapi_vpp.c | 22 -- 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/libavfilter/vaapi_vpp.c b/libavfilter/vaapi_vpp.c index

Re: [FFmpeg-devel] [PATCH 01/10, v2] avutil: add hwcontext_amf.

2024-05-02 Thread Mark Thompson
On 01/05/2024 19:38, Dmitrii Ovchinnikov wrote: > Adds hwcontext_amf, which allows to use shared AMF > context for the encoder, decoder and AMF-based filters, > without copy to the host memory. > It will also allow you to use some optimizations in > the interaction of components (for example, SAV)

Re: [FFmpeg-devel] [PATCH 02/10, v2] avcodec: add amfdec.

2024-05-02 Thread Mark Thompson
On 01/05/2024 19:38, Dmitrii Ovchinnikov wrote: > From: Evgeny Pavlov > > Added AMF based h264, hevc, av1 decoders. > Co-authored-by: Dmitrii Ovchinnikov > v2: added encoder reinitialisation > --- > libavcodec/Makefile| 7 +- > libavcodec/allcodecs.c | 3 + > libavcodec/amfdec.c|

Re: [FFmpeg-devel] [PATCH 1/9] lavu/hwcontext_qsv: update AVQSVFramesContext to support dynamic frame pool

2024-05-02 Thread Mark Thompson
On 28/04/2024 08:39, Xiang, Haihao wrote: > From: Haihao Xiang > > Add AVQSVFramesContext.info and update the description. > > Signed-off-by: Haihao Xiang > --- > doc/APIchanges| 3 +++ > libavutil/hwcontext_qsv.c | 4 ++-- > libavutil/hwcontext_qsv.h | 28

Re: [FFmpeg-devel] [PATCH v3 1/4] lavu: Remove libva 1.x support

2024-04-28 Thread Mark Thompson
On 24/04/2024 15:06, Xiang, Haihao wrote: > On Ma, 2024-04-22 at 22:41 +0100, Mark Thompson wrote: >> libva 2.0 was released in 2017 and the 2.x versions are included in all >> supported distributions nowadays. >> --- >> Rebased. >> >> I

Re: [FFmpeg-devel] [PATCH 2/2] lavc/vaapi_hevc: Don't require exact profiles

2024-04-28 Thread Mark Thompson
On 24/04/2024 14:45, Xiang, Haihao wrote: > On Ma, 2024-04-22 at 22:23 +0100, Mark Thompson wrote: >> Rather than turning the constraint flags into a single profile and then >> searching for that profile (and failing if it doesn't match any profile >> exactly), instead

[FFmpeg-devel] [PATCH 6/6] vulkan_av1: Fix force_integer_mv value

2024-04-27 Thread Mark Thompson
--- libavcodec/vulkan_av1.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/vulkan_av1.c b/libavcodec/vulkan_av1.c index 25ab4ecc70..a550215e32 100644 --- a/libavcodec/vulkan_av1.c +++ b/libavcodec/vulkan_av1.c @@ -435,7 +435,7 @@ static int

[FFmpeg-devel] [PATCH 5/6] vaapi_av1: Fix force_integer_mv value

2024-04-27 Thread Mark Thompson
--- libavcodec/vaapi_av1.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/vaapi_av1.c b/libavcodec/vaapi_av1.c index 1f563483b9..f61bf63098 100644 --- a/libavcodec/vaapi_av1.c +++ b/libavcodec/vaapi_av1.c @@ -220,7 +220,7 @@ static int

[FFmpeg-devel] [PATCH 4/6] nvdec_av1: Use av1dec force_integer_mv value

2024-04-27 Thread Mark Thompson
--- libavcodec/nvdec_av1.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/libavcodec/nvdec_av1.c b/libavcodec/nvdec_av1.c index 4efa420e66..8a46db1ed5 100644 --- a/libavcodec/nvdec_av1.c +++ b/libavcodec/nvdec_av1.c @@ -106,9 +106,7 @@ static int

[FFmpeg-devel] [PATCH 3/6] vdpau_av1: Use av1dec force_integer_mv value

2024-04-27 Thread Mark Thompson
--- libavcodec/vdpau_av1.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/libavcodec/vdpau_av1.c b/libavcodec/vdpau_av1.c index b74ea6aa0c..a1aff79bb7 100644 --- a/libavcodec/vdpau_av1.c +++ b/libavcodec/vdpau_av1.c @@ -91,9 +91,7 @@ static int

[FFmpeg-devel] [PATCH 2/6] dxva2_av1: Use av1dec force_integer_mv value

2024-04-27 Thread Mark Thompson
--- libavcodec/dxva2_av1.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/dxva2_av1.c b/libavcodec/dxva2_av1.c index 5b95f99c9b..1b55510659 100644 --- a/libavcodec/dxva2_av1.c +++ b/libavcodec/dxva2_av1.c @@ -101,7 +101,7 @@ int

[FFmpeg-devel] [PATCH 1/6] av1dec: Add force_integer_mv derived field for decoder use

2024-04-27 Thread Mark Thompson
This is not the same as the syntax element value in the frame header because the specification parsing tables override the value on intra frames. --- On 27/04/2024 15:58, Lynne wrote: > This looks better to me. HYG. Of these, only VAAPI tested. (And probably it never did anything anyway.)

Re: [FFmpeg-devel] [PATCH] vulkan_av1: Set force_integer_mv on intra frames

2024-04-27 Thread Mark Thompson
On 27/04/2024 14:58, Mark Thompson wrote: > On 27/04/2024 14:47, Ronald S. Bultje wrote: >> Hi, >> >> On Sat, Apr 27, 2024 at 9:40 AM Mark Thompson wrote: >> >>> The flag in CBS is the value read from the bitstream (as required for >>> passthrough), bu

Re: [FFmpeg-devel] [PATCH] vulkan_av1: Set force_integer_mv on intra frames

2024-04-27 Thread Mark Thompson
On 27/04/2024 14:47, Ronald S. Bultje wrote: > Hi, > > On Sat, Apr 27, 2024 at 9:40 AM Mark Thompson wrote: > >> The flag in CBS is the value read from the bitstream (as required for >> passthrough), but the specification overrides that by setting it >> immediat

[FFmpeg-devel] [PATCH] vulkan_av1: Set force_integer_mv on intra frames

2024-04-27 Thread Mark Thompson
The flag in CBS is the value read from the bitstream (as required for passthrough), but the specification overrides that by setting it immediately after reading if the frame is intra. --- This is already done for DXVA and VDPAU. Also wondering whether this should be done for VAAPI?

[FFmpeg-devel] [PATCH v3 4/4] configure: Remove libva 1.x support

2024-04-22 Thread Mark Thompson
libva 2.0 was released in 2017 and the 2.x versions are included in all supported distributions nowadays. Various features no longer need any configure check after this command, including all codecs except AV1. Note that the libva version is the API version plus one, so this is removing support

[FFmpeg-devel] [PATCH v3 3/4] lavfi: Remove libva 1.x support

2024-04-22 Thread Mark Thompson
libva 2.0 was released in 2017 and the 2.x versions are included in all supported distributions nowadays. --- Rebase on the dynamic pool change. libavfilter/vaapi_vpp.c | 22 -- 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/libavfilter/vaapi_vpp.c

[FFmpeg-devel] [PATCH v3 2/4] lavc: Remove libva 1.x support

2024-04-22 Thread Mark Thompson
libva 2.0 was released in 2017 and the 2.x versions are included in all supported distributions nowadays. --- Fixed some orphaned labels. libavcodec/vaapi_decode.c | 39 ++--- libavcodec/vaapi_encode.c | 78 ++ libavcodec/vaapi_encode.h

[FFmpeg-devel] [PATCH v3 1/4] lavu: Remove libva 1.x support

2024-04-22 Thread Mark Thompson
libva 2.0 was released in 2017 and the 2.x versions are included in all supported distributions nowadays. --- Rebased. I think we can also drop the other quirks? They are for the proprietary media SDK driver (which I think is dead?) and the VDPAU wrapper (which I don't think was ever updated

[FFmpeg-devel] [PATCH 2/2] lavc/vaapi_hevc: Don't require exact profiles

2024-04-22 Thread Mark Thompson
Rather than turning the constraint flags into a single profile and then searching for that profile (and failing if it doesn't match any profile exactly), instead search all supported profiles and use the first one which supports the given set of constraint flags. --- This fixes decode of rext

[FFmpeg-devel] [PATCH 1/2] lavc/h265_profile_level: Expand profile compatibility checking

2024-04-22 Thread Mark Thompson
Replace existing get_profile() with find_profile(), which finds the lowest compatible profile rather than requiring an exact match. --- libavcodec/h265_profile_level.c | 73 + libavcodec/h265_profile_level.h | 70 ++-

Re: [FFmpeg-devel] [PATCH v3 1/2] lavc/vaapi_encode_h265: Map HEVC AV REXT profile to VA REXT profile

2024-04-22 Thread Mark Thompson
On 18/04/2024 09:21, Wang, Fei W wrote: > On Tue, 2024-04-16 at 04:57 +, Wang, Fei W wrote: >> On Mon, 2024-04-15 at 23:07 +0100, Mark Thompson wrote: >>> Why is this change helpful? >> >> Together with 2/2 fix on the hw support VAAPI main12 decode and >> e

Re: [FFmpeg-devel] [PATCH] av1dec: Fix RefFrameSignBias calculation

2024-04-22 Thread Mark Thompson
On 22/04/2024 21:36, Lynne wrote: > Apr 22, 2024, 22:31 by s...@jkqxz.net: > >> --- >> Actually match the specification. (Though I'm guessing this field isn't >> actually used if things pass anyway?) >> >> libavcodec/av1dec.c | 9 +++-- >> 1 file changed, 7 insertions(+), 2 deletions(-) >>

Re: [FFmpeg-devel] [PATCH] avcodec/cbs_h2645: Check NAL space

2024-04-22 Thread Mark Thompson
On 22/04/2024 02:31, Michael Niedermayer wrote: > Found-by-reviewing: CID1419833 Untrusted loop bound > > Sponsored-by: Sovereign Tech Fund > Signed-off-by: Michael Niedermayer > --- > libavcodec/cbs_h2645.c | 4 > 1 file changed, 4 insertions(+) > > diff --git a/libavcodec/cbs_h2645.c

[FFmpeg-devel] [PATCH] av1dec: Fix RefFrameSignBias calculation

2024-04-22 Thread Mark Thompson
--- Actually match the specification. (Though I'm guessing this field isn't actually used if things pass anyway?) libavcodec/av1dec.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/libavcodec/av1dec.c b/libavcodec/av1dec.c index 69da08b686..79a30a114d 100644 ---

Re: [FFmpeg-devel] [PATCH v3 1/2] lavc/vaapi_encode_h265: Map HEVC AV REXT profile to VA REXT profile

2024-04-15 Thread Mark Thompson
On 15/04/2024 02:21, Xiang, Haihao wrote: > On Ma, 2024-03-18 at 12:21 +0800, fei.w.wang-at-intel@ffmpeg.org wrote: >> From: Fei Wang >> >> There is no Main8/10 profile defined in HEVC REXT profiles. Use Main12 >> which is compatible with 8/10bit. >> >> Signed-off-by: Fei Wang >> --- >>  

Re: [FFmpeg-devel] [PATCH v2 1/2] lavc/av1: Record reference ordering information for each frame

2024-04-14 Thread Mark Thompson
On 13/04/2024 20:05, Mark Thompson wrote: > This is needed by Vulkan.  Constructing this can't be delegated to CBS > because packets might contain multiple frames (when non-shown frames are > present) but we need separate snapshots immediately before each frame > for the decoder. >

[FFmpeg-devel] [PATCH v2 2/2] lavc/vulkan_av1: Use av1dec reference order hint information

2024-04-13 Thread Mark Thompson
--- Changes over v1: fix the OrderHints field as well; move things into the loop over reference names rather than the loop over reference slots. libavcodec/vulkan_av1.c | 23 ++- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/libavcodec/vulkan_av1.c

[FFmpeg-devel] [PATCH v2 1/2] lavc/av1: Record reference ordering information for each frame

2024-04-13 Thread Mark Thompson
This is needed by Vulkan. Constructing this can't be delegated to CBS because packets might contain multiple frames (when non-shown frames are present) but we need separate snapshots immediately before each frame for the decoder. --- Changes over v1: rename the order hint field and document

[FFmpeg-devel] [PATCH 2/2] lavc/vulkan_av1: Use av1dec reference order hint information

2024-04-07 Thread Mark Thompson
--- libavcodec/vulkan_av1.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/libavcodec/vulkan_av1.c b/libavcodec/vulkan_av1.c index c9e398eaec..8cca97c005 100644 --- a/libavcodec/vulkan_av1.c +++ b/libavcodec/vulkan_av1.c @@ -242,7 +242,6 @@ static int

[FFmpeg-devel] [PATCH 1/2] lavc/av1: Record reference ordering information for each frame

2024-04-07 Thread Mark Thompson
This is needed by Vulkan. Constructing this can't be delegated to CBS because packets might contain multiple frames (when non-shown frames are present) but we need separate snapshots immediately before each frame for the decoder. --- libavcodec/av1dec.c | 26 ++

[FFmpeg-devel] [PATCH v2 4/4] configure: Remove libva 1.x support

2024-04-03 Thread Mark Thompson
libva 2.0 was released in 2017 and the 2.x versions are included in all supported distributions nowadays. Various features no longer need any configure check after this command, including all codecs except AV1. Note that the libva version is the API version plus one, so this is removing support

[FFmpeg-devel] [PATCH v2 3/4] lavfi: Remove libva 1.x support

2024-04-03 Thread Mark Thompson
libva 2.0 was released in 2017 and the 2.x versions are included in all supported distributions nowadays. --- No change. libavfilter/vaapi_vpp.c | 15 ++- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/libavfilter/vaapi_vpp.c b/libavfilter/vaapi_vpp.c index

[FFmpeg-devel] [PATCH v2 2/4] lavc: Remove libva 1.x support

2024-04-03 Thread Mark Thompson
libva 2.0 was released in 2017 and the 2.x versions are included in all supported distributions nowadays. --- Now removing lots of VA_CHECK_VERSION as well. libavcodec/vaapi_decode.c | 16 +-- libavcodec/vaapi_encode.c | 77 ++

[FFmpeg-devel] [PATCH v2 1/4] lavu: Remove libva 1.x support

2024-04-03 Thread Mark Thompson
libva 2.0 was released in 2017 and the 2.x versions are included in all supported distributions nowadays. --- The other two quirk cases are very old and could probably be removed? That could then deprecate the quirks system as well. libavutil/hwcontext_vaapi.c | 22 -- 1

Re: [FFmpeg-devel] [PATCH 1/4] lavu: Remove libva 1.x support

2024-04-03 Thread Mark Thompson
On 03/04/2024 21:09, Rémi Denis-Courmont wrote: Le keskiviikkona 3. huhtikuuta 2024, 22.44.29 EEST Mark Thompson a écrit : libva 2.0 was released in 2017 and the 2.x versions are included in all supported distributions nowadays. --- libavutil/hwcontext_vaapi.c | 4 1 file changed, 4

[FFmpeg-devel] [PATCH 4/4] configure: Remove libva 1.x support

2024-04-03 Thread Mark Thompson
libva 2.0 was released in 2017 and the 2.x versions are included in all supported distributions nowadays. Various features no longer need any configure check after this command, including all codecs except AV1. --- configure | 22 +++--- 1 file changed, 3 insertions(+), 19

[FFmpeg-devel] [PATCH 3/4] lavfi: Remove libva 1.x support

2024-04-03 Thread Mark Thompson
libva 2.0 was released in 2017 and the 2.x versions are included in all supported distributions nowadays. --- libavfilter/vaapi_vpp.c | 15 ++- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/libavfilter/vaapi_vpp.c b/libavfilter/vaapi_vpp.c index ace1153a23..21d74f8112

[FFmpeg-devel] [PATCH 2/4] lavc: Remove libva 1.x support

2024-04-03 Thread Mark Thompson
libva 2.0 was released in 2017 and the 2.x versions are included in all supported distributions nowadays. --- libavcodec/vaapi_decode.c | 10 ++ libavcodec/vaapi_encode.c | 31 +++ libavcodec/vaapi_encode_h264.c | 18 -- 3 files

[FFmpeg-devel] [PATCH 1/4] lavu: Remove libva 1.x support

2024-04-03 Thread Mark Thompson
libva 2.0 was released in 2017 and the 2.x versions are included in all supported distributions nowadays. --- libavutil/hwcontext_vaapi.c | 4 1 file changed, 4 deletions(-) diff --git a/libavutil/hwcontext_vaapi.c b/libavutil/hwcontext_vaapi.c index 56d03aa4cd..bc82ab31e6 100644 ---

Re: [FFmpeg-devel] [PATCH 1/3] lavu/hwcontext_vaapi: Add a new quirk

2024-04-03 Thread Mark Thompson
On 28/03/2024 02:17, Xiang, Haihao wrote: From: Haihao Xiang libva2 doesn't require a fixed surface-array any more, but some driver/hardware combinations which rely on this are still used. To reduce the impact to users, add a quirk for the driver/hardware combination which supports dynamic

Re: [FFmpeg-devel] [PATCH] lavc/vaapi_hevc: Add support for Main Intra & Main 10 Intra

2024-04-02 Thread Mark Thompson
On 02/04/2024 07:55, Xiang, Haihao wrote: On Ma, 2024-04-01 at 21:11 +0100, Mark Thompson wrote: On 28/03/2024 02:07, Xiang, Haihao wrote: From: Haihao Xiang Both Main Intra and Main 10 Intra are Rext, we may use Main and Main 10 instead for decoding. This patch fixes the error below: [hevc

Re: [FFmpeg-devel] [PATCH] avcodec/mfenc: expose more properties of the media foundation encoder

2024-04-02 Thread Mark Thompson
On 01/04/2024 19:55, Mark Thompson wrote: On 01/04/2024 17:25, Mark Samuelson wrote: On Mon, Apr 1, 2024 at 10:06 AM Mark Thompson wrote: On 28/03/2024 12:34, Mark Samuelson wrote: Thank you for the notes, here is a new patch that incorporates your suggestions.  You are right, the default

Re: [FFmpeg-devel] [PATCH] lavc/vaapi_hevc: Add support for Main Intra & Main 10 Intra

2024-04-01 Thread Mark Thompson
On 28/03/2024 02:07, Xiang, Haihao wrote: From: Haihao Xiang Both Main Intra and Main 10 Intra are Rext, we may use Main and Main 10 instead for decoding. This patch fixes the error below: [hevc @ 0x55a771b80a00] No support for codec hevc profile 4. [hevc @ 0x55a771b80a00] Failed setup for

Re: [FFmpeg-devel] [PATCH v3 2/2] lavc/vaapi_encode_h265: Set general_*_constriaint flags with profile

2024-04-01 Thread Mark Thompson
On 20/03/2024 08:44, Wang, Fei W wrote: On Mon, 2024-03-18 at 21:22 +, Mark Thompson wrote: On 18/03/2024 04:21, fei.w.wang-at-intel@ffmpeg.org wrote: From: Fei Wang According to Table A.2 in spec. Signed-off-by: Fei Wang --- libavcodec/vaapi_encode_h265.c | 176

Re: [FFmpeg-devel] [PATCH v1 1/7] lavc/vaapi_dec: Create VA parameters dynamically

2024-04-01 Thread Mark Thompson
On 28/03/2024 01:26, fei.w.wang-at-intel@ffmpeg.org wrote: From: Fei Wang Signed-off-by: Fei Wang --- libavcodec/vaapi_decode.c | 29 ++--- libavcodec/vaapi_decode.h | 7 ++- 2 files changed, 24 insertions(+), 12 deletions(-) This is because the VVC code

Re: [FFmpeg-devel] [PATCH] [v4] avcodec/vaapi_encode: add customized surface alignment

2024-04-01 Thread Mark Thompson
don't want to be artificially constrained to precisely what happens to be needed in this case. On Sun, Mar 24, 2024 at 5:38 PM Mark Thompson wrote: What other users do you have in mind for this? (Are you expecting hwupload to use it as well, say?) If this is only used in VAAPI encode then I

Re: [FFmpeg-devel] [PATCH] lavc/vaapi_encode_av1: Set roi_quant_range

2024-04-01 Thread Mark Thompson
On 01/04/2024 19:00, David Rosca wrote: --- libavcodec/vaapi_encode_av1.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavcodec/vaapi_encode_av1.c b/libavcodec/vaapi_encode_av1.c index a46b882ab9..02a31b894d 100644 --- a/libavcodec/vaapi_encode_av1.c +++

Re: [FFmpeg-devel] [PATCH] avcodec/mfenc: expose more properties of the media foundation encoder

2024-04-01 Thread Mark Thompson
On 01/04/2024 17:25, Mark Samuelson wrote: On Mon, Apr 1, 2024 at 10:06 AM Mark Thompson wrote: On 28/03/2024 12:34, Mark Samuelson wrote: Thank you for the notes, here is a new patch that incorporates your suggestions. You are right, the default value of 12 for gop_size is suprising, I

Re: [FFmpeg-devel] [PATCH] avcodec/mfenc: expose more properties of the media foundation encoder

2024-04-01 Thread Mark Thompson
On 28/03/2024 12:34, Mark Samuelson wrote: Thank you for the notes, here is a new patch that incorporates your suggestions. You are right, the default value of 12 for gop_size is suprising, I didn't know about it before now. --- libavcodec/mf_utils.h | 5 + libavcodec/mfenc.c| 33

Re: [FFmpeg-devel] [PATCH] avcodec/hevc_ps: fix the problem of memcmp losing effectiveness

2024-03-29 Thread Mark Thompson
On 29/03/2024 15:58, Andreas Rheinhardt wrote: Mark Thompson: On 29/03/2024 14:00, Andreas Rheinhardt wrote: James Almer: On 3/29/2024 10:10 AM, Mark Thompson wrote: On 28/03/2024 13:15, tong1.wu-at-intel@ffmpeg.org wrote: From: Tong Wu HEVCHdrParams* receives a pointer which points

Re: [FFmpeg-devel] [PATCH] avcodec/hevc_ps: fix the problem of memcmp losing effectiveness

2024-03-29 Thread Mark Thompson
On 29/03/2024 14:00, Andreas Rheinhardt wrote: James Almer: On 3/29/2024 10:10 AM, Mark Thompson wrote: On 28/03/2024 13:15, tong1.wu-at-intel@ffmpeg.org wrote: From: Tong Wu HEVCHdrParams* receives a pointer which points to a dynamically allocated memory block. It causes the memcmp

Re: [FFmpeg-devel] [PATCH] avcodec/hevc_ps: fix the problem of memcmp losing effectiveness

2024-03-29 Thread Mark Thompson
On 28/03/2024 13:15, tong1.wu-at-intel@ffmpeg.org wrote: From: Tong Wu HEVCHdrParams* receives a pointer which points to a dynamically allocated memory block. It causes the memcmp always returning 1. Add a function to do the comparision. A condition is also added to avoid malloc(0).

Re: [FFmpeg-devel] [PATCH] avcodec/mfenc: expose more properties of the media foundation encoder

2024-03-26 Thread Mark Thompson
On 26/03/2024 19:25, Mark Samuelson wrote: --- libavcodec/mf_utils.h | 5 + libavcodec/mfenc.c| 19 +++ 2 files changed, 24 insertions(+) This seems like a good idea. diff --git a/libavcodec/mf_utils.h b/libavcodec/mf_utils.h index aebfb9ad21..387c005f38 100644

Re: [FFmpeg-devel] [PATCH v3 2/2] lavc/get_buffer: Add a warning on failed allocation from a fixed pool

2024-03-25 Thread Mark Thompson
On 25/03/2024 07:35, Xiang, Haihao wrote: On Di, 2024-03-19 at 22:52 +, Mark Thompson wrote: On 19/03/2024 04:16, Xiang, Haihao wrote: On Ma, 2024-03-18 at 21:33 +, Mark Thompson wrote: On 18/03/2024 05:53, Xiang, Haihao wrote: On So, 2024-03-17 at 20:51 +, Mark Thompson wrote

Re: [FFmpeg-devel] [PATCH] [v4] avcodec/vaapi_encode: add customized surface alignment

2024-03-24 Thread Mark Thompson
On 21/03/2024 17:02, Araz Iusubov wrote: This commit fixes issues with AMD HEVC encoding. By default AMD hevc encoder asks for the alignment 64x16, while FFMPEG VAAPI has 16x16. Adding support for customized surface size from VASurfaceAttribAlignmentSize in VAAPI version 1.21.0 Signed-off-by:

Re: [FFmpeg-devel] [PATCH v3 2/2] lavc/vulkan_av1: port to the new stable API

2024-03-19 Thread Mark Thompson
On 18/03/2024 05:33, Lynne wrote: Mar 17, 2024, 16:36 by s...@jkqxz.net: On 13/03/2024 16:38, Lynne wrote: Tested by multiple users on multiple operating systems, driver implementations and test samples to work. Co-Authored-by: Dave Airlie From e2d31951f46fcc10e1263b8603e486e111e9578c

Re: [FFmpeg-devel] [PATCH v3 1/2] ffmpeg: set extra_hw_frames to account for frames held in queues

2024-03-19 Thread Mark Thompson
On 18/03/2024 05:35, Xiang, Haihao wrote: On So, 2024-03-17 at 20:49 +, Mark Thompson wrote: Since e0da916b8f5b079a4865eef7f64863f50785463d the ffmpeg utility has held multiple frames output by the decoder in internal queues without telling the decoder that it is going to do so.  When

Re: [FFmpeg-devel] [PATCH v3 2/2] lavc/get_buffer: Add a warning on failed allocation from a fixed pool

2024-03-19 Thread Mark Thompson
On 19/03/2024 04:16, Xiang, Haihao wrote: On Ma, 2024-03-18 at 21:33 +, Mark Thompson wrote: On 18/03/2024 05:53, Xiang, Haihao wrote: On So, 2024-03-17 at 20:51 +, Mark Thompson wrote: For hardware cases where we are forced to have a fixed pool of frames allocated up-front

Re: [FFmpeg-devel] [PATCH v3 2/2] lavc/get_buffer: Add a warning on failed allocation from a fixed pool

2024-03-18 Thread Mark Thompson
On 18/03/2024 05:53, Xiang, Haihao wrote: On So, 2024-03-17 at 20:51 +, Mark Thompson wrote: For hardware cases where we are forced to have a fixed pool of frames allocated up-front (such as array textures on decoder output), suggest a possible workaround to the user if an allocation fails

Re: [FFmpeg-devel] [PATCH v3 2/2] lavc/vaapi_encode_h265: Set general_*_constriaint flags with profile

2024-03-18 Thread Mark Thompson
On 18/03/2024 04:21, fei.w.wang-at-intel@ffmpeg.org wrote: From: Fei Wang According to Table A.2 in spec. Signed-off-by: Fei Wang --- libavcodec/vaapi_encode_h265.c | 176 +++-- 1 file changed, 123 insertions(+), 53 deletions(-) diff --git

Re: [FFmpeg-devel] [PATCH v3 1/2] lavc/vaapi_encode_h265: Map HEVC AV REXT profile to VA REXT profile

2024-03-18 Thread Mark Thompson
On 18/03/2024 04:21, fei.w.wang-at-intel@ffmpeg.org wrote: From: Fei Wang There is no Main8/10 profile defined in HEVC REXT profiles. Use Main12 which is compatible with 8/10bit. Signed-off-by: Fei Wang --- libavcodec/vaapi_encode_h265.c | 4 ++-- 1 file changed, 2 insertions(+), 2

[FFmpeg-devel] [PATCH v3 2/2] lavc/get_buffer: Add a warning on failed allocation from a fixed pool

2024-03-17 Thread Mark Thompson
For hardware cases where we are forced to have a fixed pool of frames allocated up-front (such as array textures on decoder output), suggest a possible workaround to the user if an allocation fails because the pool is exhausted. --- Perhaps helpful; any thoughts? The warning comes out before any

[FFmpeg-devel] [PATCH v3 1/2] ffmpeg: set extra_hw_frames to account for frames held in queues

2024-03-17 Thread Mark Thompson
Since e0da916b8f5b079a4865eef7f64863f50785463d the ffmpeg utility has held multiple frames output by the decoder in internal queues without telling the decoder that it is going to do so. When the decoder has a fixed-size pool of frames (common in some hardware APIs where the output frames must

Re: [FFmpeg-devel] [PATCH] libavcodec/amfenc: Update AMF encoder options

2024-03-17 Thread Mark Thompson
On 14/03/2024 10:51, Araz Iusubov wrote: The encoder options have been updated to the current version of the AMF. Signed-off-by: Araz Iusubov --- libavcodec/amfenc.c | 1 + libavcodec/amfenc.h | 4 + libavcodec/amfenc_av1.c | 154 +-

Re: [FFmpeg-devel] [PATCH v3 2/2] lavc/vulkan_av1: port to the new stable API

2024-03-17 Thread Mark Thompson
On 13/03/2024 16:38, Lynne wrote: Tested by multiple users on multiple operating systems, driver implementations and test samples to work. Co-Authored-by: Dave Airlie > From e2d31951f46fcc10e1263b8603e486e111e9578c Mon Sep 17 00:00:00 2001 > From: Lynne > Date: Fri, 19 Jan 2024 10:49:02

Re: [FFmpeg-devel] [PATCH v2 1/4] avcodec/aom_film_grain: add AOM film grain synthesis

2024-03-11 Thread Mark Thompson
On 08/03/2024 13:44, Niklas Haas wrote: On Fri, 08 Mar 2024 10:31:28 -0300 James Almer wrote: On 3/8/2024 10:21 AM, Niklas Haas wrote: From: Niklas Haas Implementation copied wholesale from dav1d, sans SIMD, under permissive license. This implementation was extensively verified to be

[FFmpeg-devel] [PATCH] lavfi/vaapi: Don't use fixed-size frame pools

2024-02-25 Thread Mark Thompson
Since e0da916b8f5b079a4865eef7f64863f50785463d the ffmpeg utility has held multiple frames output by the filter graph in internal queues without telling the filter which created the frames that it is going to do so. This broke many VAAPI filter->encode cases because a fixed-size frame pool is

Re: [FFmpeg-devel] [PATCH v2] lavc/vaapi_encode: Enable Macroblock based bitrate control

2024-02-25 Thread Mark Thompson
On 23/02/2024 07:14, fei.w.wang-at-intel@ffmpeg.org wrote: From: Fei Wang Signed-off-by: Fei Wang --- update: Print mbbrc status with "ON/OFF" instead of "0/1". doc/encoders.texi | 3 +++ libavcodec/vaapi_encode.c | 11 ++- libavcodec/vaapi_encode.h | 9 -

[FFmpeg-devel] [PATCH v2] ffmpeg: set extra_hw_frames to account for frames held in queues

2024-02-25 Thread Mark Thompson
/ffmpeg_sched.h | 12 3 files changed, 40 insertions(+), 1 deletion(-) On 25/02/2024 16:02, Marton Balint wrote: On Sun, 25 Feb 2024, Mark Thompson wrote: On 25/02/2024 15:01, Marton Balint wrote:  On Sun, 25 Feb 2024, Mark Thompson wrote:  Since

Re: [FFmpeg-devel] [PATCH] ffmpeg: set extra_hw_frames to account for frames held in queues

2024-02-25 Thread Mark Thompson
On 25/02/2024 15:01, Marton Balint wrote: On Sun, 25 Feb 2024, Mark Thompson wrote: Since e0da916b8f5b079a4865eef7f64863f50785463d the ffmpeg utility has held multiple frames output by the decoder in internal queues without telling the decoder that it is going to do so.  When the decoder has

[FFmpeg-devel] [PATCH] ffmpeg: set extra_hw_frames to account for frames held in queues

2024-02-25 Thread Mark Thompson
Since e0da916b8f5b079a4865eef7f64863f50785463d the ffmpeg utility has held multiple frames output by the decoder in internal queues without telling the decoder that it is going to do so. When the decoder has a fixed-size pool of frames (common in some hardware APIs where the output frames must

Re: [FFmpeg-devel] [PATCH 1/2] Add support d3d11va Intel Hevc Rext decoder.

2024-02-25 Thread Mark Thompson
On 25/02/2024 02:22, Водянников А.В. via ffmpeg-devel wrote: > From ed8fda62bbdbc62f7565891c935966c931d001ca Mon Sep 17 00:00:00 2001 > From: Aleksoid > Date: Thu, 22 Feb 2024 19:15:48 +1000 > Subject: [PATCH 1/2] Add support d3d11va Intel Hevc Rext decoder. > > Signed-off-by: Aleksoid > --- >

Re: [FFmpeg-devel] [PATCH] avcodec/cbs_h2645: Avoid function pointer casts, fix UB

2024-02-25 Thread Mark Thompson
On 25/02/2024 01:55, Andreas Rheinhardt wrote: The SEI message read/write functions are called via function pointers where the SEI message-specific context is passed as void*. But the actual function definitions use a pointer to their proper context in place of void*, making the calls undefined

Re: [FFmpeg-devel] [PATCH 2/3] avutil/opt: Use correct function pointer type

2024-02-24 Thread Mark Thompson
On 21/02/2024 23:32, Andreas Rheinhardt wrote: av_get_sample/pix_fmt() return their respective enums and are therefore not of the type int (*)(const char*), yet they are called as-if they were of this type. This works in practice, but is actually undefined behaviour. With Clang 17 UBSan these

Re: [FFmpeg-devel] [PATCH 3/3] avcodec/cbs_h2645: Avoid function pointer casts, fix UB

2024-02-24 Thread Mark Thompson
On 21/02/2024 23:32, Andreas Rheinhardt wrote: The SEI message read/write functions are called via function pointers where the SEI message-specific context is passed as void*. But the actual function definitions use a pointer to their proper context in place of void*, making the calls undefined

Re: [FFmpeg-devel] [PATCH] hwcontext_videotoolbox: add vt_device_derive

2024-02-22 Thread Mark Thompson
On 22/02/2024 19:39, ChenLiucheng via ffmpeg-devel wrote: On Feb 23, 2024, at 03:28, Mark Thompson wrote: On 22/02/2024 18:46, gnattu via ffmpeg-devel wrote: There is no device context to be setup, nor devices to be selected with VideoToolbox. Just a simple return would allow us to use

Re: [FFmpeg-devel] [PATCH] hwcontext_videotoolbox: add vt_device_derive

2024-02-22 Thread Mark Thompson
On 22/02/2024 18:46, gnattu via ffmpeg-devel wrote: There is no device context to be setup, nor devices to be selected with VideoToolbox. Just a simple return would allow us to use derived device in filters like `hwupload=derive_device=videotoolbox` Signed-off-by: Gnattu OC ---

Re: [FFmpeg-devel] [PATCH v5 4/9] avcodec/vaapi_encode: extract rc parameter configuration to base layer

2024-02-22 Thread Mark Thompson
On 22/02/2024 10:10, Wu, Tong1 wrote: On 18/02/2024 08:45, tong1.wu-at-intel@ffmpeg.org wrote: From: Tong Wu VAAPI and D3D12VA can share rate control configuration codes. Hence, it can be moved to base layer for simplification. Signed-off-by: Tong Wu --- libavcodec/hw_base_encode.c

Re: [FFmpeg-devel] [PATCH v5 8/9] avcodec: add D3D12VA hardware HEVC encoder

2024-02-18 Thread Mark Thompson
On 18/02/2024 08:45, tong1.wu-at-intel@ffmpeg.org wrote: From: Tong Wu This implementation is based on D3D12 Video Encoding Spec: https://microsoft.github.io/DirectX-Specs/d3d/D3D12VideoEncoding.html Sample command line for transcoding: ffmpeg.exe -hwaccel d3d12va -hwaccel_output_format

Re: [FFmpeg-devel] [PATCH v5 4/9] avcodec/vaapi_encode: extract rc parameter configuration to base layer

2024-02-18 Thread Mark Thompson
On 18/02/2024 08:45, tong1.wu-at-intel@ffmpeg.org wrote: From: Tong Wu VAAPI and D3D12VA can share rate control configuration codes. Hence, it can be moved to base layer for simplification. Signed-off-by: Tong Wu --- libavcodec/hw_base_encode.c| 151

Re: [FFmpeg-devel] [PATCH v5 2/9] avcodec/vaapi_encode: introduce a base layer for vaapi encode

2024-02-18 Thread Mark Thompson
On 18/02/2024 08:45, tong1.wu-at-intel@ffmpeg.org wrote: From: Tong Wu Since VAAPI and future D3D12VA implementation may share the same dpb logic and some other functions. A base layer encode context is introduced as vaapi context's base and extract the related funtions to a common file

Re: [FFmpeg-devel] [PATCH 2/9] libavcodec: add amfdec.

2024-02-14 Thread Mark Thompson
On 14/02/2024 01:55, Dmitrii Ovchinnikov wrote: From: Evgeny Pavlov Added AMF based h264, hevc, av1 decoders. Co-authored-by: Dmitrii Ovchinnikov --- libavcodec/Makefile | 4 +- libavcodec/allcodecs.c | 3 + libavcodec/amfdec.c | 667

Re: [FFmpeg-devel] [PATCH 1/7] avcodec: move ffjni to avutil/jniutils

2024-02-14 Thread Mark Thompson
On 13/02/2024 22:50, Matthieu Bouron wrote: This will allow to use the jni utils in libavformat. This will be mostly useful to add Android content-uri support. This deprecates avcodec/jni.h functions in favor of the ones from avutil/jni.h. --- doc/APIchanges | 6

Re: [FFmpeg-devel] [PATCH 1/9] libavutil: add hwcontext_amf.

2024-02-14 Thread Mark Thompson
On 14/02/2024 01:55, Dmitrii Ovchinnikov wrote: Adds hwcontext_amf, which allows to use shared AMF context for the encoder, decoder and AMF-based filters, without copy to the host memory. It will also allow you to use some optimizations in the interaction of components (for example, SAV) and

Re: [FFmpeg-devel] [PATCH 01/23] avutil/hwcontext_opencl: Use proper OpenCLFramesContext

2024-02-12 Thread Mark Thompson
On 12/02/2024 00:01, Andreas Rheinhardt wrote: The currently used pointer when unmapping DXVA2 and D3D11 actually points to an OpenCLDeviceContext. Signed-off-by: Andreas Rheinhardt --- 1. I'd appreciate testing of this. DXVA2 mapping tested and working on AMD. D3D11 mapping doesn't work on

Re: [FFmpeg-devel] [PATCH v3 2/2] lavc/vulkan_av1: port to the new stable API

2024-02-11 Thread Mark Thompson
On 10/02/2024 22:39, Lynne wrote: Most of this patch was written by Dave Airlie , with some additions by me. > From be1b73147c92a8f74e5cdf30e5325382a6f77799 Mon Sep 17 00:00:00 2001 > From: Lynne > Date: Fri, 19 Jan 2024 10:49:02 +1000 > Subject: [PATCH v3 2/2] lavc/vulkan_av1: port to the

  1   2   3   4   5   6   7   8   9   10   >