[FFmpeg-devel] [PATCH 2/4] lavc/xvmc.h: mark the header as deprecated

2022-02-01 Thread Anton Khirnov
--- libavcodec/xvmc.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavcodec/xvmc.h b/libavcodec/xvmc.h index 465ee78d6e..78ec4530c2 100644 --- a/libavcodec/xvmc.h +++ b/libavcodec/xvmc.h @@ -27,6 +27,8 @@ * Public libavcodec XvMC header. */ +#pragma message("XvMC is no longer supp

[FFmpeg-devel] [PATCH 4/4] lavc: deprecate FF_IDCT_NONE

2022-02-01 Thread Anton Khirnov
It was only used by XvMC. --- libavcodec/avcodec.h | 5 - libavcodec/idctdsp.c | 1 - libavcodec/version.h | 1 + 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h index acb7ae0e14..5362446092 100644 --- a/libavcodec/avcodec.h +++ b/liba

[FFmpeg-devel] [PATCH 3/4] lavu/pixfmt: deprecate AV_PIX_FMT_XVMC

2022-02-01 Thread Anton Khirnov
It is no longer used for anything. --- libavutil/pixdesc.c | 2 ++ libavutil/pixfmt.h | 2 ++ libavutil/version.h | 1 + 3 files changed, 5 insertions(+) diff --git a/libavutil/pixdesc.c b/libavutil/pixdesc.c index 727d7540b3..6e57a82cb6 100644 --- a/libavutil/pixdesc.c +++ b/libavutil/pixdesc.c

[FFmpeg-devel] [PATCH 1/4] lavc/mpeg*: drop the XvMC hwaccel code

2022-02-01 Thread Anton Khirnov
XvMC was last relevant over 10 years ago, if ever. There is no reason to use it today. --- MAINTAINERS| 1 - configure | 9 - libavcodec/Makefile| 2 - libavcodec/avcodec.h | 12 -- libavcodec/error_resilience.c | 9 - libavc

Re: [FFmpeg-devel] [PATCH 0/5] Add IPFS and IPNS protocol support

2022-02-01 Thread Michael Niedermayer
On Mon, Jan 31, 2022 at 09:22:52PM +0100, Tomas Härdin wrote: [...] > It strikes me that this borders on incorporating business logic within > lavf. A user could achieve the same thing with a small shell script. > For example adding an alias that inspects calls to ffmpeg and sed:s > ipfs:// URLs ac

Re: [FFmpeg-devel] [PATCH v2 31/31] avutil/fifo: Deprecate old FIFO API

2022-02-01 Thread Anton Khirnov
Quoting Andreas Rheinhardt (2022-01-24 15:46:16) > @@ -323,7 +350,11 @@ int av_fifo_generic_read(AVFifoBuffer *f, void *dest, > int buf_size, void (*func) > * indicate no more data available to write. > * If func is NULL, src is interpreted as a simple byte array for source > data. > * @ret

Re: [FFmpeg-devel] [PATCH 4/4] lavc: deprecate FF_IDCT_NONE

2022-02-01 Thread Lynne
1 Feb 2022, 11:02 by an...@khirnov.net: > It was only used by XvMC. > --- > libavcodec/avcodec.h | 5 - > libavcodec/idctdsp.c | 1 - > libavcodec/version.h | 1 + > 3 files changed, 5 insertions(+), 2 deletions(-) > > diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h > index acb7ae0e1

Re: [FFmpeg-devel] [PATCH 4/4] lavc: deprecate FF_IDCT_NONE

2022-02-01 Thread James Almer
On 2/1/2022 8:16 AM, Lynne wrote: 1 Feb 2022, 11:02 by an...@khirnov.net: It was only used by XvMC. --- libavcodec/avcodec.h | 5 - libavcodec/idctdsp.c | 1 - libavcodec/version.h | 1 + 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/libavcodec/avcodec.h b/libavcode

[FFmpeg-devel] [PATCH] fftools/cmdutils: add an option to append to the report file

2022-02-01 Thread Dan Zwell
There are times when we want ffmpeg to log, but we don't want it to overwrite the log file. In addition to the use case described in the ticket, a third party tool that invokes ffmpeg may write additional information to the log file, such as why the encoding options were chosen. This implements:

Re: [FFmpeg-devel] [PATCH] fftools/cmdutils: add an option to append to the report file

2022-02-01 Thread James Almer
On 2/1/2022 8:58 AM, Dan Zwell wrote: There are times when we want ffmpeg to log, but we don't want it to overwrite the log file. In addition to the use case described in the ticket, a third party tool that invokes ffmpeg may write additional information to the log file, such as why the encoding

[FFmpeg-devel] [PATCH v2 01/69] avcodec/avcodec: Avoid MpegEncContext in AVHWAccel.decode_mb

2022-02-01 Thread Andreas Rheinhardt
Use an opaque pointer to void instead. Signed-off-by: Andreas Rheinhardt --- libavcodec/avcodec.h| 6 +- libavcodec/mpegvideo_xvmc.c | 3 ++- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h index ec1a0566a4..918753fd0e 100644

[FFmpeg-devel] [PATCH] fftools/cmdutils: add an option to append to the report file

2022-02-01 Thread Dan Zwell
There are times when we want ffmpeg to log, but we don't want it to overwrite the log file. In addition to the use case described in the ticket, a third party tool that invokes ffmpeg may write additional information to the log file, such as why the encoding options were chosen. I made the error

[FFmpeg-devel] [PATCH v2 02/69] avcodec/mpegvideo_enc: Allow slices only for slice-thread-able codecs

2022-02-01 Thread Andreas Rheinhardt
One can use slices without slice-threading. The results for mpegvideo-encoders are abysmal: AMV, SpeedHQ, H.263, RV10, RV20, MSMPEG4v2, MSMPEG4v3 and WMV1 produce broken files. WMV2 meanwhile expects the MpegEncContext given to ff_wmv2_encode_mb() to be at the beginning of a Wmv2Context (a structur

[FFmpeg-devel] [PATCH v2 03/69] avcodec/mjpegenc, speedhqenc: Remove nonsense assert

2022-02-01 Thread Andreas Rheinhardt
Our code for writing optimal huffman tables is incompatible with using multiple slices and hence commit 884506dfe2e29a5b2bd2905ca4f17e277e32acb1 that implemented this also added an assert that slice_context_count is always 1. Yet this was always wrong: a) The MJPEG-encoder has (and had) the AV_COD

[FFmpeg-devel] [PATCH v2 04/69] avcodec/mjpegenc: Fix files with slices > 1, but threads == 1

2022-02-01 Thread Andreas Rheinhardt
In the aforementioned case mpegvideo_enc.c calls ff_mjpeg_encode_stuffing() at the end of every line which pads the output to byte-alignment and escapes it; yet it does not write the restart-markers (and also not the DRI marker when writing the header) and so the output files are broken. Fix this

[FFmpeg-devel] [PATCH v2 09/69] avcodec/idctdsp: Constify the permutation parameter of ff_init_scantable

2022-02-01 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- libavcodec/idctdsp.c | 2 +- libavcodec/idctdsp.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libavcodec/idctdsp.c b/libavcodec/idctdsp.c index 71bd03c606..d07dc29207 100644 --- a/libavcodec/idctdsp.c +++ b/libavcodec/idctdsp.c @@ -

[FFmpeg-devel] [PATCH v2 05/69] avcodec/mpegvideo: Enable private contexts

2022-02-01 Thread Andreas Rheinhardt
MpegEncContext is used by many different codecs and every one of these uses just a subset of its fields. If one tries to separate this and e.g. add a real MpegContext and extension structures (say MpegDecContext and MpegEncContext), one runs into two difficulties: a) Some code is shared between de

[FFmpeg-devel] [PATCH v2 06/69] avcodec/h261: Separate decode and encode contexts

2022-02-01 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- libavcodec/h261.c| 2 +- libavcodec/h261.h| 8 -- libavcodec/h261dec.c | 59 +++- libavcodec/h261enc.c | 54 +--- 4 files changed, 72 insertions(+), 51 deletions(-) dif

[FFmpeg-devel] [PATCH v2 07/69] avcodec/h261: Move encoder-only stuff to a new header

2022-02-01 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- libavcodec/h261.h | 7 --- libavcodec/h261enc.c | 1 + libavcodec/h261enc.h | 40 ++ libavcodec/mpegvideo_enc.c | 2 +- 4 files changed, 42 insertions(+), 8 deletions(-) create mode 100644 libav

[FFmpeg-devel] [PATCH v2 08/69] avcodec/h261enc: Pass PutBitContext directly in h261_encode_motion()

2022-02-01 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- libavcodec/h261enc.c | 13 ++--- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/libavcodec/h261enc.c b/libavcodec/h261enc.c index f1cd51ec2f..66b7cc18fd 100644 --- a/libavcodec/h261enc.c +++ b/libavcodec/h261enc.c @@ -141,13 +141,12 @@

[FFmpeg-devel] [PATCH v2 10/69] avcodec/wmv2: Move initializing abt_scantables to the decoder

2022-02-01 Thread Andreas Rheinhardt
They are not used by the encoder at all. Signed-off-by: Andreas Rheinhardt --- libavcodec/wmv2.c| 6 -- libavcodec/wmv2dec.c | 6 ++ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/libavcodec/wmv2.c b/libavcodec/wmv2.c index fd64a0938f..57e1267782 100644 --- a/libavcod

[FFmpeg-devel] [PATCH v2 11/69] avcodec/wmv2: Split Wmv2Context into decoder and encoder context

2022-02-01 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- libavcodec/wmv2.c| 6 ++--- libavcodec/wmv2.h| 26 +++--- libavcodec/wmv2dec.c | 64 +++- libavcodec/wmv2enc.c | 29 +++- 4 files changed, 73 insertions(+), 52 deletions(-) diff --g

[FFmpeg-devel] [PATCH v2 12/69] avcodec/wmv2.h: Move encoder- and decoder-only parts to new headers

2022-02-01 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- libavcodec/h263dec.c | 2 +- libavcodec/mpegvideo.c | 2 +- libavcodec/mpegvideo_enc.c | 2 +- libavcodec/msmpeg4dec.c| 2 +- libavcodec/wmv2.h | 9 - libavcodec/wmv2dec.c | 1 + libavcodec/wmv2dec.h | 32 +

[FFmpeg-devel] [PATCH v2 13/69] avcodec/msmpeg4.h: Move encoder-only stuff to a new header

2022-02-01 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- libavcodec/mpegvideo_enc.c | 2 +- libavcodec/msmpeg4.h | 15 - libavcodec/msmpeg4enc.c| 1 + libavcodec/msmpeg4enc.h| 45 ++ libavcodec/wmv2enc.c | 1 + 5 files changed, 48 insertions(+),

[FFmpeg-devel] [PATCH v2 14/69] avcodec/msmpeg4.h: Move decoder-only parts to a new header

2022-02-01 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- libavcodec/h263dec.c| 2 +- libavcodec/msmpeg4.h| 23 --- libavcodec/msmpeg4dec.c | 1 + libavcodec/msmpeg4dec.h | 50 + libavcodec/mss2.c | 2 +- libavcodec/vc1dec.c | 2 +- libavc

[FFmpeg-devel] [PATCH v2 15/69] avcodec/msmpegenc: Add MSMPEG4EncContext and move ac_stats to it

2022-02-01 Thread Andreas Rheinhardt
Also avoid the allocation by making it part of the context. Signed-off-by: Andreas Rheinhardt --- libavcodec/mpegvideo.h | 2 -- libavcodec/mpegvideo_enc.c | 7 --- libavcodec/msmpeg4enc.c| 26 +++--- libavcodec/msmpeg4enc.h| 8 libavcodec/wmv2enc.

[FFmpeg-devel] [PATCH v2 16/69] avcodec/h263.h: Move encoder-only stuff to a new header h263enc.h

2022-02-01 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- libavcodec/h263.h | 101 libavcodec/h263enc.h | 130 + libavcodec/ituh263enc.c| 1 + libavcodec/mpeg4videodec.c | 1 + libavcodec/mpeg4videoenc.c | 1 + libavcodec/mpegv

[FFmpeg-devel] [PATCH v2 17/69] avcodec/mpeg4video.h: Move decoder-only parts to a new header

2022-02-01 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- libavcodec/h263dec.c | 1 + libavcodec/ituh263dec.c| 1 + libavcodec/mpeg4video.h| 66 --- libavcodec/mpeg4video_parser.c | 1 + libavcodec/mpeg4videodec.c | 1 + libavcodec/mpeg4videodec.h | 99 ++

[FFmpeg-devel] [PATCH v2 18/69] avcodec/mpeg4video.h: Move encoder-only parts in a new file

2022-02-01 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- libavcodec/mpeg4video.h| 12 --- libavcodec/mpeg4videoenc.c | 1 + libavcodec/mpeg4videoenc.h | 43 ++ libavcodec/mpegvideo_enc.c | 1 + 4 files changed, 45 insertions(+), 12 deletions(-) create mode 100644 l

[FFmpeg-devel] [PATCH v2 19/69] avcodec/flv.h: Split header into encoder-only and decoder-only headers

2022-02-01 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- libavcodec/flvdec.c| 2 +- libavcodec/flvdec.h| 29 + libavcodec/flvenc.c| 2 +- libavcodec/{flv.h => flvenc.h} | 9 +++-- libavcodec/h263dec.c | 2 +- libavcodec/ituh263dec.c

[FFmpeg-devel] [PATCH v2 20/69] avcodec/mpeg12.h: Move decoder-only stuff to a new header

2022-02-01 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- libavcodec/eatqi.c | 2 +- libavcodec/mdec.c | 3 ++- libavcodec/mpeg12.c| 7 ++--- libavcodec/mpeg12.h| 31 -- libavcodec/mpeg12dec.c | 3 +-- libavcodec/mpeg12dec.h | 60 ++ li

[FFmpeg-devel] [PATCH v2 21/69] avcodec/mpeg12.h: Move encoder-only stuff into a new header

2022-02-01 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- libavcodec/mpeg12.h| 8 libavcodec/mpeg12enc.c | 2 +- libavcodec/mpeg12enc.h | 38 ++ libavcodec/mpegvideo_enc.c | 1 + libavcodec/speedhqenc.c| 3 +-- 5 files changed, 41 insertions(+), 11

[FFmpeg-devel] [PATCH v2 22/69] avcodec/rv10.h: Split header into decoder- and encoder-only parts

2022-02-01 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- libavcodec/ituh263dec.c | 2 +- libavcodec/mpegvideo_enc.c | 2 +- libavcodec/rv10.c| 2 +- libavcodec/rv10dec.h | 28 libavcodec/rv10enc.c | 2 +- libavcodec/{rv10.h => r

[FFmpeg-devel] [PATCH v2 23/69] avcodec/mpegvideo: Move encoder-only stuff to a new header

2022-02-01 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- libavcodec/dnxhdenc.c | 1 + libavcodec/flvdec.c | 1 + libavcodec/flvenc.c | 1 + libavcodec/h261enc.c| 1 + libavcodec/h263enc.h| 2 +- libavcodec/intelh263dec.c | 1 + libavcodec/i

[FFmpeg-devel] [PATCH v2 24/69] avcodec/mpegvideo: Move decoder-only stuff to a new header

2022-02-01 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- libavcodec/dxva2_vc1.c | 1 + libavcodec/h261dec.c | 1 + libavcodec/h263dec.c | 1 + libavcodec/mpeg12dec.c | 1 + libavcodec/mpeg4videodec.c | 1 + libavcodec/mpegvideo.h | 28 libavcodec/mpegvideo_dec.c | 1 +

[FFmpeg-devel] [PATCH v2 25/69] avcodec/speedhqenc: Add SpeedHQEncContext and move slice_start to it

2022-02-01 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- libavcodec/mpegvideo.h | 3 --- libavcodec/speedhqenc.c | 19 ++- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/libavcodec/mpegvideo.h b/libavcodec/mpegvideo.h index c4ac7bc966..e31ad2ccff 100644 --- a/libavcodec/mpegvideo.

[FFmpeg-devel] [PATCH v2 27/69] avcodec/mpegvideo_enc: Don't find encoder by ID

2022-02-01 Thread Andreas Rheinhardt
mpegvideo-based encoders supporting bframes implement this by opening encoders of their own to test how long the chains of bframes are supposed to be. The needed AVCodec was obtained via avcodec_find_encoder(). This is complicated, as the current encoder can be directly obtained. And it also is not

[FFmpeg-devel] [PATCH v2 29/69] avcodec/mpegvideoenc: Move tmp bframes to MPVMainEncContext

2022-02-01 Thread Andreas Rheinhardt
Also move b_frame_strategy and b_sensitivity; they are all only used by an encoder's main thread. Signed-off-by: Andreas Rheinhardt --- libavcodec/mpegvideo.h | 7 - libavcodec/mpegvideo_enc.c | 61 +++--- libavcodec/mpegvideoenc.h | 15 +++--- 3 fil

[FFmpeg-devel] [PATCH v2 28/69] avcodec/mpegvideoenc: Add proper MPVMainEncContext

2022-02-01 Thread Andreas Rheinhardt
This is in preparation for moving fields only used by the main encoder thread from MPVContext to MPVMainEncContext. Signed-off-by: Andreas Rheinhardt --- libavcodec/dnxhdenc.c | 302 +++-- libavcodec/flvenc.c| 3 +- libavcodec/h261enc.c | 15

[FFmpeg-devel] [PATCH v2 30/69] avcodec/mpegvideoenc: Move ratecontrol to MPVMainEncContext

2022-02-01 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- libavcodec/mpegvideo.h | 8 libavcodec/mpegvideo_enc.c | 38 +++--- libavcodec/mpegvideoenc.h | 8 libavcodec/ratecontrol.c | 31 +++ libavcodec/snowenc.c | 8 --

[FFmpeg-devel] [PATCH v2 31/69] avcodec/mpegvideo: Move me_pre and me_penalty_compensation to enc-ctx

2022-02-01 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- libavcodec/mpegvideo.h | 2 -- libavcodec/mpegvideo_enc.c | 8 libavcodec/mpegvideoenc.h | 7 +-- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/libavcodec/mpegvideo.h b/libavcodec/mpegvideo.h index 4811fc0ad6..c59d4848a8 100

[FFmpeg-devel] [PATCH v2 32/69] avcodec/mpegvideo: Move gop_size to MPVMainEncContext

2022-02-01 Thread Andreas Rheinhardt
Only used by the main encoding thread. Signed-off-by: Andreas Rheinhardt --- libavcodec/mpegvideo.h | 1 - libavcodec/mpegvideo_enc.c | 14 +++--- libavcodec/mpegvideoenc.h | 2 ++ libavcodec/ratecontrol.c | 2 +- 4 files changed, 10 insertions(+), 9 deletions(-) diff --git a/

[FFmpeg-devel] [PATCH v2 33/69] avcodec/mpegvideo_enc: Don't set picture_in_gop_number for slice threads

2022-02-01 Thread Andreas Rheinhardt
They don't ever read this value. Signed-off-by: Andreas Rheinhardt --- libavcodec/mpegvideo_enc.c | 1 - 1 file changed, 1 deletion(-) diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c index 77825e5b82..fd3f458fb7 100644 --- a/libavcodec/mpegvideo_enc.c +++ b/libavcodec/mpegv

[FFmpeg-devel] [PATCH v2 34/69] avcodec/mpegvideo: Move picture_in_gop_number to MPVMainEncContext

2022-02-01 Thread Andreas Rheinhardt
Only ever used by the main encoding thread. Signed-off-by: Andreas Rheinhardt --- libavcodec/mpegvideo.h | 1 - libavcodec/mpegvideo_enc.c | 14 +++--- libavcodec/mpegvideoenc.h | 1 + 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/libavcodec/mpegvideo.h b/libavcod

[FFmpeg-devel] [PATCH v2 36/69] avcodec/mpegvideo: Move input_picture list to MPVMainEncContext

2022-02-01 Thread Andreas Rheinhardt
Also avoid an allocation while doing so. Signed-off-by: Andreas Rheinhardt --- libavcodec/mpegvideo.h | 1 - libavcodec/mpegvideo_enc.c | 60 ++ libavcodec/mpegvideoenc.h | 2 ++ 3 files changed, 31 insertions(+), 32 deletions(-) diff --git a/libavcode

[FFmpeg-devel] [PATCH v2 37/69] avcodec/mpegvideo: Remove write-only [fb]_code

2022-02-01 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- libavcodec/ituh263enc.c| 1 - libavcodec/mpeg12enc.c | 5 - libavcodec/mpeg4videoenc.c | 8 libavcodec/mpegvideo.h | 2 -- libavcodec/mpegvideo_enc.c | 8 5 files changed, 24 deletions(-) diff --git a/libavcodec/ituh263enc.c

[FFmpeg-devel] [PATCH v2 38/69] avcodec/mpegvideo: Move last-pic information to MPVMainEncContext

2022-02-01 Thread Andreas Rheinhardt
last_pict_type, last_non_b_pict_type and last_lambda_for are only used by the encoder's main thread. Signed-off-by: Andreas Rheinhardt --- libavcodec/mpegvideo.h | 3 --- libavcodec/mpegvideo_enc.c | 16 libavcodec/mpegvideoenc.h | 4 libavcodec/msmpeg4enc.c| 5

[FFmpeg-devel] [PATCH v2 39/69] avcodec/mpegvideo: Move header_bits to MPVMainEncContext

2022-02-01 Thread Andreas Rheinhardt
The header is always written by the main thread, so it is not surprising that header_bits can be moved to MPVMainEncContext as well. Signed-off-by: Andreas Rheinhardt --- libavcodec/mjpegenc.c | 14 -- libavcodec/mpegvideo.h | 1 - libavcodec/mpegvideo_enc.c | 6 +++--- li

[FFmpeg-devel] [PATCH v2 40/69] avcodec/mpegvideo_enc: Remove unused function parameters

2022-02-01 Thread Andreas Rheinhardt
Seems to have been always unused since these functions were introduced in 1f0cd30fd9b656122436ecd625656a04f6235fb3. Signed-off-by: Andreas Rheinhardt --- libavcodec/mpegvideo_enc.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/libavcodec/mpegvideo_enc.c b/libav

[FFmpeg-devel] [PATCH v2 41/69] avcodec/mpegvideo_enc: Remove unused parameter from encode_mb_hq()

2022-02-01 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- libavcodec/mpegvideo_enc.c | 32 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c index 5b6f5211cc..ab49705823 100644 --- a/libavcodec/mpegvideo_enc.c +++

[FFmpeg-devel] [PATCH v2 46/69] avcodec/mpegvideo: Move encoder-only base-arrays to MPVMainEncContext

2022-02-01 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- libavcodec/mpegvideo.h | 10 libavcodec/mpegvideo_enc.c | 48 +++--- libavcodec/mpegvideoenc.h | 11 + libavcodec/ratecontrol.c | 4 ++-- 4 files changed, 37 insertions(+), 36 deletions(-) diff --git a

[FFmpeg-devel] [PATCH v2 42/69] avcodec/mpegvideo: Move vbv_delay to Mpeg1Context

2022-02-01 Thread Andreas Rheinhardt
Only used there and only by the main thread. Signed-off-by: Andreas Rheinhardt --- libavcodec/mpeg12dec.c | 5 +++-- libavcodec/mpegvideo.h | 1 - 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/libavcodec/mpeg12dec.c b/libavcodec/mpeg12dec.c index 22e0ba5ed3..d3c32818cf 100644 --

[FFmpeg-devel] [PATCH v2 47/69] avcodec/mpegvideo_enc: Initialize non-JPEG q-matrices only once

2022-02-01 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- libavcodec/mpegvideo_enc.c | 11 --- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c index 8b2de4770b..75f1db2a76 100644 --- a/libavcodec/mpegvideo_enc.c +++ b/libavcodec/mpegvideo_

[FFmpeg-devel] [PATCH v2 43/69] avcodec/mpegvideo: Move brd_scale to MPVMainEncContext

2022-02-01 Thread Andreas Rheinhardt
Only used by the main encoding thread. Signed-off-by: Andreas Rheinhardt --- libavcodec/mpegvideo.h | 1 - libavcodec/mpegvideo_enc.c | 6 +++--- libavcodec/mpegvideoenc.h | 5 +++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/libavcodec/mpegvideo.h b/libavcodec/mpegvideo

[FFmpeg-devel] [PATCH v2 48/69] avcodec/mpegvideo_enc: Avoid allocations for q_int(er|ra)_matrix tables

2022-02-01 Thread Andreas Rheinhardt
Do this by making them part of an MPVMainEncContext; the MPVEncContexts still retain their pointers to access them. (These tables are quite big, so that putting them in the MpegEncContext would have been very wasteful for all the decoders using said structure. But this is no longer a problem: MPVMa

[FFmpeg-devel] [PATCH v2 44/69] avcodec/mpegvideo: Move ratecontrol parameters to MPVMainEncContext

2022-02-01 Thread Andreas Rheinhardt
All except vbv_ignore_qmax are only ever used by the main encoding thread. Signed-off-by: Andreas Rheinhardt --- libavcodec/mpegvideo.h | 13 - libavcodec/mpegvideo_enc.c | 4 ++-- libavcodec/mpegvideoenc.h | 31 ++- libavcodec/ratecontrol.c | 38 +

[FFmpeg-devel] [PATCH v2 49/69] avcodec/mpegvideo: Move scenechange_threshold to MPVMainEncContext

2022-02-01 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- libavcodec/mpegvideo.h | 1 - libavcodec/mpegvideo_enc.c | 4 ++-- libavcodec/mpegvideoenc.h | 4 +++- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/libavcodec/mpegvideo.h b/libavcodec/mpegvideo.h index 0d6b79fe5d..4601c4be64 100644 ---

[FFmpeg-devel] [PATCH v2 50/69] avcodec/mpegvideo: Move dummy dst for depr. opts to MPVMainEncContext

2022-02-01 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- libavcodec/mjpegenc.c | 2 +- libavcodec/mpegvideo.h| 4 libavcodec/mpegvideoenc.h | 8 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/libavcodec/mjpegenc.c b/libavcodec/mjpegenc.c index a8ea63a76d..360653c5a1 100644 ---

[FFmpeg-devel] [PATCH v2 45/69] avcodec/mpegvideo: Allocate encoder-only tables in mpegvideo_enc.c

2022-02-01 Thread Andreas Rheinhardt
This commit moves the encoder-only allocations of the tables owned solely by the main encoder context to mpegvideo_enc.c. This avoids checks in mpegvideo.c for whether we are dealing with an encoder; it also improves modularity (if encoders are disabled, this code will no longer be included in the

[FFmpeg-devel] [PATCH v2 51/69] avcodec/mpegvideo: Move frame_skip_(exp|cmp) to MPVMainEncContext

2022-02-01 Thread Andreas Rheinhardt
Only used by the main encoding thread. Signed-off-by: Andreas Rheinhardt --- libavcodec/mpegvideo.h | 2 -- libavcodec/mpegvideo_enc.c | 8 libavcodec/mpegvideoenc.h | 7 +-- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/libavcodec/mpegvideo.h b/libavcodec/mpeg

[FFmpeg-devel] [PATCH v2 52/69] avcodec/mpegvideo: Move input_picture_number to MPVMainEncContext

2022-02-01 Thread Andreas Rheinhardt
Only used by the main encoder thread. Signed-off-by: Andreas Rheinhardt --- libavcodec/mpegvideo.h | 1 - libavcodec/mpegvideo_enc.c | 4 ++-- libavcodec/mpegvideoenc.h | 1 + 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/libavcodec/mpegvideo.h b/libavcodec/mpegvideo.h inde

[FFmpeg-devel] [PATCH v2 53/69] avcodec/mpegvideo: Move fixed_qscale to MPVMainEncContext

2022-02-01 Thread Andreas Rheinhardt
Only used by the main encoding thread. Signed-off-by: Andreas Rheinhardt --- libavcodec/mpegvideo.h | 1 - libavcodec/mpegvideo_enc.c | 10 +- libavcodec/mpegvideoenc.h | 2 ++ 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/libavcodec/mpegvideo.h b/libavcodec/mpegv

[FFmpeg-devel] [PATCH v2 54/69] avcodec/motion_est: Constify mv-table parameters where possible

2022-02-01 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- libavcodec/motion_est.c | 2 +- libavcodec/motion_est.h | 6 +++--- libavcodec/motion_est_template.c | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/libavcodec/motion_est.c b/libavcodec/motion_est.c index cc305d06f

[FFmpeg-devel] [PATCH v2 55/69] avcodec/mpegvideo: Constify src of ff_update_duplicate_context()

2022-02-01 Thread Andreas Rheinhardt
Also do the same for update_duplicate_context_after_me() in mpegvideo_enc.c. Signed-off-by: Andreas Rheinhardt --- libavcodec/mpegvideo.c | 2 +- libavcodec/mpegvideo.h | 2 +- libavcodec/mpegvideo_enc.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/libavcodec/mp

[FFmpeg-devel] [PATCH v2 35/69] avcodec/mpegvideo: Move pts and dts fields to MPVMainEncContext

2022-02-01 Thread Andreas Rheinhardt
user_specified_pts, dts_delta and reordered_pts are only used by the main thread. Signed-off-by: Andreas Rheinhardt --- libavcodec/mpegvideo.h | 10 -- libavcodec/mpegvideo_enc.c | 22 +++--- libavcodec/mpegvideoenc.h | 11 +++ 3 files changed, 22 insertions(

[FFmpeg-devel] [PATCH v2 56/69] avcodec/mpegpicture: Constify src parameter of ff_update_picture_tables

2022-02-01 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- libavcodec/mpegpicture.c | 2 +- libavcodec/mpegpicture.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libavcodec/mpegpicture.c b/libavcodec/mpegpicture.c index 27e497c404..07fc79685c 100644 --- a/libavcodec/mpegpicture.c +++ b/libav

[FFmpeg-devel] [PATCH v2 58/69] avcodec/mpegvideo: Move slice-context ptr array to MPVMainContext

2022-02-01 Thread Andreas Rheinhardt
The slice contexts don't have sub-slice contexts, so it makes no sense for them to have an array of pointers to slice contexts. Signed-off-by: Andreas Rheinhardt --- libavcodec/mjpegenc.c | 2 +- libavcodec/mpeg12dec.c | 12 ++-- libavcodec/mpegvideo.c | 21 ++--

[FFmpeg-devel] [PATCH v2 59/69] avcodec/mpegvideo: Add ptr to main MPVMainContext to slice contexts

2022-02-01 Thread Andreas Rheinhardt
It is a pointer to const to allow the slice threads to inspect values without modifying them. Signed-off-by: Andreas Rheinhardt --- I am unsure whether this should be a pointer to const void or a pointer to const MPVMainContext. libavcodec/mpegvideo.c | 3 +++ libavcodec/mpegvideo.h | 2

[FFmpeg-devel] [PATCH v2 60/69] avcodec/mpegvideo: Move slice_context_count to MPVMainContext

2022-02-01 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- libavcodec/mjpegenc.c | 6 +++--- libavcodec/mpeg12dec.c | 4 ++-- libavcodec/mpeg4video_parser.c | 2 +- libavcodec/mpegvideo.c | 13 ++--- libavcodec/mpegvideo.h | 3 ++- libavcodec/mpegvideo_enc.c | 8 -

[FFmpeg-devel] [PATCH v2 61/69] avcodec/mpegvideo: Move reordered_input_picture to MPVMainEncContext

2022-02-01 Thread Andreas Rheinhardt
Also avoid an allocation while at it. Signed-off-by: Andreas Rheinhardt --- libavcodec/mpeg4videoenc.c | 8 +++--- libavcodec/mpegvideo.h | 1 - libavcodec/mpegvideo_enc.c | 51 +++--- libavcodec/mpegvideoenc.h | 2 ++ 4 files changed, 32 insertions(+), 30

[FFmpeg-devel] [PATCH v2 62/69] avcodec/mpegvideo: Move max_b_frames to MPVMainEncContext

2022-02-01 Thread Andreas Rheinhardt
With the exception of VC-1-based decoders no decoder sets this, so move it to MPVMainEncContext and add a replacement field to VC1Context. Signed-off-by: Andreas Rheinhardt --- libavcodec/dxva2_vc1.c | 2 +- libavcodec/mpeg4videoenc.c | 8 libavcodec/mpegvideo.h | 1 - libavc

[FFmpeg-devel] [PATCH v2 64/69] avcodec/mpegvideo: Move coded_picture_number to MPVMainContext

2022-02-01 Thread Andreas Rheinhardt
It is not used by slice threads at all. Signed-off-by: Andreas Rheinhardt --- libavcodec/mpegvideo.c | 2 +- libavcodec/mpegvideo.h | 3 ++- libavcodec/mpegvideo_dec.c | 4 ++-- libavcodec/mpegvideo_enc.c | 6 +++--- 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/libavcod

[FFmpeg-devel] [PATCH v2 65/69] avcodec/mpegvideo: Move arrays owned by main thread to MPVMainContext

2022-02-01 Thread Andreas Rheinhardt
This commit moves the base pointers of arrays only allocated by the main thread to MPVMainContext (in case there is a base pointer). Signed-off-by: Andreas Rheinhardt --- These arrays are no longer reset in clear_context() because it is my understanding that there is only one place in the code wh

[FFmpeg-devel] [PATCH v2 66/69] avcodec/mpegvideo: Remove strict_std_compliance from MPVContext

2022-02-01 Thread Andreas Rheinhardt
It just duplicates AVCodecContext.strict_std_compliance. Signed-off-by: Andreas Rheinhardt --- libavcodec/mpeg12enc.c | 2 +- libavcodec/mpeg4videoenc.c | 4 ++-- libavcodec/mpegvideo.h | 1 - libavcodec/mpegvideo_enc.c | 3 +-- 4 files changed, 4 insertions(+), 6 deletions(-) diff --gi

[FFmpeg-devel] [PATCH v2 67/69] avcodec/mpegvideo_dec: Remove commented-out cruft

2022-02-01 Thread Andreas Rheinhardt
This piece of code has been added in an already commented-out state in commit 158c7f059c3906b0116ae73a7669a3bb7bc570bb. It certainly doesn't make sense now (if ever) because new_picture_ptr it used has been removed in 6571e41dcdee4655237bca0a3277df8976167aee (and new_picture is only used for encodi

[FFmpeg-devel] [PATCH v2 68/69] avcodec/mpegvideo_dec: Remove potentially UB always-true checks

2022-02-01 Thread Andreas Rheinhardt
ff_mpeg_update_thread_context() currently checks for whether the source (current|last|next)_picture_ptr points into the src context's picture array by performing a pointer comparison. Yet pointer comparisons are only legal when the pointers point into the same array object (or one past the last el

[FFmpeg-devel] [PATCH v2 69/69] avcodec/mpegvideo: Move picture array to MPVMainContext

2022-02-01 Thread Andreas Rheinhardt
Also avoid an allocation while at it. Signed-off-by: Andreas Rheinhardt --- libavcodec/h263dec.c | 7 ++--- libavcodec/mpegvideo.c | 14 +++--- libavcodec/mpegvideo.h | 5 +++- libavcodec/mpegvideo_dec.c | 54 +++--- libavcodec/mpegvideo_enc.c

[FFmpeg-devel] [PATCH v2 63/69] avcodec/mpegvideo: Move context_initialized flag to MPVMainContext

2022-02-01 Thread Andreas Rheinhardt
This is not a per-slice property. Also move context_reinit. Signed-off-by: Andreas Rheinhardt --- libavcodec/h261dec.c | 2 +- libavcodec/h263dec.c | 8 libavcodec/mpeg12dec.c | 2 +- libavcodec/mpeg4videodec.c | 8 libavcodec/mpegvideo.c | 6 +++--- li

[FFmpeg-devel] [PATCH] avcodec/libdav1d: free the Dav1dData packet on dav1d_send_data() failure

2022-02-01 Thread James Almer
We still own it on failure, and there's no point trying to feed it again. Signed-off-by: James Almer --- libavcodec/libdav1d.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libavcodec/libdav1d.c b/libavcodec/libdav1d.c index 29fa4f9c3d..872e60e000 100644 --- a/libavcodec

Re: [FFmpeg-devel] [PATCH 1/2] avcodec/cfhd: Avoid signed integer overflow in coeff

2022-02-01 Thread Michael Niedermayer
On Mon, Jan 17, 2022 at 11:32:44PM +0100, Michael Niedermayer wrote: > Fixes: signed integer overflow: 15244032 * 256 cannot be represented in type > 'int' > Fixes: > 43504/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_CFHD_fuzzer-4865014842916864 > > Found-by: continuous fuzzing process >

Re: [FFmpeg-devel] [PATCH] avcodec/libdav1d: free the Dav1dData packet on dav1d_send_data() failure

2022-02-01 Thread Ronald S. Bultje
Hi, On Tue, Feb 1, 2022 at 10:07 AM James Almer wrote: > We still own it on failure, and there's no point trying to feed it again. > > Signed-off-by: James Almer > --- > libavcodec/libdav1d.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/libavcodec/libdav1d.c b/li

Re: [FFmpeg-devel] [PATCH] avcodec/libdav1d: free the Dav1dData packet on dav1d_send_data() failure

2022-02-01 Thread James Almer
On 2/1/2022 12:57 PM, Ronald S. Bultje wrote: Hi, On Tue, Feb 1, 2022 at 10:07 AM James Almer wrote: We still own it on failure, and there's no point trying to feed it again. Signed-off-by: James Almer --- libavcodec/libdav1d.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)

[FFmpeg-devel] [PATCH] libavformat/mov: Expose Quicktime poster_time value as metadata TAG.

2022-02-01 Thread Bryce Newman
I need the ability to derive the poster time found in the mvhd, so I can use that value to create a thumbnail from ffmpeg. More details can be found here https://www.mail-archive.com/ffmpeg-user@ffmpeg.org/msg30003.html Signed-off-by: Bryce Chester Newman --- libavformat/mov.c | 11 ++- 1

Re: [FFmpeg-devel] [PATCH 0/5] Add IPFS and IPNS protocol support

2022-02-01 Thread Tomas Härdin
mån 2022-01-31 klockan 23:00 +0100 skrev Mark Gaiser: > On Mon, Jan 31, 2022 at 9:23 PM Tomas Härdin > wrote: > > > mån 2022-01-31 klockan 17:31 +0100 skrev Mark Gaiser: > > > On Mon, Jan 31, 2022 at 4:52 PM Tomas Härdin > > > wrote: > > > > > > > mån 2022-01-31 klockan 14:51 +0100 skrev Mark G

Re: [FFmpeg-devel] [PATCH 0/5] Add IPFS and IPNS protocol support

2022-02-01 Thread Tomas Härdin
tis 2022-02-01 klockan 11:06 +0100 skrev Michael Niedermayer: > On Mon, Jan 31, 2022 at 09:22:52PM +0100, Tomas Härdin wrote: > [...] > > It strikes me that this borders on incorporating business logic > > within > > lavf. A user could achieve the same thing with a small shell > > script. > > For e

Re: [FFmpeg-devel] [PATCH 1/2] avcodec/{ass, webvttdec}: fix handling of backslashes

2022-02-01 Thread Oneric
On Sun, Jan 16, 2022 at 19:16:54 +0100, Oneric wrote: > [PATCH 1/2] avcodec/{ass, webvttdec}: fix handling of backslashes > libavcodec/ass.c | 5 - > libavcodec/webvttdec.c | 2 +- > 2 files changed, 5 insertions(+), 2 deletions(-) > [PATCH 2/2] avcodec/webvttdec: honour bidi marks > l

Re: [FFmpeg-devel] [FFmpeg-cvslog] avformat/mpegts: add option max_packet_size

2022-02-01 Thread Michael Niedermayer
On Sun, Jan 16, 2022 at 05:19:15AM +, Gyan Doshi wrote: > ffmpeg | branch: master | Gyan Doshi | Wed Jan 12 20:57:59 > 2022 +0530| [bca30570d28bbaa07badadabf55ec3589201a82f] | committer: Gyan Doshi > > avformat/mpegts: add option max_packet_size > > Makes maximum size of emitted packet user

[FFmpeg-devel] [PATCH 1/2] avformat/utils: keep chapter monotonicity on chapter updates

2022-02-01 Thread Michael Niedermayer
Updating a chapter with the same id does not break monotonicity Fixes: Timeout Fixes: 43727/clusterfuzz-testcase-minimized-ffmpeg_dem_MOV_fuzzer-4960623367159808 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer

[FFmpeg-devel] [PATCH 2/2] avcodec/av1dec: Check tile_cols

2022-02-01 Thread Michael Niedermayer
Fixes: division by zero Fixes: 43769/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_AV1_fuzzer-5392562205097984 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer --- libavcodec/av1dec.c | 3 +++ 1 file chan

Re: [FFmpeg-devel] [FFmpeg-cvslog] avformat/mpegts: add option max_packet_size

2022-02-01 Thread James Almer
On 2/1/2022 3:47 PM, Michael Niedermayer wrote: On Sun, Jan 16, 2022 at 05:19:15AM +, Gyan Doshi wrote: ffmpeg | branch: master | Gyan Doshi | Wed Jan 12 20:57:59 2022 +0530| [bca30570d28bbaa07badadabf55ec3589201a82f] | committer: Gyan Doshi avformat/mpegts: add option max_packet_size

Re: [FFmpeg-devel] [PATCH 1/2] avcodec/{ass, webvttdec}: fix handling of backslashes

2022-02-01 Thread Soft Works
> -Original Message- > From: ffmpeg-devel On Behalf Of Oneric > Sent: Tuesday, February 1, 2022 6:39 PM > To: FFmpeg development discussions and patches > Subject: Re: [FFmpeg-devel] [PATCH 1/2] avcodec/{ass, webvttdec}: fix > handling of backslashes > > On Sun, Jan 16, 2022 at 19:16:

Re: [FFmpeg-devel] [PATCH 1/2] avcodec/{ass, webvttdec}: fix handling of backslashes

2022-02-01 Thread Oneric
On Tue, Feb 01, 2022 at 19:44:24 +, Soft Works wrote: > > On Sun, Jan 16, 2022 at 19:16:54 +0100, Oneric wrote: > > > > In case anyone is wondering why patchwork fails to apply the second patch, > > this is probably once again because the patch updates one of FATE's ASS > > reference files whi

Re: [FFmpeg-devel] [PATCH 1/2] avcodec/{ass, webvttdec}: fix handling of backslashes

2022-02-01 Thread Soft Works
> -Original Message- > From: ffmpeg-devel On Behalf Of Oneric > Sent: Tuesday, February 1, 2022 9:07 PM > To: FFmpeg development discussions and patches > Subject: Re: [FFmpeg-devel] [PATCH 1/2] avcodec/{ass, webvttdec}: fix > handling of backslashes > > On Tue, Feb 01, 2022 at 19:44:

Re: [FFmpeg-devel] [PATCH 0/5] Add IPFS and IPNS protocol support

2022-02-01 Thread Mark Gaiser
On Tue, Feb 1, 2022 at 5:40 PM Tomas Härdin wrote: > mån 2022-01-31 klockan 23:00 +0100 skrev Mark Gaiser: > > On Mon, Jan 31, 2022 at 9:23 PM Tomas Härdin > > wrote: > > > > > mån 2022-01-31 klockan 17:31 +0100 skrev Mark Gaiser: > > > > On Mon, Jan 31, 2022 at 4:52 PM Tomas Härdin > > > > wro

[FFmpeg-devel] [PATCH 0/8] rewrite avpriv_find_start_code() for clarity

2022-02-01 Thread Scott Theisen
I am endeavoring to reduce MythTV’s downstream changes to FFmpeg. avpriv_find_start_code() is one of the internal FFmpeg functions that MythTV uses. I was planning on copying it into MythTV to eventually eliminate all uses of internal FFmpeg headers; however, what avpriv_find_start_code() actually

[FFmpeg-devel] [PATCH 1/8] avpriv_find_start_code(): readability enhancement part 1

2022-02-01 Thread Scott Theisen
No functional change. --- libavcodec/utils.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/libavcodec/utils.c b/libavcodec/utils.c index b19befef21..cb4437edc2 100644 --- a/libavcodec/utils.c +++ b/libavcodec/utils.c @@ -967,10 +967,14 @@ const uint8_t *avpriv_find

[FFmpeg-devel] [PATCH 2/8] avpriv_find_start_code(): rewrite while loop and add comments for clarity

2022-02-01 Thread Scott Theisen
The expected number of iterations may increase by one for an input of alternating 0 and 1 bytes. Instead of incrementing by 2 everytime, it now alternates between incrementing by 1 and by 3. No functional change, but now much clearer. --- libavcodec/utils.c | 25 - 1 fi

[FFmpeg-devel] [PATCH 3/8] avpriv_find_start_code(): make the state parameter output only

2022-02-01 Thread Scott Theisen
--- libavcodec/cbs_mpeg2.c| 8 libavcodec/mpeg12dec.c| 5 ++--- libavcodec/mpeg4_unpack_bframes_bsf.c | 1 - libavcodec/mpegvideo_parser.c | 3 +-- libavcodec/utils.c| 1 + libavformat/rtpenc_mpv.c | 3 +-- 6 files c

[FFmpeg-devel] [PATCH 4/8] avpriv_find_start_code(): add doxygen comment and rename a parameter

2022-02-01 Thread Scott Theisen
--- libavcodec/internal.h | 15 ++- libavcodec/utils.c| 10 +- 2 files changed, 19 insertions(+), 6 deletions(-) diff --git a/libavcodec/internal.h b/libavcodec/internal.h index 72ca1553f6..07098e1522 100644 --- a/libavcodec/internal.h +++ b/libavcodec/internal.h @@ -285,9

[FFmpeg-devel] [PATCH 5/8] avpriv_find_start_code(): replace unnecessary for loop

2022-02-01 Thread Scott Theisen
start_code will still be invalid, i.e. all ones, but will no longer have up to the first three bytes in p shifted in. --- libavcodec/utils.c | 13 - 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/libavcodec/utils.c b/libavcodec/utils.c index 54c9dd056d..b4c5fa5009 100644

  1   2   >