Re: [FFmpeg-devel] [PATCH v2] avcodec/cbs_h265: add support for Alpha Channel Info SEI messages

2019-07-20 Thread Mark Thompson
On 09/07/2019 22:27, James Almer wrote: > As defined in sections F.14.2.8 and F.14.3.8 > > Signed-off-by: James Almer > --- > libavcodec/cbs_h2645.c| 1 + > libavcodec/cbs_h265.h | 12 +++ > libavcodec/cbs_h265_syntax_template.c | 29

Re: [FFmpeg-devel] [PATCH] cbs_h2645: Fix infinite loop in more_rbsp_data

2019-07-20 Thread Mark Thompson
On 05/06/2019 03:18, Andreas Rheinhardt wrote: > cbs_h2645_read_more_rbsp_data does not handle malformed input very well: > 1. If there were <= 8 bits left in the bitreader, these bits were read > via show_bits. But show_bits requires the number of bits to be read to > be > 0 (internally it shifts

Re: [FFmpeg-devel] [PATCH 2/3] lavfi: modify avfilter_get_matrix to support separate scale factors

2019-07-20 Thread Mark Thompson
On 20/07/2019 00:19, Jarek Samic wrote: > --- > libavfilter/transform.c | 13 ++--- > libavfilter/transform.h | 30 +++--- > libavfilter/vf_deshake.c | 7 +-- > 3 files changed, 34 insertions(+), 16 deletions(-) > > diff --git a/libavfilter/transform.c

Re: [FFmpeg-devel] [PATCH] configure, cbs_h2645: Remove unneeded golomb dependency

2019-07-08 Thread Mark Thompson
On 08/07/2019 17:38, Andreas Rheinhardt wrote: > This has been forgotten in 44cde38c. > > Signed-off-by: Andreas Rheinhardt > --- > configure | 4 ++-- > libavcodec/cbs_h2645.c | 1 - > 2 files changed, 2 insertions(+), 3 deletions(-) > > diff --git a/configure b/configure > index

Re: [FFmpeg-devel] [PATCH 12/12] cbs_h264, h264_metadata: Deleting SEI messages never fails

2019-07-08 Thread Mark Thompson
On 08/07/2019 00:14, Andreas Rheinhardt wrote: > ff_cbs_delete_unit never fails if the index of the unit to delete is > valid, as it is with all current callers of the function. So just assert > in ff_cbs_delete_unit that the index is valid and change the return > value to void in order to remove

Re: [FFmpeg-devel] [PATCH 19/31] vp9_metadata: Avoid allocations and copies of packet structures

2019-07-07 Thread Mark Thompson
On 20/06/2019 00:45, Andreas Rheinhardt wrote: > This commit changes vp9_metadata to (a) use ff_bsf_get_packet_ref > instead of ff_bsf_get_packet (thereby avoiding one malloc and free per > filtered packet) and (b) to use only one packet structure at all, > thereby avoiding a call to

Re: [FFmpeg-devel] [PATCH 11/31] cbs: Remove superfluous checks for ff_cbs_delete_unit

2019-07-07 Thread Mark Thompson
On 20/06/2019 00:45, Andreas Rheinhardt wrote: > ff_cbs_delete_unit never fails if the index of the unit to delete is > valid; document this behaviour explicitly and remove the checks for > whether ff_cbs_delete_unit failed, because all the callers of > ff_cbs_delete_unit already made sure the

Re: [FFmpeg-devel] [PATCH 00/18] cbs: Use ff_bsf_get_packet_ref etc.

2019-07-07 Thread Mark Thompson
On 17/06/2019 04:42, Andreas Rheinhardt wrote: > Hello, > > this patchset is mainly about switching the bitstream filters using cbs > from ff_bsf_get_packet to ff_bsf_get_packet_ref (except trace_headers, > which also uses it). But in the course of doing so, I also found several > other (usually

[FFmpeg-devel] [PATCH v4 2/2] lavfi: addroi filter

2019-07-07 Thread Mark Thompson
This can be used to add region of interest side data to video frames. --- doc/filters.texi | 73 +++ libavfilter/Makefile | 1 + libavfilter/allfilters.c | 1 + libavfilter/vf_addroi.c | 269 +++ 4 files changed, 344 insertions(+)

[FFmpeg-devel] [PATCH v4 1/2] vaapi_encode: Add ROI support

2019-07-07 Thread Mark Thompson
--- libavcodec/vaapi_encode.c | 118 libavcodec/vaapi_encode.h | 18 + libavcodec/vaapi_encode_h264.c | 2 + libavcodec/vaapi_encode_h265.c | 2 + libavcodec/vaapi_encode_mpeg2.c | 2 + libavcodec/vaapi_encode_vp8.c | 2 +

Re: [FFmpeg-devel] [PATCH v3 3/5] libx265: Update ROI behaviour to match documentation

2019-07-07 Thread Mark Thompson
ct: Re: [FFmpeg-devel] [PATCH v3 3/5] libx265: Update ROI behaviour to >> match documentation >> >> >> >>> -Original Message- >>> From: ffmpeg-devel [mailto:ffmpeg-devel-boun...@ffmpeg.org] On Behalf Of >>> Mark Thompson >>> Sent: Tuesda

Re: [FFmpeg-devel] [PATCH v4 1/5] lavc/h265_profile_level: Fix DPB size calculation

2019-07-07 Thread Mark Thompson
On 20/06/2019 17:10, James Almer wrote: > On 6/2/2019 1:48 PM, Mark Thompson wrote: >> On 06/05/2019 22:02, Mark Thompson wrote: >>> The maxDpbPicBuf value which is used in the DPB size calculation depends >>> on the profile (it's usually 6, but 7 f

Re: [FFmpeg-devel] [PATCH] AMF: Vulkan initialization support for encoder.

2019-07-07 Thread Mark Thompson
On 19/06/2019 16:03, OvchinnikovDmitrii wrote: > Added linux support for amf encoder through vulkan. > > To use h.264(AMD VCE) encoder on linux amdgru-pro version 19.20+ and > amf-amdgpu-pro package(amdgru-pro contains, but does not install > automatically) are required. > > Initialization of

Re: [FFmpeg-devel] [PATCH v3] avfilter/vaapi: add overlay_vaapi filter

2019-07-07 Thread Mark Thompson
On 20/06/2019 08:42, Zachary Zhou wrote: > --- > configure | 1 + > libavfilter/Makefile | 1 + > libavfilter/allfilters.c | 1 + > libavfilter/vaapi_vpp.c| 95 + > libavfilter/vaapi_vpp.h| 5 + > libavfilter/vf_overlay_vaapi.c

Re: [FFmpeg-devel] [PATCH 2/5] lavu/hwcontext_vaapi: add vaapi_format_map for Y210/AYUV/Y410

2019-07-07 Thread Mark Thompson
On 28/06/2019 03:27, Linjie Fu wrote: > Signed-off-by: Linjie Fu > --- > libavutil/hwcontext_vaapi.c | 8 > 1 file changed, 8 insertions(+) > > diff --git a/libavutil/hwcontext_vaapi.c b/libavutil/hwcontext_vaapi.c > index 4227c3c..6378d0e 100644 > --- a/libavutil/hwcontext_vaapi.c >

Re: [FFmpeg-devel] [PATCH]lavc/frame_thread_encoder: Do not memcpy() from NULL

2019-07-07 Thread Mark Thompson
On 02/07/2019 10:44, Carl Eugen Hoyos wrote: > Am Di., 2. Juli 2019 um 08:31 Uhr schrieb Reimar Döffinger > : >> >> On 01.07.2019, at 00:51, Carl Eugen Hoyos wrote: > >>> I believe attached patch fixes undefined behaviour and ticket #7981. >> >> Same here, I think it makes more sense to check

Re: [FFmpeg-devel] [PATCH 2/2] lavc/vaapi_decode: recreate hw_frames_ctx without destroy va_context

2019-07-07 Thread Mark Thompson
On 07/07/2019 17:38, Linjie Fu wrote: > VP9 allows resolution changes per frame. Currently in VAAPI, resolution > changes leads to va context destroy and reinit. Which is correct - it needs to remake the context because the old one is for the wrong resolution. >

Re: [FFmpeg-devel] [PATCH, v2] lavc/vaapi_encode: add support for AVC Trellis

2019-06-12 Thread Mark Thompson
On 12/06/2019 16:28, Linjie Fu wrote: > Add support for VAAPI AVC Trellis Quantization with limitation: > - VA-API version >= (1, 0, 0) > > Use option "-trellis off/I/P/B" to disable or enable Trellis > quantization for I/P/B frames. > > Signed-off-by: Linjie Fu > --- > [v2]: Since

Re: [FFmpeg-devel] [PATCH v4] vaapi_encode_mjpeg: fix bad component id bug

2019-06-12 Thread Mark Thompson
On 07/06/2019 22:45, U. Artie Eoff wrote: > The compound literals assigned to "components" > only exist within the scope of the if/else > block (thanks Mark Thompson for the better > explanation). > > Thus, after this if/else block, "components" > e

Re: [FFmpeg-devel] [PATCH] avcodec/omx: Correct av_log() log message

2019-06-12 Thread Mark Thompson
On 12/06/2019 13:16, Alejandro Solozabal wrote: > Print the right library name, which is trying to open, on the log message. > > Signed-off-by: Alejandro Solozabal > --- > libavcodec/omx.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/libavcodec/omx.c

Re: [FFmpeg-devel] [PATCH] vaapi_encode_mjpeg: WA: fix bad component id bug

2019-06-07 Thread Mark Thompson
On 07/06/2019 21:28, U. Artie Eoff wrote: > When compile time optimizations are enabled and > compiling with GNU GCC 9.x, the pointer assignment > to the inline brace-enclosed list initialized > array does not work and "component" ends up pointing > to an empty array. This is probably a bug in

Re: [FFmpeg-devel] [PATCH] cbs_h264: Fix types of abs_diff_pic_num_minus1 and

2019-06-07 Thread Mark Thompson
On 07/06/2019 02:17, Andreas Rheinhardt wrote: > difference_of_pic_nums_minus1 > > They are unsigned values. > > Signed-off-by: Andreas Rheinhardt > --- > Sorry for sending the first email prematurely. > libavcodec/cbs_h264.h | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > >

Re: [FFmpeg-devel] [PATCH] cbs_av1, cbs_jpeg, cbs_mpeg2, cbs_vp9: Fix undef

2019-06-07 Thread Mark Thompson
On 07/06/2019 01:27, Andreas Rheinhardt wrote: > READ has already been undefined at this point; it is obviously intended > to undef WRITE. > Furthermore, leb128 (in cbs_av1) was undefined too often and > inconsistently. > > Signed-off-by: Andreas Rheinhardt > --- > libavcodec/cbs_av1.c | 5

[FFmpeg-devel] [PATCH v3 2/5] libx264: Update ROI behaviour to match documentation

2019-06-03 Thread Mark Thompson
Fix the quantisation offset - use the whole range, and don't change the offset size based on bit depth. Iterate the list in reverse order. The first region in the list is the one that applies in the case of overlapping regions. --- libavcodec/libx264.c | 53

[FFmpeg-devel] [PATCH v3 3/5] libx265: Update ROI behaviour to match documentation

2019-06-03 Thread Mark Thompson
Equivalent to the previous patch for libx264. --- libavcodec/libx265.c | 44 +++- 1 file changed, 23 insertions(+), 21 deletions(-) diff --git a/libavcodec/libx265.c b/libavcodec/libx265.c index f56def53d5..665b780643 100644 --- a/libavcodec/libx265.c +++

[FFmpeg-devel] [PATCH v3 1/5] lavu/frame: Improve ROI documentation

2019-06-03 Thread Mark Thompson
Clarify and add examples for the behaviour of the quantisation offset, and define how multiple ranges should be handled. --- libavutil/frame.h | 59 ++- 1 file changed, 43 insertions(+), 16 deletions(-) diff --git a/libavutil/frame.h

[FFmpeg-devel] [PATCH v3 5/5] lavfi: addroi filter

2019-06-03 Thread Mark Thompson
This can be used to add region of interest side data to video frames. --- doc/filters.texi | 44 +++ libavfilter/Makefile | 1 + libavfilter/allfilters.c | 1 + libavfilter/vf_addroi.c | 268 +++ 4 files changed, 314 insertions(+) create

[FFmpeg-devel] [PATCH v3 4/5] vaapi_encode: Add ROI support

2019-06-03 Thread Mark Thompson
--- For example: $ ./ffmpeg_g -hwaccel vaapi -hwaccel_device /dev/dri/renderD128 -hwaccel_output_format vaapi -i in.mp4 -an -vf 'scale_vaapi=96:96,addroi=iw/3:ih/3:iw/3:ih/3:-1/2' -c:v h264_vaapi -rc_mode CQP -global_quality 44 -frames:v 1 test.264 ... $ ldecod.exe ... $ cat trace_dec.txt |

Re: [FFmpeg-devel] [PATCH] vaapi_encode: Refactor encode misc parameter buffer creation

2019-06-03 Thread Mark Thompson
On 09/05/2019 03:46, Fu, Linjie wrote: >> -Original Message- >> From: ffmpeg-devel [mailto:ffmpeg-devel-boun...@ffmpeg.org] On Behalf >> Of Mark Thompson >> Sent: Monday, May 6, 2019 23:21 >> To: FFmpeg development discussions and patches > de...@ffmp

Re: [FFmpeg-devel] [PATCH 5/7] hwcontext_vaapi: Add option to set driver name

2019-06-02 Thread Mark Thompson
On 21/05/2019 06:18, Li, Zhong wrote: >> From: ffmpeg-devel [mailto:ffmpeg-devel-boun...@ffmpeg.org] On Behalf >> Of Mark Thompson >> Sent: Monday, May 6, 2019 10:49 PM >> To: ffmpeg-devel@ffmpeg.org >> Subject: [FFmpeg-devel] [PATCH 5/7] hwcontext_vaapi: Ad

[FFmpeg-devel] [PATCH] doc/ffmpeg: Document VAAPI device creation options

2019-06-02 Thread Mark Thompson
--- doc/ffmpeg.texi | 28 ++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/doc/ffmpeg.texi b/doc/ffmpeg.texi index cd35eb49c8..ccd490d1a7 100644 --- a/doc/ffmpeg.texi +++ b/doc/ffmpeg.texi @@ -950,8 +950,32 @@ device type: @item vaapi @var{device} is

Re: [FFmpeg-devel] [PATCH 10/11] cbs_mpeg2: Fix parsing of picture headers

2019-06-02 Thread Mark Thompson
On 29/05/2019 05:54, Andreas Rheinhardt wrote: > Mark Thompson: >> On 22/05/2019 02:04, Andreas Rheinhardt wrote: >>> MPEG-2 picture and slice headers can contain optional extra information; >>> both use the same syntax for their extra information. And cbs_mpeg2's >&

Re: [FFmpeg-devel] [PATCH 03/11] mpeg2_metadata, cbs_mpeg2: Fix handling of colour_description

2019-06-02 Thread Mark Thompson
On 29/05/2019 05:12, Andreas Rheinhardt wrote: > Mark Thompson: >> On 22/05/2019 02:04, Andreas Rheinhardt wrote: >>> If a sequence display extension is read with colour_description equal to >>> zero, but a user wants to add one or more of the colo

Re: [FFmpeg-devel] [PATCH v4 1/5] lavc/h265_profile_level: Fix DPB size calculation

2019-06-02 Thread Mark Thompson
On 06/05/2019 22:02, Mark Thompson wrote: > The maxDpbPicBuf value which is used in the DPB size calculation depends > on the profile (it's usually 6, but 7 for screen-extended profiles). > --- > libavcodec/h265_profile_level.c | 86 - &

Re: [FFmpeg-devel] [PATCH v4 1/7] vf_crop: Add support for cropping hardware frames

2019-06-02 Thread Mark Thompson
On 15/04/2019 04:35, Song, Ruiling wrote: >> -Original Message- >> From: ffmpeg-devel [mailto:ffmpeg-devel-boun...@ffmpeg.org] On Behalf Of >> Mark Thompson >> Sent: Wednesday, April 10, 2019 6:07 AM >> To: ffmpeg-devel@ffmpeg.org >> Subject: [FFmpe

Re: [FFmpeg-devel] [PATCH] avcodec/cbs_h264: add support for Alternative Transfer Characteristics SEI message

2019-06-02 Thread Mark Thompson
On 26/05/2019 19:40, James Almer wrote: > Signed-off-by: James Almer > --- > libavcodec/cbs_h264.h | 6 ++ > libavcodec/cbs_h2645.c| 1 + > libavcodec/cbs_h264_syntax_template.c | 17 + > 3 files changed, 24 insertions(+) > > diff --git

Re: [FFmpeg-devel] [PATCH] libavcodec/vp9: Fix VP9 dynamic resolution changing decoding on VAAPI.

2019-05-29 Thread Mark Thompson
On 28/05/2019 08:46, Yan Wang wrote: > > On 5/28/2019 3:16 PM, Hendrik Leppkes wrote: >> On Tue, May 28, 2019 at 8:57 AM Yan Wang wrote: >>> When the format change, the VAAPI context cannot be destroyed. >>> Otherwise, the reference frame surface will lost. >>> >>> Signed-off-by: Yan Wang >>>

Re: [FFmpeg-devel] [PATCH] lavc/vaapi_encode: grow packet if vaMapBuffer returns multiple buffers

2019-05-29 Thread Mark Thompson
On 29/05/2019 21:57, Linjie Fu wrote: > It seems that VA_CODED_BUF_STATUS_SINGLE_NALU allows driver to map > buffer for each slice. > > Currently, assigning new buffer for pkt when multiple buffer returns > from vaMapBuffer will cover the previous encoded pkt data and lead > to encode issues. >

Re: [FFmpeg-devel] [PATCH 00/11 v3] cbs (mostly MPEG-2) patches

2019-05-28 Thread Mark Thompson
On 22/05/2019 02:04, Andreas Rheinhardt wrote: > > Andreas Rheinhardt (10): > cbs_mpeg2: Correct and use enum values > cbs_mpeg2: Improve checks for invalid values > cbs_mpeg2: Fix storage type for frame_centre_*_offset > cbs_mpeg2: Correct error codes > > James Almer (1): >

Re: [FFmpeg-devel] [PATCH 10/11] cbs_mpeg2: Fix parsing of picture headers

2019-05-28 Thread Mark Thompson
On 22/05/2019 02:04, Andreas Rheinhardt wrote: > MPEG-2 picture and slice headers can contain optional extra information; > both use the same syntax for their extra information. And cbs_mpeg2's > implementations of both were buggy until recently; the one for the > picture headers still is and this

Re: [FFmpeg-devel] [PATCH 07/11] cbs: Remove useless initializations

2019-05-28 Thread Mark Thompson
On 22/05/2019 02:04, Andreas Rheinhardt wrote: > Up until now, a temporary variable was used and initialized every time a > value was read in CBS; if reading turned out to be successfull, this > value was overwritten (without having ever been looked at) with the > value read if reading was

Re: [FFmpeg-devel] [PATCH 03/11] mpeg2_metadata, cbs_mpeg2: Fix handling of colour_description

2019-05-28 Thread Mark Thompson
On 22/05/2019 02:04, Andreas Rheinhardt wrote: > If a sequence display extension is read with colour_description equal to > zero, but a user wants to add one or more of the colour_description > elements, then the colour_description elements the user did not explicitly > request to be set are set

Re: [FFmpeg-devel] [PATCH 06/11] cbs, cbs_mpeg2, cbs_jpeg: Don't av_freep local variables

2019-05-28 Thread Mark Thompson
On 22/05/2019 02:04, Andreas Rheinhardt wrote: > There is no danger of leaving dangling pointers behind, as the lifespan > of local variables (including pointers passed (by value) as function > arguments) ends anyway as soon as we exit their scope. > > Signed-off-by: Andreas Rheinhardt > --- >

Re: [FFmpeg-devel] [PATCH] lavc/vp9_superframe_bsf: avoid error messages in one line

2019-05-20 Thread Mark Thompson
On 16/05/2019 16:04, Fu Linjie wrote: > Add "\n" to avoid continuous error messages in one line. > > Signed-off-by: Fu Linjie > --- > libavcodec/vp9_superframe_bsf.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/libavcodec/vp9_superframe_bsf.c

[FFmpeg-devel] [PATCH v2 08/11] h264_redundant_pps: Make it reference-compatible

2019-05-20 Thread Mark Thompson
From: Andreas Rheinhardt Since c6a63e11092c975b89d824f08682fe31948d3686, the parameter sets modified as content of PPS units were references shared with the CodedBitstreamH264Context, so modifying them alters the parsing process of future access units which meant that frames often got discarded

[FFmpeg-devel] [PATCH v2 03/11] cbs: Describe allocate/free methods in tabular form

2019-05-20 Thread Mark Thompson
Unit types are split into three categories, depending on how their content is managed: * POD structure - these require no special treatment. * Structure containing references to refcounted buffers - these can use a common free function when the offsets of all the internal references are known.

[FFmpeg-devel] [PATCH v2 05/11] cbs_h264: Use table-based alloc/free

2019-05-20 Thread Mark Thompson
--- libavcodec/cbs_h2645.c | 156 + 1 file changed, 64 insertions(+), 92 deletions(-) diff --git a/libavcodec/cbs_h2645.c b/libavcodec/cbs_h2645.c index 319202fc48..e10bb2c62b 100644 --- a/libavcodec/cbs_h2645.c +++ b/libavcodec/cbs_h2645.c @@ -442,51

[FFmpeg-devel] [PATCH v2 11/11] cbs_av1: Use table-based alloc/free

2019-05-20 Thread Mark Thompson
--- libavcodec/cbs_av1.c | 85 1 file changed, 39 insertions(+), 46 deletions(-) diff --git a/libavcodec/cbs_av1.c b/libavcodec/cbs_av1.c index eb2d03ef43..c497ddc352 100644 --- a/libavcodec/cbs_av1.c +++ b/libavcodec/cbs_av1.c @@ -811,50 +811,6 @@

[FFmpeg-devel] [PATCH v2 06/11] cbs: Add support functions for handling unit content references

2019-05-20 Thread Mark Thompson
Use the unit type table to determine what we need to do to clone the internals of the unit content when making copies for refcounting or writeability. (This will still fail for units with complex content if they do not have a defined clone function.) Setup and naming from a patch by Andreas

[FFmpeg-devel] [PATCH v2 02/11] cbs: Ensure that reference fields always follow the associated pointer

2019-05-20 Thread Mark Thompson
Hvaing these together allows us to find both pointers given the address of only one of them. --- libavcodec/cbs_av1.h | 6 +++--- libavcodec/cbs_h264.h | 18 +- libavcodec/cbs_h265.h | 16 libavcodec/cbs_jpeg.h | 2 +- libavcodec/cbs_mpeg2.h | 10 +-

[FFmpeg-devel] [PATCH v2 07/11] cbs_h2645: Ensure that non-refcounted parameter sets are fully copied

2019-05-20 Thread Mark Thompson
Only copying the main structure is not necessarily sufficient - there could be references to substructures. --- libavcodec/cbs_h2645.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/libavcodec/cbs_h2645.c b/libavcodec/cbs_h2645.c index e10bb2c62b..0b0996829c 100644

[FFmpeg-devel] [PATCH v2 09/11] cbs_h265: Use table-based alloc/free

2019-05-20 Thread Mark Thompson
--- libavcodec/cbs_h2645.c | 186 ++--- 1 file changed, 83 insertions(+), 103 deletions(-) diff --git a/libavcodec/cbs_h2645.c b/libavcodec/cbs_h2645.c index 0b0996829c..9d19577980 100644 --- a/libavcodec/cbs_h2645.c +++ b/libavcodec/cbs_h2645.c @@ -442,70

[FFmpeg-devel] [PATCH v2 04/11] cbs: Add macros to support defining unit type tables

2019-05-20 Thread Mark Thompson
--- libavcodec/cbs_internal.h | 21 + 1 file changed, 21 insertions(+) diff --git a/libavcodec/cbs_internal.h b/libavcodec/cbs_internal.h index 06a8f9b979..439fa7934b 100644 --- a/libavcodec/cbs_internal.h +++ b/libavcodec/cbs_internal.h @@ -140,6 +140,27 @@ int

[FFmpeg-devel] [PATCH v2 01/11] cbs: Mention all codecs in unit type comment

2019-05-20 Thread Mark Thompson
--- libavcodec/cbs.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavcodec/cbs.h b/libavcodec/cbs.h index 967dcd1468..e8b2d41ecb 100644 --- a/libavcodec/cbs.h +++ b/libavcodec/cbs.h @@ -49,6 +49,8 @@ struct CodedBitstreamType; * H.265 / HEVC: nal_unit_type * MPEG-2: start code

[FFmpeg-devel] [PATCH v2 10/11] cbs_vp9: Use table-based alloc/free

2019-05-20 Thread Mark Thompson
--- libavcodec/cbs_vp9.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/libavcodec/cbs_vp9.c b/libavcodec/cbs_vp9.c index 0b5f137ed8..71c1b38032 100644 --- a/libavcodec/cbs_vp9.c +++ b/libavcodec/cbs_vp9.c @@ -474,13 +474,6 @@ static int

Re: [FFmpeg-devel] [PATCH 0/4] Add AVDRMFrameDescriptor.format field

2019-05-20 Thread Mark Thompson
On 20/05/2019 23:33, Mark Thompson wrote: > On 12/05/2019 20:00, Jonas Karlman wrote: >> From what I understand support for composed layers wont be added to AMD as >> it technically are multiple objects. I am not even sure if AMD have support >> for NV12 as a drm plane for

Re: [FFmpeg-devel] [PATCH 0/4] Add AVDRMFrameDescriptor.format field

2019-05-20 Thread Mark Thompson
On 12/05/2019 20:00, Jonas Karlman wrote: > On 2019-05-12 19:28, Mark Thompson wrote: >> On 09/05/2019 20:38, Jonas Karlman wrote: >>> Hello, >>> >>> When a multi-layer AVDRMFrameDescriptor is used to describe a frame the >>> overall >>> f

Re: [FFmpeg-devel] [PATCH V3] lavfi/opencl: add nlmeans_opencl filter

2019-05-20 Thread Mark Thompson
On 20/05/2019 02:18, Song, Ruiling wrote: >> -Original Message- >> From: Song, Ruiling >> Sent: Monday, May 13, 2019 10:18 AM >> To: FFmpeg development discussions and patches > de...@ffmpeg.org>; 'Mark Thompson' >> Subject: RE: [FFmpeg-devel] [PATCH

Re: [FFmpeg-devel] [PATCH 1/4] hwcontext_drm: Add AVDRMFrameDescriptor.format field

2019-05-12 Thread Mark Thompson
On 09/05/2019 20:40, Jonas Karlman wrote: > A AVDRMFrameDescriptor for a NV12 frame may be described in > a single layer descriptor with multiple planes, > > (AVDRMFrameDescriptor) { > .nb_layers = 1, > .layers[0] = { > .format = DRM_FORMAT_NV12, > .nb_planes

Re: [FFmpeg-devel] [PATCH 0/4] Add AVDRMFrameDescriptor.format field

2019-05-12 Thread Mark Thompson
On 09/05/2019 20:38, Jonas Karlman wrote: > Hello, > > When a multi-layer AVDRMFrameDescriptor is used to describe a frame the > overall > frame format is missing and applications need to deduce the frame DRM_FORMAT_* > based on sw_format or the layers format. > > This patchset adds a

Re: [FFmpeg-devel] [PATCH] "assert(a && b)" --> "assert(a); assert(b)" for more precise diagnostics, except for libformat

2019-05-12 Thread Mark Thompson
On 12/05/2019 16:24, Adam Richter wrote: > This patch separates statements of the form "assert(a && b);" into > "assert(a);" and "assert(b);", typically involving an assertion > function like av_assert0. > > This patch covers all of ffmpeg, except for the libavformat, which I > have already

Re: [FFmpeg-devel] [PATCH] avformat/mxfenc: support XAVC long gop

2019-05-12 Thread Mark Thompson
On 12/05/2019 14:47, Tomas Härdin wrote: > fre 2019-05-10 klockan 08:50 -0700 skrev Baptiste Coudurier: >> ... >> +skip_bits(, 2); // reserved_zero_2bits >> +sps->level_idc = get_bits(, 8); >> +sps->id = get_ue_golomb(); >> + >> +if (sps->profile_idc == 100 || sps->profile_idc ==

[FFmpeg-devel] [PATCH v4 5/5] lavc/h265_profile_level: Add new profiles

2019-05-06 Thread Mark Thompson
Monochrome 10 and Main 10 Still Picture profiles are added by the 2018 version of the standard. --- libavcodec/h265_profile_level.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libavcodec/h265_profile_level.c b/libavcodec/h265_profile_level.c index

[FFmpeg-devel] [PATCH v4 2/5] lavc/h265_profile_level: Do not allow high tier at level < 4

2019-05-06 Thread Mark Thompson
--- libavcodec/h265_profile_level.c | 18 -- 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/libavcodec/h265_profile_level.c b/libavcodec/h265_profile_level.c index 692252bb4d..126f8dbc2a 100644 --- a/libavcodec/h265_profile_level.c +++

[FFmpeg-devel] [PATCH v4 1/5] lavc/h265_profile_level: Fix DPB size calculation

2019-05-06 Thread Mark Thompson
The maxDpbPicBuf value which is used in the DPB size calculation depends on the profile (it's usually 6, but 7 for screen-extended profiles). --- libavcodec/h265_profile_level.c | 86 - libavcodec/h265_profile_level.h | 1 + 2 files changed, 44 insertions(+), 43

[FFmpeg-devel] [PATCH v4 3/5] h265_metadata: Add option to set the level of the stream

2019-05-06 Thread Mark Thompson
To match the same option in h264_metadata. --- doc/bitstream_filters.texi | 9 +++ libavcodec/Makefile| 2 +- libavcodec/h265_metadata_bsf.c | 136 + 3 files changed, 146 insertions(+), 1 deletion(-) diff --git a/doc/bitstream_filters.texi

[FFmpeg-devel] [PATCH v4 4/5] lavc/h265_profile_level: Add unit test

2019-05-06 Thread Mark Thompson
Operates in the same way as the h264-levels test. --- libavcodec/Makefile| 1 + libavcodec/tests/h265_levels.c | 297 + tests/fate/libavcodec.mak | 5 + 3 files changed, 303 insertions(+) create mode 100644 libavcodec/tests/h265_levels.c diff

[FFmpeg-devel] [PATCH] vaapi_encode: Refactor encode misc parameter buffer creation

2019-05-06 Thread Mark Thompson
This removes the use of the nonstandard combined structures, which generated some warnings with clang and will cause alignment problems with some parameter buffer types. --- On 27/03/2019 14:18, Carl Eugen Hoyos wrote: > Attached patch fixes many warnings when compiling vaapi with clang. > Also

Re: [FFmpeg-devel] [PATCH v3 2/4] cbs_mpeg2: Improve checks for invalid values

2019-05-06 Thread Mark Thompson
On 28/04/2019 23:15, Andreas Rheinhardt wrote: > Mark Thompson: >> On 23/04/2019 23:55, Andreas Rheinhardt wrote: >>> horizontal/vertical_size_value (containing the twelve least significant >>> bits of the frame size) mustn't be zero according to the specific

[FFmpeg-devel] [PATCH 6/7] hwcontext_vaapi: Try to create devices via DRM before X11

2019-05-06 Thread Mark Thompson
Opening the device via X11 (DRI2/DRI3) rather than opening a DRM render node directly is only useful if you intend to use the legacy X11 interop functions. That's never true for the ffmpeg utility, and a library user who does want this will likely provide their own display instance rather than

[FFmpeg-devel] [PATCH 5/7] hwcontext_vaapi: Add option to set driver name

2019-05-06 Thread Mark Thompson
For example: -init_hw_device vaapi:/dev/dri/renderD128,driver=foo This may be more convenient that using the environment variable, and allows loading different drivers for different devices in the same process. --- libavutil/hwcontext_vaapi.c | 19 +++ 1 file changed, 19

[FFmpeg-devel] [PATCH 2/7] ffmpeg_hw: Treat empty device string as no device setting

2019-05-06 Thread Mark Thompson
The implementation will use some default in this case. The empty string is not a meaningful device for any existing hardware type, and indeed OpenCL treats it identically to no device already to work around the lack of this setting on the command line. --- fftools/ffmpeg_hw.c | 13 -

[FFmpeg-devel] [PATCH 4/7] hwcontext_vaapi: Make default DRM device selection more helpful

2019-05-06 Thread Mark Thompson
Iterate over available render devices and pick the first one which looks usable. Adds an option to specify the name of the kernel driver associated with the desired device, so that it is possible to select a specific type of device in a multiple-device system without knowing the card numbering.

[FFmpeg-devel] [PATCH 3/7] hwcontext_vaapi: Add option to specify connection type

2019-05-06 Thread Mark Thompson
Can be set to "drm" or "x11" to force a specific connection type. --- libavutil/hwcontext_vaapi.c | 32 1 file changed, 28 insertions(+), 4 deletions(-) diff --git a/libavutil/hwcontext_vaapi.c b/libavutil/hwcontext_vaapi.c index 8624369bb9..561b82fcce 100644 ---

[FFmpeg-devel] [PATCH 7/7] hwcontext_qsv: Try to select a matching VAAPI device by default

2019-05-06 Thread Mark Thompson
Tries to find a device backed by the i915 kernel driver and loads the iHD VAAPI driver to use with it. This reduces confusion on machines with multiple DRM devices and removes the surprising requirement to set the LIBVA_DRIVER_NAME environment variable to use libmfx at all. ---

[FFmpeg-devel] [PATCH 1/7] ffmpeg_hw: Mark some strings as const

2019-05-06 Thread Mark Thompson
--- fftools/ffmpeg.h| 2 +- fftools/ffmpeg_hw.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/fftools/ffmpeg.h b/fftools/ffmpeg.h index eb1eaf6363..7b6f802082 100644 --- a/fftools/ffmpeg.h +++ b/fftools/ffmpeg.h @@ -72,7 +72,7 @@ typedef struct HWAccel { } HWAccel;

Re: [FFmpeg-devel] [PATCH V2 2/2] lavfi/opencl: add nlmeans_opencl filter

2019-05-06 Thread Mark Thompson
On 29/04/2019 03:06, Song, Ruiling wrote:> > In order to verify the patch, I also have more testing on the CPU OpenCL > driver from Intel. > I make it run 100 times, and still not see any reported overflow. So I think > we can say the filter is in good quality to be merged. Any different idea?

Re: [FFmpeg-devel] [DECISION] Project policy on closed source components

2019-05-06 Thread Mark Thompson
On 28/04/2019 21:02, Marton Balint wrote: > 1) Should libNDI support be removed from the ffmpeg codebase? Yes. - Mark ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link

Re: [FFmpeg-devel] [PATCH 3/3] avcodec/cbs_h2645: rename macros to read and write fields with custom range of values

2019-04-28 Thread Mark Thompson
On 17/04/2019 03:56, James Almer wrote: > These are more in line with the new ones introduced in the previous commit. > > Signed-off-by: James Almer > --- > No more i() macro :p > > Figured I'd leave all the byte and checksum fields using the custom range > macro, to have the explicit hex

Re: [FFmpeg-devel] [PATCH 2/3] avcodec/cbs_h2645: use the fixed() macro for forbidden_zero_bit

2019-04-28 Thread Mark Thompson
On 17/04/2019 03:56, James Almer wrote: > This follows the spec definition, and removes a field from the relevant > structs. > > Signed-off-by: James Almer > --- > libavcodec/cbs_h264.h | 1 - > libavcodec/cbs_h264_syntax_template.c | 2 +- > libavcodec/cbs_h265.h

Re: [FFmpeg-devel] [PATCH 1/3] avcodec/cbs_h2645: add macros to read and write fields with no custom range of values

2019-04-28 Thread Mark Thompson
On 17/04/2019 03:56, James Almer wrote: > Signed-off-by: James Almer > --- > Better macro names welcome. I used the same convention as in cbs_av1. > > fate-cbs passes, but i'm sure a bunch of these are not tested by it, > so help double checking i didn't screw up is welcome. > >

Re: [FFmpeg-devel] [PATCH] avcodec/cbs_av1: add missing value range constrains to timecode Metadata OBU

2019-04-28 Thread Mark Thompson
On 17/04/2019 16:48, James Almer wrote: > Also infer the value time_offset_length as 0 when it's not present. > > Signed-off-by: James Almer > --- > Fun thing, this metadata OBU is clearly based on the H264/5 timecode SEI, yet > time_offset_length is unsigned here :p > >

Re: [FFmpeg-devel] [PATCH v3 2/4] cbs_mpeg2: Improve checks for invalid values

2019-04-28 Thread Mark Thompson
On 23/04/2019 23:55, Andreas Rheinhardt wrote: > horizontal/vertical_size_value (containing the twelve least significant > bits of the frame size) mustn't be zero according to the specifications; > and the value 0 is forbidden for the colour_description elements. > > Signed-off-by: Andreas

Re: [FFmpeg-devel] [DECISION] Project policy on closed source components

2019-04-28 Thread Mark Thompson
On 28/04/2019 21:02, Marton Balint wrote: > ... closed source libraries which are not considered "System Libraries" > according to the GPL ... Please can you define this in a precise way which does not rely upon interpreting the GPL? There are certainly differing opinions about exactly what

Re: [FFmpeg-devel] [PATCH v3] lavfi: add colorkey_opencl filter

2019-04-20 Thread Mark Thompson
On 17/04/2019 03:08, Jarek Samic wrote: > This is a direct port of the CPU filter. > > Signed-off-by: Jarek Samic > --- > More fixes based on the comments from the second version of the patch (moving > sampler declaration into the program scope, `f`-suffixing constants, > attaching the `*`

Re: [FFmpeg-devel] [PATCH V2 2/2] lavfi/opencl: add nlmeans_opencl filter

2019-04-20 Thread Mark Thompson
On 17/04/2019 03:43, Song, Ruiling wrote: >> -Original Message- >> From: ffmpeg-devel [mailto:ffmpeg-devel-boun...@ffmpeg.org] On Behalf Of >> Mark Thompson >> Sent: Wednesday, April 17, 2019 5:28 AM >> To: ffmpeg-devel@ffmpeg.org >> Subject: Re: [FFmpe

Re: [FFmpeg-devel] [PATCH 1/5] avcodec/cbs: add helper functions and macros to read and write signed values

2019-04-16 Thread Mark Thompson
On 16/04/2019 23:54, James Almer wrote: > On 4/16/2019 7:45 PM, Mark Thompson wrote: >> On 15/04/2019 22:17, James Almer wrote: >>> Signed-off-by: James Almer >>> --- >>> libavcodec/cbs.c | 79 +++ >>> lib

Re: [FFmpeg-devel] [PATCH 2/5] avcodec/cbs_h2645: add helper macros for signed values

2019-04-16 Thread Mark Thompson
On 17/04/2019 00:01, James Almer wrote: > On 4/16/2019 7:57 PM, Mark Thompson wrote: >> On 15/04/2019 22:17, James Almer wrote: >>> Signed-off-by: James Almer >>> --- >>> libavcodec/cbs_h2645.c | 20 >>> 1 file changed, 20

Re: [FFmpeg-devel] [PATCH 5/5] avcodec/cbs_av1: use the new signed value read/write functions

2019-04-16 Thread Mark Thompson
On 15/04/2019 22:17, James Almer wrote: > Signed-off-by: James Almer > --- > The sample https://0x0.st/sljR.webm appears to be parsed the exact same way > after this patch. > > libavcodec/cbs_av1.c | 68 ++-- > 1 file changed, 8 insertions(+), 60

Re: [FFmpeg-devel] [PATCH 4/5] avcodec/cbs_h265: fix storage type for time_offset_value in Time Code SEI

2019-04-16 Thread Mark Thompson
On 15/04/2019 22:17, James Almer wrote: > The spec defines it as an array of signed values, inferred to 0 when not > present. > > Signed-off-by: James Almer > --- > Couldn't find any sample using it. > > libavcodec/cbs_h265.h | 2 +- > libavcodec/cbs_h265_syntax_template.c | 7

Re: [FFmpeg-devel] [PATCH 3/5] avcodec/cbs_h264: fix storage type for time_offset in Pic Timing SEI

2019-04-16 Thread Mark Thompson
On 15/04/2019 22:17, James Almer wrote: > The spec defines it as a signed value. > > Signed-off-by: James Almer > --- > The only sample i could find with time_offset values it's in the fate suite, > and in all cases it's 0. > > libavcodec/cbs_h264.h | 2 +- >

Re: [FFmpeg-devel] [PATCH 2/5] avcodec/cbs_h2645: add helper macros for signed values

2019-04-16 Thread Mark Thompson
On 15/04/2019 22:17, James Almer wrote: > Signed-off-by: James Almer > --- > libavcodec/cbs_h2645.c | 20 > 1 file changed, 20 insertions(+) > > diff --git a/libavcodec/cbs_h2645.c b/libavcodec/cbs_h2645.c > index e74f8dce81..a205293b3c 100644 > --- a/libavcodec/cbs_h2645.c

Re: [FFmpeg-devel] [PATCH 1/5] avcodec/cbs: add helper functions and macros to read and write signed values

2019-04-16 Thread Mark Thompson
On 15/04/2019 22:17, James Almer wrote: > Signed-off-by: James Almer > --- > libavcodec/cbs.c | 79 +++ > libavcodec/cbs_internal.h | 20 +- > 2 files changed, 98 insertions(+), 1 deletion(-) Looks like a sensible addition, some comments

Re: [FFmpeg-devel] [PATCH] avcodec/cbs_av1: add support for Scalability Metadata

2019-04-16 Thread Mark Thompson
On 14/04/2019 23:04, James Almer wrote: > Signed-off-by: James Almer > --- > This will make the AV1RawObu struct weigh about ~3kb instead of ~1kb. > > libavcodec/av1.h | 33 > libavcodec/cbs_av1.h | 15 +- >

Re: [FFmpeg-devel] [PATCH] avcodec/h264_ps: fix storage size for offset_for_ref_frame

2019-04-16 Thread Mark Thompson
On 11/04/2019 04:10, James Almer wrote: > On 4/10/2019 3:30 PM, James Almer wrote: >> The spec defines the valid range of values to be INT32_MIN + 1 to INT32_MAX, >> inclusive. >> >> Signed-off-by: James Almer >> --- >> A good example of why making offsets and sizes of structs like this tied to

Re: [FFmpeg-devel] [PATCH V2 1/2] lavfi/opencl: add more opencl helper macro

2019-04-16 Thread Mark Thompson
On 12/04/2019 16:09, Ruiling Song wrote: > Signed-off-by: Ruiling Song > --- > libavfilter/opencl.h | 38 ++ > 1 file changed, 38 insertions(+) > > diff --git a/libavfilter/opencl.h b/libavfilter/opencl.h > index 0b06232ade..0fa5b49d3f 100644 > ---

Re: [FFmpeg-devel] [PATCH V2 2/2] lavfi/opencl: add nlmeans_opencl filter

2019-04-16 Thread Mark Thompson
On 12/04/2019 16:09, Ruiling Song wrote: > Signed-off-by: Ruiling Song I can't work out where the problem is, but there is something really weirdly nondeterministic going on here. E.g. $ ./ffmpeg_g -y -init_hw_device opencl:0.0 -i ~/video/test/jellyfish-120-mbps-4k-uhd-hevc-10bit.mkv -an

Re: [FFmpeg-devel] [PATCH v2] lavfi: add colorkey_opencl filter

2019-04-15 Thread Mark Thompson
On 14/04/2019 05:27, Jarek Samic wrote: > This is a direct port of the CPU filter. > > Signed-off-by: Jarek Samic > --- > I've made the changes requested from the first patch. I also investigated > splitting the kernel into two kernels in order to remove the blending if > branch; I noticed

Re: [FFmpeg-devel] [PATCH 2/2 v2] avcodec/cbs_av1: add support for Padding OBUs

2019-04-14 Thread Mark Thompson
On 13/04/2019 20:25, James Almer wrote: > Based on itut_t35 Matadata OBU parsing code. > > Signed-off-by: James Almer > --- > libavcodec/cbs_av1.c | 20 > libavcodec/cbs_av1.h | 7 +++ > libavcodec/cbs_av1_syntax_template.c | 24

Re: [FFmpeg-devel] [PATCH 1/2] avcodec/cbs_av1: add a function to get a payload size without trailing zero bytes

2019-04-14 Thread Mark Thompson
On 13/04/2019 20:21, James Almer wrote: > Factor it out from cbs_av1_read_metadata_itut_t35() > > Signed-off-by: James Almer > --- > libavcodec/cbs_av1.c | 11 +++ > libavcodec/cbs_av1_syntax_template.c | 10 +- > 2 files changed, 12 insertions(+), 9 deletions(-)

  1   2   3   4   5   6   7   8   9   10   >