[FFmpeg-devel] [PATCH v2] avcodec/cbs_vp8: Add support for VP8 codec bitstream READ methods

2023-05-23 Thread Dai, Jianhui J
This commit adds VP8 into cbs supported codec list, and enables the `trace_headers` bitstream filters to support VP8, besides existing AV1, H.264, H.265 and VP9. It can be useful to debug VP8 stream issues. Only the READ methods `read_unit` and `split_fragment` are implemented, the WRITE methods `

Re: [FFmpeg-devel] [FFmpeg-cvslog] tests/fate/ffmpeg: add a test for input -r option

2023-05-23 Thread Martin Storsjö
On Mon, 22 May 2023, Anton Khirnov wrote: ffmpeg | branch: master | Anton Khirnov | Wed May 10 09:13:35 2023 +0200| [8c0f5161334aca93c97c42d4f62fde1c5de70b8a] | committer: Anton Khirnov tests/fate/ffmpeg: add a test for input -r option http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commi

[FFmpeg-devel] [PATCH] fate/tests/ffmpeg: use -idct simple for fate-ffmpeg-input-r

2023-05-23 Thread Anton Khirnov
Makes the test bitexact on non-x86_64. --- Tested by me on x86_32, and Martin on arm and aarch64. As it fixes a test failure, will push in a few hours if nobody objects. --- tests/fate/ffmpeg.mak | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/fate/ffmpeg.mak b/tests/fate

[FFmpeg-devel] [PATCH] avformat/hls: Forward stream metadata from subdemuxer

2023-05-23 Thread Armin Hasitzka
We found this when we were looking for language information that the mpegts demuxer knew about, but the HLS demuxer didn't (get forwarded). Best Armin 0001-avformat-hls-Forward-stream-metadata-from-subdemuxer.patch Description: Binary data ___ ffmpeg-d

[FFmpeg-devel] [PATCH] w32pthread: fix signature of WinRT version of thread worker

2023-05-23 Thread Steve Lhomme
The callback passed to CreateThread is not the same as with _beginthreadex(). This WinRT check could be removed if Win8 WinRT is not maintained as _beginthreadex() is now available [1] [1] https://learn.microsoft.com/en-us/cpp/cppcx/crt-functions-not-supported-in-universal-windows-platform-apps?

[FFmpeg-devel] [PATCH 02/15] fftools/ffmpeg_hw: move hw_device_setup_for_encode() to ffmpeg_enc

2023-05-23 Thread Anton Khirnov
This function is entangled with encoder setup, so it is more encoding code rather than ffmpeg_hw code. This will allow making more encoder state private in the future. --- fftools/ffmpeg.h | 1 - fftools/ffmpeg_enc.c | 55 fftools/ffmpeg_hw.c | 55

[FFmpeg-devel] [PATCH 06/15] fftools/ffmpeg_demux: only print demuxing stats if demuxing actually started

2023-05-23 Thread Anton Khirnov
If the transcoding process never got to reading any packets from this input then printing stats is just pointless noise. --- fftools/ffmpeg_demux.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/fftools/ffmpeg_demux.c b/fftools/ffmpeg_demux.c index 7318abc6d9..ed8d5d165a

[FFmpeg-devel] [PATCH 01/15] fftools/ffmpeg_hw: move hw_device_setup_for_decode() to ffmpeg_dec

2023-05-23 Thread Anton Khirnov
This function is entangled with decoder setup, so it is more decoding code rather than ffmpeg_hw code. This will allow making more decoder state private in the future. --- fftools/ffmpeg.h | 5 +- fftools/ffmpeg_dec.c | 145 fftools/ffmpeg_hw.c | 153

[FFmpeg-devel] [PATCH 03/15] fftools/ffmpeg_enc: use AVFrame.hw_frames_ctx for encoder hw setup

2023-05-23 Thread Anton Khirnov
It should be the same as the one that can be extracted from the filter and does not require access to outside data. --- fftools/ffmpeg_enc.c | 20 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/fftools/ffmpeg_enc.c b/fftools/ffmpeg_enc.c index 7d99d9270b..59e94

[FFmpeg-devel] [PATCH 07/15] fftools/ffmpeg_demux: initialize nb_streams_warn

2023-05-23 Thread Anton Khirnov
Fixes spurious new-stream warnings for unused streams after 9429624a76107020b5911f8307f366fed386b336 --- fftools/ffmpeg_demux.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fftools/ffmpeg_demux.c b/fftools/ffmpeg_demux.c index ed8d5d165a..bd267aa0ce 100644 --- a/fftools/ffmpeg_demux.c +++ b

[FFmpeg-devel] [PATCH 04/15] fftools/ffmpeg: fail earlier on text/bitmap subtitles mismatch

2023-05-23 Thread Anton Khirnov
Checking whether the user requested an unsupported conversion between text and bitmap subtitles can be done immediately when creating the output stream. --- fftools/ffmpeg_enc.c | 18 -- fftools/ffmpeg_mux_init.c | 17 + 2 files changed, 17 insertions(+), 18 de

[FFmpeg-devel] [PATCH 08/15] fftools/ffmpeg_demux: skip unused/attachment streams in final stats

2023-05-23 Thread Anton Khirnov
No useful information can be printed for them. --- fftools/ffmpeg_demux.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/fftools/ffmpeg_demux.c b/fftools/ffmpeg_demux.c index bd267aa0ce..33322ac565 100644 --- a/fftools/ffmpeg_demux.c +++ b/fftools/ffmpeg_demux.c @@ -781,6 +781,9 @@ static

[FFmpeg-devel] [PATCH 05/15] fftools/ffmpeg: drop outdated comments

2023-05-23 Thread Anton Khirnov
--- fftools/ffmpeg.c | 1 - fftools/ffmpeg_demux.c | 1 - 2 files changed, 2 deletions(-) diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c index c70d38755b..1fc13b3e29 100644 --- a/fftools/ffmpeg.c +++ b/fftools/ffmpeg.c @@ -1431,7 +1431,6 @@ int main(int argc, char **argv) exit_pr

[FFmpeg-devel] [PATCH 10/15] fftools/ffmpeg_dec: move InputStream.pkt to Decoder

2023-05-23 Thread Anton Khirnov
It is purely internal to decoding. --- fftools/ffmpeg.h | 1 - fftools/ffmpeg_dec.c | 8 +++- fftools/ffmpeg_demux.c | 5 - 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/fftools/ffmpeg.h b/fftools/ffmpeg.h index 92e56ee80c..b377871980 100644 --- a/fftools/ffmpeg.h

[FFmpeg-devel] [PATCH 09/15] fftools/ffmpeg_dec: add decoder private data

2023-05-23 Thread Anton Khirnov
Move InputStream.decoded_frame to it. Analogous to what has been previously done for all the other major components. --- fftools/ffmpeg.h | 5 - fftools/ffmpeg_dec.c | 46 +- fftools/ffmpeg_demux.c | 7 ++- 3 files changed, 51 insertions(+

[FFmpeg-devel] [PATCH 11/15] fftools/ffmpeg_dec: move timestamp estimation state to Decoder

2023-05-23 Thread Anton Khirnov
It is purely internal to decoding. --- fftools/ffmpeg.h | 10 - fftools/ffmpeg_dec.c | 87 +- fftools/ffmpeg_demux.c | 5 --- 3 files changed, 52 insertions(+), 50 deletions(-) diff --git a/fftools/ffmpeg.h b/fftools/ffmpeg.h index b377871980..

[FFmpeg-devel] [PATCH 13/15] fftools/ffmpeg_demux: log discontinuity warnings to stream context

2023-05-23 Thread Anton Khirnov
Allows simplifying the log message. --- fftools/ffmpeg_demux.c | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/fftools/ffmpeg_demux.c b/fftools/ffmpeg_demux.c index 828a1182f0..561b4b0002 100644 --- a/fftools/ffmpeg_demux.c +++ b/fftools/ffmpeg_demux.c @@ -248,12 +24

[FFmpeg-devel] [PATCH 14/15] fftools/sync_queue: add debug logging

2023-05-23 Thread Anton Khirnov
--- fftools/ffmpeg_mux_init.c | 4 ++-- fftools/sync_queue.c | 40 --- fftools/sync_queue.h | 2 +- 3 files changed, 40 insertions(+), 6 deletions(-) diff --git a/fftools/ffmpeg_mux_init.c b/fftools/ffmpeg_mux_init.c index dc33d225df..7878789bb4 100

[FFmpeg-devel] [PATCH 15/15] fftools/sync_queue: make sure non-limiting streams are not used as queue head

2023-05-23 Thread Anton Khirnov
A non-limiting stream could mistakenly end up being the queue head, which would then produce incorrect synchronization, seen e.g. in fate-matroska-flac-extradata-update for certain number of frame threads (e.g. 5). Found-By: James Almer --- fftools/sync_queue.c | 13 +++-- 1 file changed,

[FFmpeg-devel] [PATCH 12/15] fftools/ffmpeg: add InputStream.index

2023-05-23 Thread Anton Khirnov
This allows to avoid access to the underlying AVStream in many places. --- fftools/ffmpeg.c | 6 +++--- fftools/ffmpeg.h | 2 ++ fftools/ffmpeg_dec.c | 6 +++--- fftools/ffmpeg_demux.c| 1 + fftools/ffmpeg_filter.c | 10 +- fftools/ffmpeg_mux_init.c | 2 +-

Re: [FFmpeg-devel] [PATCH] avformat/gifdec: cleanup

2023-05-23 Thread Michael Niedermayer
On Mon, May 22, 2023 at 06:19:09PM +0200, Paul B Mahol wrote: > On 5/21/23, Paul B Mahol wrote: > > Attached patches. > > > > This finally removes giant hacks in gif demuxer and allows using gif > > files via pipe reliably. > > > > Hopefully final version. [...] > libavcodec/gifdec.c |

[FFmpeg-devel] Request: consider use codec id "sowt" instead of "ipcm" for LPCM_S16LE in mp4 muxer

2023-05-23 Thread Joseph Chris
Hello, I am writing this mail for request consider use codec id "sowt" instead of "ipcm" for AV_CODEC_ID_PCM_S16LE in mp4 muxer, and AV_CODEC_ID_PCM_S16BE accordingly. This only needs a minor change on code: diff --git a/libavformat/movenc.c b/libavformat/movenc.c index a9c8e104f0..2b984789f5

Re: [FFmpeg-devel] Request: consider use codec id "sowt" instead of "ipcm" for LPCM_S16LE in mp4 muxer

2023-05-23 Thread zhilizhao(赵志立)
> On May 24, 2023, at 08:45, Joseph Chris wrote: > > Hello, > > I am writing this mail for request consider use codec id "sowt" instead of > "ipcm" for AV_CODEC_ID_PCM_S16LE in mp4 muxer, and AV_CODEC_ID_PCM_S16BE > accordingly. This only needs a minor change on code: > > diff --git a/libav

[FFmpeg-devel] [PATCH v4] lavc/h264chroma: RISC-V V add motion compensation for 8x8 chroma blocks

2023-05-23 Thread Arnie Chang
Optimize the put and avg filtering for 8x8 chroma blocks Signed-off-by: Arnie Chang --- v4: Assembly portion: 1. Fix issues raised during the code review 2. Initialize vxrm to ensure the rounding mode is as expected Non-asm: 1. Put the function decarlations to h264_chroma_init_riscv.c checkasm: