[FFmpeg-devel] [PATCH v2] dvdvideo: add DVD-Video demuxer, powered by libdvdnav and libdvdread
Dust off those old DVD discs! This version is greatly simplified and improved from the patch submitted in December. Discontinuity issues are resolved, and many discs should work smoothly out of the box. Also, GPL sector validation code is removed. Basic Usage: ffmpeg -f dvdvideo -title 1 -i PATH_TO_DVD_STRUCTURE ... You will have to set your own title number, although the default value (1) gives good coverage. Note that this demuxer will process one PGC only. If you are working with a multi-PGC title or strange authoring, you may specify and target an exact PGC/PG (see options). Known issues: * Chapter points are not precise, this is highest priority to fix * Subtitle palette support will come in the next patchset (to consolidate shared code) * Some oddly authored discs with 1 cell and a command link back to itself will loop infinitely, I am debugging this scenario. Not implemented: * Shuffle PGC mode, menus, or rarely used DVD features like karaoke extensions * SDDS codec is not supported, as I don't have any material to test it with * Seeking by time is a low priority at this time * Probing will come but I have some concerns to think through first Signed-off-by: Marth64 --- Changelog |1 + configure |8 + libavformat/Makefile |1 + libavformat/allformats.c |1 + libavformat/avlanguage.c | 10 +- libavformat/dvdvideodec.c | 1022 + 6 files changed, 1041 insertions(+), 2 deletions(-) create mode 100644 libavformat/dvdvideodec.c diff --git a/Changelog b/Changelog index 5b2899d05b..1b377fed2f 100644 --- a/Changelog +++ b/Changelog @@ -18,6 +18,7 @@ version : - lavu/eval: introduce randomi() function in expressions - VVC decoder - fsync filter +- DVD-Video demuxer, powered by libdvdnav and libdvdread version 6.1: - libaribcaption decoder diff --git a/configure b/configure index e87a09ce83..1f21f4f1c2 100755 --- a/configure +++ b/configure @@ -227,6 +227,8 @@ External library support: --enable-libdavs2enable AVS2 decoding via libdavs2 [no] --enable-libdc1394 enable IIDC-1394 grabbing using libdc1394 and libraw1394 [no] + --enable-libdvdnav enable libdvdnav, needed for DVD demuxing [no] + --enable-libdvdread enable libdvdread, needed for DVD demuxing [no] --enable-libfdk-aac enable AAC de/encoding via libfdk-aac [no] --enable-libfliteenable flite (voice synthesis) support via libflite [no] --enable-libfontconfig enable libfontconfig, useful for drawtext filter [no] @@ -1806,6 +1808,8 @@ EXTERNAL_LIBRARY_GPL_LIST=" frei0r libcdio libdavs2 +libdvdnav +libdvdread librubberband libvidstab libx264 @@ -3519,6 +3523,8 @@ dts_demuxer_select="dca_parser" dtshd_demuxer_select="dca_parser" dv_demuxer_select="dvprofile" dv_muxer_select="dvprofile" +dvdvideo_demuxer_select="mpegps_demuxer" +dvdvideo_demuxer_deps="libdvdnav libdvdread" dxa_demuxer_select="riffdec" eac3_demuxer_select="ac3_parser" evc_demuxer_select="evc_frame_merge_bsf evc_parser" @@ -6760,6 +6766,8 @@ enabled libdav1d && require_pkg_config libdav1d "dav1d >= 0.5.0" "dav1d enabled libdavs2 && require_pkg_config libdavs2 "davs2 >= 1.6.0" davs2.h davs2_decoder_open enabled libdc1394 && require_pkg_config libdc1394 libdc1394-2 dc1394/dc1394.h dc1394_new enabled libdrm&& check_pkg_config libdrm libdrm xf86drm.h drmGetVersion +enabled libdvdnav && require_pkg_config libdvdnav "dvdnav >= 6.1.1" dvdnav/dvdnav.h dvdnav_open2 +enabled libdvdread&& require_pkg_config libdvdread "dvdread >= 6.1.2" dvdread/dvd_reader.h DVDOpen2 -ldvdread enabled libfdk_aac&& { check_pkg_config libfdk_aac fdk-aac "fdk-aac/aacenc_lib.h" aacEncOpen || { require libfdk_aac fdk-aac/aacenc_lib.h aacEncOpen -lfdk-aac && warn "using libfdk without pkg-config"; } } diff --git a/libavformat/Makefile b/libavformat/Makefile index 581e378d95..3c1cb21fe2 100644 --- a/libavformat/Makefile +++ b/libavformat/Makefile @@ -192,6 +192,7 @@ OBJS-$(CONFIG_DTS_MUXER) += rawenc.o OBJS-$(CONFIG_DV_MUXER) += dvenc.o OBJS-$(CONFIG_DVBSUB_DEMUXER)+= dvbsub.o rawdec.o OBJS-$(CONFIG_DVBTXT_DEMUXER)+= dvbtxt.o rawdec.o +OBJS-$(CONFIG_DVDVIDEO_DEMUXER) += dvdvideodec.o OBJS-$(CONFIG_DXA_DEMUXER) += dxa.o OBJS-$(CONFIG_EA_CDATA_DEMUXER) += eacdata.o OBJS-$(CONFIG_EA_DEMUXER)+= electronicarts.o diff --git a/libavformat/allformats.c b/libavformat/allformats.c index ce6be5f04d..ea88d4c094 100644 --- a/libavformat/allformats.c +++ b/libavformat/allformats.c @@ -150,6 +150,7 @@ extern const AVInputFormat ff_dv_demuxer; extern const FFOutputFormat ff_dv_muxer; extern const AVInputFormat ff_dvbsub_demuxer; extern const AVInputForma
Re: [FFmpeg-devel] [PATCH v2] dvdvideo: add DVD-Video demuxer, powered by libdvdnav and libdvdread
I will add that I still had to maintain a dependency on GENPTS for the inner MPEG demuxer. This is because dvdnav_get_current_time() does not provide exact stream-level PTS. However, the crashing/hanging is fixed (by parsing NAV packets), and the output is produced smoothly. GENPTS fills in the blanks. If anyone can think of a better way, please let me know. Right now, it works well. On Wed, Jan 10, 2024 at 2:47 AM Marth64 wrote: > Dust off those old DVD discs! > > This version is greatly simplified and improved from the patch submitted > in December. > Discontinuity issues are resolved, and many discs should work smoothly out > of the box. > Also, GPL sector validation code is removed. > > Basic Usage: > ffmpeg -f dvdvideo -title 1 -i PATH_TO_DVD_STRUCTURE ... > > You will have to set your own title number, although the default value (1) > gives good coverage. > Note that this demuxer will process one PGC only. If you are working with > a multi-PGC title or > strange authoring, you may specify and target an exact PGC/PG (see > options). > > Known issues: > * Chapter points are not precise, this is highest priority to fix > * Subtitle palette support will come in the next patchset (to consolidate > shared code) > * Some oddly authored discs with 1 cell and a command link back to itself > will loop infinitely, > I am debugging this scenario. > > Not implemented: > * Shuffle PGC mode, menus, or rarely used DVD features like karaoke > extensions > * SDDS codec is not supported, as I don't have any material to test it with > * Seeking by time is a low priority at this time > * Probing will come but I have some concerns to think through first > > Signed-off-by: Marth64 > --- > Changelog |1 + > configure |8 + > libavformat/Makefile |1 + > libavformat/allformats.c |1 + > libavformat/avlanguage.c | 10 +- > libavformat/dvdvideodec.c | 1022 + > 6 files changed, 1041 insertions(+), 2 deletions(-) > create mode 100644 libavformat/dvdvideodec.c > > diff --git a/Changelog b/Changelog > index 5b2899d05b..1b377fed2f 100644 > --- a/Changelog > +++ b/Changelog > @@ -18,6 +18,7 @@ version : > - lavu/eval: introduce randomi() function in expressions > - VVC decoder > - fsync filter > +- DVD-Video demuxer, powered by libdvdnav and libdvdread > > version 6.1: > - libaribcaption decoder > diff --git a/configure b/configure > index e87a09ce83..1f21f4f1c2 100755 > --- a/configure > +++ b/configure > @@ -227,6 +227,8 @@ External library support: >--enable-libdavs2enable AVS2 decoding via libdavs2 [no] >--enable-libdc1394 enable IIDC-1394 grabbing using libdc1394 > and libraw1394 [no] > + --enable-libdvdnav enable libdvdnav, needed for DVD demuxing [no] > + --enable-libdvdread enable libdvdread, needed for DVD demuxing > [no] >--enable-libfdk-aac enable AAC de/encoding via libfdk-aac [no] >--enable-libfliteenable flite (voice synthesis) support via > libflite [no] >--enable-libfontconfig enable libfontconfig, useful for drawtext > filter [no] > @@ -1806,6 +1808,8 @@ EXTERNAL_LIBRARY_GPL_LIST=" > frei0r > libcdio > libdavs2 > +libdvdnav > +libdvdread > librubberband > libvidstab > libx264 > @@ -3519,6 +3523,8 @@ dts_demuxer_select="dca_parser" > dtshd_demuxer_select="dca_parser" > dv_demuxer_select="dvprofile" > dv_muxer_select="dvprofile" > +dvdvideo_demuxer_select="mpegps_demuxer" > +dvdvideo_demuxer_deps="libdvdnav libdvdread" > dxa_demuxer_select="riffdec" > eac3_demuxer_select="ac3_parser" > evc_demuxer_select="evc_frame_merge_bsf evc_parser" > @@ -6760,6 +6766,8 @@ enabled libdav1d && require_pkg_config > libdav1d "dav1d >= 0.5.0" "dav1d > enabled libdavs2 && require_pkg_config libdavs2 "davs2 >= 1.6.0" > davs2.h davs2_decoder_open > enabled libdc1394 && require_pkg_config libdc1394 libdc1394-2 > dc1394/dc1394.h dc1394_new > enabled libdrm&& check_pkg_config libdrm libdrm xf86drm.h > drmGetVersion > +enabled libdvdnav && require_pkg_config libdvdnav "dvdnav >= > 6.1.1" dvdnav/dvdnav.h dvdnav_open2 > +enabled libdvdread&& require_pkg_config libdvdread "dvdread >= > 6.1.2" dvdread/dvd_reader.h DVDOpen2 -ldvdread > enabled libfdk_aac&& { check_pkg_config libfdk_aac fdk-aac > "fdk-aac/aacenc_lib.h" aacEncOpen || > { require libfdk_aac fdk-aac/aacenc_lib.h > aacEncOpen -lfdk-aac && > warn "using libfdk without pkg-config"; > } } > diff --git a/libavformat/Makefile b/libavformat/Makefile > index 581e378d95..3c1cb21fe2 100644 > --- a/libavformat/Makefile > +++ b/libavformat/Makefile > @@ -192,6 +192,7 @@ OBJS-$(CONFIG_DTS_MUXER) += rawenc.o > OBJS-$(CONFIG_DV_MUXER) += dvenc.o > OBJS-$(CONFIG_DVBSUB_DEMUXER)+= dvbsub.
[FFmpeg-devel] [PATCH 2/2] fftools/ffmpeg_filter: simplify buffersrc arg printing
From: Niklas Haas There's no need to go through full string expansion here. --- fftools/ffmpeg_filter.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/fftools/ffmpeg_filter.c b/fftools/ffmpeg_filter.c index 82ee4fae7d..f4324579c5 100644 --- a/fftools/ffmpeg_filter.c +++ b/fftools/ffmpeg_filter.c @@ -1497,11 +1497,10 @@ static int configure_input_video_filter(FilterGraph *fg, AVFilterGraph *graph, av_bprint_init(&args, 0, AV_BPRINT_SIZE_AUTOMATIC); av_bprintf(&args, "video_size=%dx%d:pix_fmt=%d:time_base=%d/%d:" - "pixel_aspect=%d/%d:colorspace=%s:range=%s", + "pixel_aspect=%d/%d:colorspace=%d:range=%d", ifp->width, ifp->height, ifp->format, ifp->time_base.num, ifp->time_base.den, sar.num, sar.den, - av_color_space_name(ifp->color_space), - av_color_range_name(ifp->color_range)); + ifp->color_space, ifp->color_range); if (fr.num && fr.den) av_bprintf(&args, ":frame_rate=%d/%d", fr.num, fr.den); snprintf(name, sizeof(name), "graph %d input from stream %d:%d", fg->index, -- 2.43.0 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [PATCH 1/2] fftools/ffplay: add missing YUV metadata to buffersrc
From: Niklas Haas Fixes error spam from the `ffplay` tool since commit 2d555dc82d, caused by an oversight on my part - I didn't notice during development that `ffplay` goes through its own filtering code path separate from fftools/ffmpeg_filter.c --- fftools/ffplay.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/fftools/ffplay.c b/fftools/ffplay.c index 17861e60be..0771326d76 100644 --- a/fftools/ffplay.c +++ b/fftools/ffplay.c @@ -1881,10 +1881,12 @@ static int configure_video_filters(AVFilterGraph *graph, VideoState *is, const c graph->scale_sws_opts = av_strdup(sws_flags_str); snprintf(buffersrc_args, sizeof(buffersrc_args), - "video_size=%dx%d:pix_fmt=%d:time_base=%d/%d:pixel_aspect=%d/%d", + "video_size=%dx%d:pix_fmt=%d:time_base=%d/%d:pixel_aspect=%d/%d:" + "colorspace=%d:range=%d", frame->width, frame->height, frame->format, is->video_st->time_base.num, is->video_st->time_base.den, - codecpar->sample_aspect_ratio.num, FFMAX(codecpar->sample_aspect_ratio.den, 1)); + codecpar->sample_aspect_ratio.num, FFMAX(codecpar->sample_aspect_ratio.den, 1), + frame->colorspace, frame->color_range); if (fr.num && fr.den) av_strlcatf(buffersrc_args, sizeof(buffersrc_args), ":frame_rate=%d/%d", fr.num, fr.den); -- 2.43.0 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [FFmpeg-cvslog] avfilter/buffersrc: add color_space/range parameters
On Sun, 07 Jan 2024 10:50:01 +0100 Michael Niedermayer wrote: > On Sun, Dec 31, 2023 at 09:49:43PM +, Niklas Haas wrote: > > ffmpeg | branch: master | Niklas Haas | Fri Oct 20 > > 16:55:43 2023 +0200| [2d555dc82d4ccd3c54c76e2fb3c861a8652de1c6] | > > committer: Niklas Haas > > > > avfilter/buffersrc: add color_space/range parameters > > > > To allow adding proper negotiation, in particular, to fftools. > > > > These values will simply be negotiated downstream for YUV formats, and > > ignored otherwise. > > > > > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=2d555dc82d4ccd3c54c76e2fb3c861a8652de1c6 > > --- > > > > doc/filters.texi| 10 +++ > > libavfilter/buffersrc.c | 75 > > +++-- > > libavfilter/buffersrc.h | 6 > > 3 files changed, 83 insertions(+), 8 deletions(-) > > After this the command line tools print tons of warnings Sent a fix to the ML, thanks. > also iam still seeing a segfault i reported earlier, should i recheck which > commit was causing that? Are you referring to the hwframes issue, the vaf issue, or something else entirely? ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH 1/2] fftools/ffplay: fix missing hw_frames_ctx when config avfilter
On Tue, 09 Jan 2024 23:41:00 +0800 Zhao Zhili wrote: > From: Zhao Zhili > > --- > fftools/ffplay.c | 9 + > 1 file changed, 9 insertions(+) > > diff --git a/fftools/ffplay.c b/fftools/ffplay.c > index 17861e60be..3c378bca2c 100644 > --- a/fftools/ffplay.c > +++ b/fftools/ffplay.c > @@ -1858,6 +1858,10 @@ static int configure_video_filters(AVFilterGraph > *graph, VideoState *is, const c > const AVDictionaryEntry *e = NULL; > int nb_pix_fmts = 0; > int i, j; > +AVBufferSrcParameters *par = av_buffersrc_parameters_alloc(); > + > +if (!par) > +return AVERROR(ENOMEM); > > for (i = 0; i < renderer_info.num_texture_formats; i++) { > for (j = 0; j < FF_ARRAY_ELEMS(sdl_texture_format_map) - 1; j++) { > @@ -1893,6 +1897,10 @@ static int configure_video_filters(AVFilterGraph > *graph, VideoState *is, const c > "ffplay_buffer", buffersrc_args, > NULL, > graph)) < 0) > goto fail; > +par->hw_frames_ctx = frame->hw_frames_ctx; > +ret = av_buffersrc_parameters_set(filt_src, par); > +if (ret < 0) > +goto fail; > > ret = avfilter_graph_create_filter(&filt_out, > avfilter_get_by_name("buffersink"), > @@ -1959,6 +1967,7 @@ static int configure_video_filters(AVFilterGraph > *graph, VideoState *is, const c > is->out_video_filter = filt_out; > > fail: > +av_freep(&par); > return ret; > } > > -- > 2.25.1 LGTM. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH v2] dvdvideo: add DVD-Video demuxer, powered by libdvdnav and libdvdread
Marth64 (12024-01-10): > I will add that I still had to maintain a dependency on GENPTS for the > inner MPEG demuxer. This is because dvdnav_get_current_time() does not > provide exact stream-level PTS. However, the crashing/hanging is fixed (by > parsing NAV packets), and the output is produced smoothly. GENPTS fills in > the blanks. > > If anyone can think of a better way, please let me know. Right now, it > works well. You could imitate what tools/dvd2concat does internally: use libdvdread to get the structure of the DVD but let the concat demuxer handle all the actual demuxing work. Regards, -- Nicolas George ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH 4/4] fate: add raw IAMF tests
On 1/10/2024 12:05 AM, Michael Niedermayer wrote: On Sun, Jan 07, 2024 at 06:31:00PM -0300, James Almer wrote: Covers muxing from raw pcm audio input into FLAC, using several scalable layouts, and demuxing the result. Signed-off-by: James Almer --- tests/Makefile | 7 +- tests/fate/iamf.mak| 31 ++ tests/filtergraphs/iamf_5_1| 4 + tests/filtergraphs/iamf_5_1_2 | 5 + tests/filtergraphs/iamf_5_1_4 | 6 ++ tests/filtergraphs/iamf_7_1_4 | 7 ++ tests/ref/fate/iamf-5_1_4 | 98 ++ tests/ref/fate/iamf-7_1_4 | 114 + tests/ref/fate/iamf-stereo | 18 tests/streamgroups/audio_element-5_1_4 | 7 ++ tests/streamgroups/audio_element-7_1_4 | 6 ++ tests/streamgroups/audio_element-stereo| 3 + tests/streamgroups/mix_presentation-5_1_4 | 2 + tests/streamgroups/mix_presentation-7_1_4 | 2 + tests/streamgroups/mix_presentation-stereo | 3 + 15 files changed, 312 insertions(+), 1 deletion(-) create mode 100644 tests/fate/iamf.mak create mode 100644 tests/filtergraphs/iamf_5_1 create mode 100644 tests/filtergraphs/iamf_5_1_2 create mode 100644 tests/filtergraphs/iamf_5_1_4 create mode 100644 tests/filtergraphs/iamf_7_1_4 create mode 100644 tests/ref/fate/iamf-5_1_4 create mode 100644 tests/ref/fate/iamf-7_1_4 create mode 100644 tests/ref/fate/iamf-stereo create mode 100644 tests/streamgroups/audio_element-5_1_4 create mode 100644 tests/streamgroups/audio_element-7_1_4 create mode 100644 tests/streamgroups/audio_element-stereo create mode 100644 tests/streamgroups/mix_presentation-5_1_4 create mode 100644 tests/streamgroups/mix_presentation-7_1_4 create mode 100644 tests/streamgroups/mix_presentation-stereo Iam probably missing some dependancies but, reporting anyway this fails fate: [aist#0:0/pcm_s16le @ 0x5645f5820680] Guessed Channel Layout: stereo Input #0, wav, from 'ffmpeg/tests/data/asynth-44100-2.wav': Duration: 00:00:06.00, bitrate: 1411 kb/s Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 44100 Hz, 2 channels, s16, 1411 kb/s [in#0/wav @ 0x5645f5812400] Codec AVOption idct (select IDCT implementation) has not been used for any stream. The most likely reason is either wrong type (e.g. a video option with no video streams) or that it is a private option of some decoder which was not actually used for any stream. [out#0/iamf @ 0x5645f585af80] Codec AVOption dct (DCT algorithm) has not been used for any stream. The most likely reason is either wrong type (e.g. a video option with no video streams) or that it is a private option of some encoder which was not actually used for any stream. [out#0/iamf @ 0x5645f585af80] Codec AVOption idct (select IDCT implementation) has not been used for any stream. The most likely reason is either wrong type (e.g. a video option with no video streams) or that it is a private option of some encoder which was not actually used for any stream. [out#0/iamf @ 0x5645f585af80] Invalid or missing stream group index in submix element specification "stg=0:parameter_id=100:headphones_rendering_mode=stereo:annotations=en-us=Scalable_Submix" Error opening output file ffmpeg/tests/data/fate/iamf-stereo.iamf. Error opening output files: Invalid argument threads=1 tests/Makefile:317: recipe for target 'fate-iamf-stereo' failed make: *** [fate-iamf-stereo] Error 234 thx I can't reproduce this. Tried with these four patches using current master and it works. Could it be strtoll misbehaving? Can you check what values are in idx, oc->nb_stream_groups, and endptr? ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] Hardware purchase request: AVX512-capable laptop
On Wed, Jan 10, 2024 at 3:56 AM Lynne wrote: > Jan 10, 2024, 03:31 by mich...@niedermayer.cc: > > > On Sat, Jan 06, 2024 at 06:42:40PM +0100, Michael Niedermayer wrote: > > > >> Hi > >> > >> On Wed, Jan 03, 2024 at 01:56:12AM +0100, Lynne wrote: > >> > As some of you know, my laptop died nearly 2 years ago, and > >> > >> Why/how did the laptop die ? > >> is it unrepearable ? > >> > > > > ping > > > > It was a 4th gen Thinkpad X1 Carbon. A few drops of water got in > between the caps lock before I noticed, by the time I did, it was too late. > Battery circuitry is dead so it only runs on AC, frequency controller is > dying so it runs at fixed Pentium II 350Mhz speeds, keyboard controller > sees keys pressed all the time, touchpad is dead, USB is dead. > The motherboard crammed essential components on the periphery > and non-essential replaceable components like wifi and 4g modem > right next to the CPU, so it was not great engineering. > It did live a long life for 7 years, but only the shell remains mostly > usable. > I may not be able to put it back together as it was, since I lost some > screws, > as I kept working on it for months. > NAK, FFmpeg developers do not need hardware. > ___ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > To unsubscribe, visit link above, or email > ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe". > ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH 1/3] swscale: don't assign range converters for float
On Mon, 27 Nov 2023 02:10:11 + "Chen, Wenbin" wrote: > > > From: Niklas Haas > > > > > > This logic was incongruent with logic used elsewhere, where floating > > > point formats are explicitly exempted from range conversion. Fixes an > > > issue where floating point formats were not going through special > > > unscaled converters even when it was otherwise possible. > > > --- > > > libswscale/swscale.c | 3 ++- > > > 1 file changed, 2 insertions(+), 1 deletion(-) > > > > > > diff --git a/libswscale/swscale.c b/libswscale/swscale.c > > > index 46ba68fe6a..a66db22767 100644 > > > --- a/libswscale/swscale.c > > > +++ b/libswscale/swscale.c > > > @@ -534,7 +534,8 @@ av_cold void ff_sws_init_range_convert(SwsContext > > > *c) > > > { > > > c->lumConvertRange = NULL; > > > c->chrConvertRange = NULL; > > > -if (c->srcRange != c->dstRange && !isAnyRGB(c->dstFormat)) { > > > +if (c->srcRange != c->dstRange && !isAnyRGB(c->dstFormat) && > > > +!isFloat(c->srcFormat) && !isFloat(c->dstFormat)) { > > > if (c->dstBpc <= 14) { > > > if (c->srcRange) { > > > c->lumConvertRange = lumRangeFromJpeg_c; > > > -- > > > 2.42.0 > > > > > > > This patchset works for me. Thanks for your quick fixing. > > Ping. When can this patchset be merged? Hi, do you still need this patch, now that YUV negotiation means vf_scale no longer changes the filter range dynamically? > > Thanks > Wenbin > > > > > ___ > > > ffmpeg-devel mailing list > > > ffmpeg-devel@ffmpeg.org > > > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > > > > > To unsubscribe, visit link above, or email > > > ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe". > ___ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > To unsubscribe, visit link above, or email > ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe". ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] Initial tickering at unifying ProRes encoder
On Sun, Dec 24, 2023 at 11:56:56AM +0100, Stefano Sabatini wrote: > On date Monday 2023-12-11 02:35:01 +0100, Clément Bœsch wrote: > > Hello there, > > > > I'm currently investigating an issue¹ affecting Kostya ProRes encoder > > which is not reproducible with Anatoliy encoder (but it's too early to > > say if the bug is not present there as well given the differences in > > quantization, and it's also unclear if the issue is even actually > > there in the first place and not in M2/M3 firmwares). > > > > Since these encoders share more than similiarities, I've been looking > > into their differences, and unifying their common codepaths was helpful > > to my investigation. > > > > Attached is an initial patchset working out their differences by either > > sharing data or making code identical where relevant. > > > > I will continue that work as the investigation progresses. The > > quantization work might require more involved changes though. > > > > Regards, > > > > ¹ https://trac.ffmpeg.org/ticket/10255 > > Hi Clement. > > Most patches look good to me. You can skip style comments in patches > 3, 4, 15 if they complicate the rebase. Patchset applied; I skipped the 2 out of the 3 cosmetics Thank you for the review -- Clément B. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [FFmpeg-cvslog] avfilter/buffersrc: add color_space/range parameters
On Wed, Jan 10, 2024 at 10:07:52AM +0100, Niklas Haas wrote: > On Sun, 07 Jan 2024 10:50:01 +0100 Michael Niedermayer > wrote: > > On Sun, Dec 31, 2023 at 09:49:43PM +, Niklas Haas wrote: > > > ffmpeg | branch: master | Niklas Haas | Fri Oct 20 > > > 16:55:43 2023 +0200| [2d555dc82d4ccd3c54c76e2fb3c861a8652de1c6] | > > > committer: Niklas Haas > > > > > > avfilter/buffersrc: add color_space/range parameters > > > > > > To allow adding proper negotiation, in particular, to fftools. > > > > > > These values will simply be negotiated downstream for YUV formats, and > > > ignored otherwise. > > > > > > > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=2d555dc82d4ccd3c54c76e2fb3c861a8652de1c6 > > > --- > > > > > > doc/filters.texi| 10 +++ > > > libavfilter/buffersrc.c | 75 > > > +++-- > > > libavfilter/buffersrc.h | 6 > > > 3 files changed, 83 insertions(+), 8 deletions(-) > > > > After this the command line tools print tons of warnings > > Sent a fix to the ML, thanks. > > > also iam still seeing a segfault i reported earlier, should i recheck which > > commit was causing that? > > Are you referring to the hwframes issue, the vaf issue, or something > else entirely? I need to recheck, i just saw some segfaults in swscale related tests and i think i reported it already a while ago ... thx [...] thx -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Breaking DRM is a little like attempting to break through a door even though the window is wide open and the only thing in the house is a bunch of things you dont want and which you would get tomorrow for free anyway signature.asc Description: PGP signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH v2] dvdvideo: add DVD-Video demuxer, powered by libdvdnav and libdvdread
Thank you, Nicolas. I had tinkered with concat this way in the past as PGCs are indeed just a bunch of segments mushed together, but I had run into issues specifically with (1) concerns about forced subtitles that pop up mid stream and (2) unable to figure out custom IO with it. Since dvdnav is driving the navigation and reading of the disc, I do not have the luxury of knowing VOB addresses for a perfect read of the title (without fully playing back). So I don’t have a list of files and sectors to give concat. As DVD also has cell commands that drive direction of the stream, this complicates it further. The structure revealed by dvdread alone is not enough to properly play back; the dvdnav VM plays a key role. Finally, I had also worry about oddities when having demuxer->submuxer->subsubdemuxer. In my approach (using mpeg demux directly) there doesn’t seem to be any issue with concatenation/handling the gaps, and I am flushing the subdemuxer when they occur. Just the GENPTS sticks out as being a non-ideal thing to do. That said, I will take another look and see if I misunderstood at the time. Best, On Wed, Jan 10, 2024 at 04:17 Nicolas George wrote: > Marth64 (12024-01-10): > > I will add that I still had to maintain a dependency on GENPTS for the > > inner MPEG demuxer. This is because dvdnav_get_current_time() does not > > provide exact stream-level PTS. However, the crashing/hanging is fixed > (by > > parsing NAV packets), and the output is produced smoothly. GENPTS fills > in > > the blanks. > > > > If anyone can think of a better way, please let me know. Right now, it > > works well. > > You could imitate what tools/dvd2concat does internally: use > libdvdread to get the structure of the DVD but let the concat demuxer > handle all the actual demuxing work. > > Regards, > > -- > Nicolas George > ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH v2] checkasm: Generalize crash handling
Looks OK (not tested). -- Rémi Denis-Courmont http://www.remlab.net/ ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH v2] dvdvideo: add DVD-Video demuxer, powered by libdvdnav and libdvdread
To elaborate slightly: GENPTS is working within each segment, whose start and end times I have from NAV packets On Wed, Jan 10, 2024 at 10:25 Marth64 wrote: > Thank you, Nicolas. I had tinkered with concat this way in the past as > PGCs are indeed just a bunch of segments mushed together, but I had run > into issues specifically with (1) concerns about forced subtitles that pop > up mid stream and (2) unable to figure out custom IO with it. Since dvdnav > is driving the navigation and reading of the disc, I do not have the luxury > of knowing VOB addresses for a perfect read of the title (without fully > playing back). So I don’t have a list of files and sectors to give concat. > As DVD also has cell commands that drive direction of the stream, this > complicates it further. The structure revealed by dvdread alone is not > enough to properly play back; the dvdnav VM plays a key role. Finally, I > had also worry about oddities when having demuxer->submuxer->subsubdemuxer. > > In my approach (using mpeg demux directly) there doesn’t seem to be any > issue with concatenation/handling the gaps, and I am flushing the > subdemuxer when they occur. Just the GENPTS sticks out as being a non-ideal > thing to do. > > That said, I will take another look and see if I misunderstood at the time. > > Best, > > On Wed, Jan 10, 2024 at 04:17 Nicolas George wrote: > >> Marth64 (12024-01-10): >> > I will add that I still had to maintain a dependency on GENPTS for the >> > inner MPEG demuxer. This is because dvdnav_get_current_time() does not >> > provide exact stream-level PTS. However, the crashing/hanging is fixed >> (by >> > parsing NAV packets), and the output is produced smoothly. GENPTS fills >> in >> > the blanks. >> > >> > If anyone can think of a better way, please let me know. Right now, it >> > works well. >> >> You could imitate what tools/dvd2concat does internally: use >> libdvdread to get the structure of the DVD but let the concat demuxer >> handle all the actual demuxing work. >> >> Regards, >> >> -- >> Nicolas George >> > ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [PATCH v2] web/index: fix invalid line breaks (BR)
Uses preferred convention for ffmpeg Signed-off-by: Marth64 --- src/index | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/index b/src/index index 98cc516..edf8100 100644 --- a/src/index +++ b/src/index @@ -113,11 +113,11 @@ Internally, we have had a number of changes too. The FFT, MDCT, DCT and DST implementation used for codecs -and filters has been fully replaced with the faster libavutil/tx (full article about it coming soon). -This also led to a reduction in the the size of the compiled binary, which can be noticeable in small builds. +and filters has been fully replaced with the faster libavutil/tx (full article about it coming soon). +This also led to a reduction in the the size of the compiled binary, which can be noticeable in small builds. There was a very large reduction in the total amount of allocations being done on each frame throughout video decoders, -reducing overhead. -RISC-V optimizations for many parts of our DSP code have been merged, with mainly the large decoders being left. +reducing overhead. +RISC-V optimizations for many parts of our DSP code have been merged, with mainly the large decoders being left. There was an effort to improve the correctness of timestamps and frame durations of each packet, increasing the accurracy of variable frame rate video. -- 2.34.1 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH] avformat/rtsp: Fix server compatibility issues with rtspclientsink GStreamer plugin
On 1/3/24 14:51, Paul Orlyk wrote: On 12/28/23 21:33, Michael Niedermayer wrote: On Wed, Dec 27, 2023 at 03:44:09PM +0200, Paul Orlyk wrote: mode field in Transport header can be sent in upper case so make string comparison case insensitive. Also, GStreamer expects to see mode=record instead of mode=receive in Transport header in response. Signed-off-by: Paul Orlyk --- libavformat/rtsp.c | 4 ++-- libavformat/rtspdec.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c index 583f5338e8..61e24a5c7a 100644 --- a/libavformat/rtsp.c +++ b/libavformat/rtsp.c @@ -1012,8 +1012,8 @@ static void rtsp_parse_transport(AVFormatContext *s, if (*p == '=') { p++; get_word_sep(buf, sizeof(buf), ";, ", &p); - if (!strcmp(buf, "record") || - !strcmp(buf, "receive")) + if (!av_strcasecmp(buf, "record") || + !av_strcasecmp(buf, "receive")) th->mode_record = 1; } } diff --git a/libavformat/rtspdec.c b/libavformat/rtspdec.c index 39fd92fb66..d6a223cbc6 100644 --- a/libavformat/rtspdec.c +++ b/libavformat/rtspdec.c @@ -303,7 +303,7 @@ static int rtsp_read_setup(AVFormatContext*s, char* host, char *controlurl) rtsp_st->interleaved_min = request.transports[0].interleaved_min; patch is damaged by linebreaks [...] Sorry for that. Please find it attached. Ping ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] Hardware purchase request: AVX512-capable laptop
On Wed, Jan 10, 2024 at 03:56:22AM +0100, Lynne wrote: > Jan 10, 2024, 03:31 by mich...@niedermayer.cc: > > > On Sat, Jan 06, 2024 at 06:42:40PM +0100, Michael Niedermayer wrote: > > > >> Hi > >> > >> On Wed, Jan 03, 2024 at 01:56:12AM +0100, Lynne wrote: > >> > As some of you know, my laptop died nearly 2 years ago, and > >> > >> Why/how did the laptop die ? > >> is it unrepearable ? > >> > > > > ping > > > > It was a 4th gen Thinkpad X1 Carbon. A few drops of water got in > between the caps lock before I noticed, by the time I did, it was too late. > Battery circuitry is dead so it only runs on AC, frequency controller is > dying so it runs at fixed Pentium II 350Mhz speeds, keyboard controller > sees keys pressed all the time, touchpad is dead, USB is dead. > The motherboard crammed essential components on the periphery > and non-essential replaceable components like wifi and 4g modem > right next to the CPU, so it was not great engineering. > It did live a long life for 7 years, but only the shell remains mostly usable. > I may not be able to put it back together as it was, since I lost some screws, > as I kept working on it for months. Sounds like corrosion, did you inspect it for signs of corrosion ? I guess it would need a new mainboard. and maybe other parts But it honestly doesnt sound like a few drops of water, you shure it was a few drops only and only water ? ;) I dumped a whole glass of water through my HP notebook once and after drying it still worked just with some occasional artifacts on screen Anyway iam not against buying you a new notebook from SPI-FFmpeg money But you need to find some consensus with the community, its not my decission its the decission of the community. I do think though a cheap notebook would be aggreed to by the people easier in case you dont know, theres: https://geizhals.eu/?cat=nb you can select the features you want and it will show you whats available for example with OLED and Zen 4 the cheapest is 799€ https://geizhals.eu/acer-swift-go-sfg14-42-r6vl-pure-silver-nx-kleeg-003-a2999043.html?hloc=at&hloc=de or if you dont like acer Theres a lenovo for 999 with oled and zen 4 https://geizhals.eu/lenovo-yoga-slim-6-14apu8-misty-grey-a3040258.html?hloc=at&hloc=de or with IPS instead of OLED theres https://geizhals.eu/lenovo-ideapad-pro-5-14aph8-arctic-grey-83amcto1wwat1-83amcto1wwde1-a3051616.html?hloc=at&hloc=de again, i know neither so they may be bad choices, i have HP and acer notebooks here all sub 1k € also i dont know what you need exactly. Maybe a remote zen 4 is fine? I did generally use my notebooks with FFmpeg by doing stuff remotely on a bigger box. Even if you have a rather powerfull notebook, some high end desktop is going to build and run tests much faster PS: also dont forget to look at the screen size, a 17inch notebook and a 14inch differ in useability and portability thx [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB If you think the mosad wants you dead since a long time then you are either wrong or dead since a long time. signature.asc Description: PGP signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH v2] doc/faq: Use texi's @tie instead of 0xA0 for non-breaking space
On date Monday 2024-01-08 20:46:51 +0100, Stefano Sabatini wrote: > On date Sunday 2024-01-07 09:29:24 -0600, Marth64 wrote: > > Nice find! Updated. Looks good here when rendered to HTML. > > > > Signed-off-by: Marth64 > > --- > > doc/faq.texi | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/doc/faq.texi b/doc/faq.texi > > index 5998e0d000..477cc60533 100644 > > --- a/doc/faq.texi > > +++ b/doc/faq.texi > > @@ -450,7 +450,7 @@ work with streams that were detected during the initial > > scan; streams that > > are detected later are ignored. > > > > The size of the initial scan is controlled by two options: @code{probesize} > > -(default ~5 Mo) and @code{analyzeduration} (default 5,000,000 µs = 5 s). > > For > > +(default ~5@tie{}Mo) and @code{analyzeduration} (default 5,000,000@tie{}µs > > = 5@tie{}s). For > > the subtitle stream to be detected, both values must be large enough. > > > > @section Why was the @command{ffmpeg} @option{-sameq} option removed? What > > to use instead? > > LGTM, will apply soon if I see no comments. Applied. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH] doc/muxers: add ass
On date Monday 2024-01-08 20:48:51 +0100, Stefano Sabatini wrote: > --- > doc/muxers.texi | 13 + > 1 file changed, 13 insertions(+) Applied this one and the previous doc/muxers patches. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH 5/5] avcodec/proresenc_anatoliy: do not write into chroma reserved bitfields
Ping on this last patch. -- Clément B. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH v3] avformat/mov: Add support for demuxing still HEIC images
On Tue, Jan 9, 2024 at 4:39 AM James Almer wrote: > > On 10/4/2023 1:40 PM, Vignesh Venkatasubramanian via ffmpeg-devel wrote: > > They are similar to AVIF images (both use the HEIF container). > > The only additional work needed is to parse the hvcC box and put > > it in the extradata. > > > > With this patch applied, ffmpeg (when built with an HEVC decoder) > > is able to decode the files in > > https://github.com/nokiatech/heif/tree/gh-pages/content/images > > > > Also add a couple of fate tests with samples from > > https://github.com/nokiatech/heif_conformance/tree/master/conformance_files > > > > Partially fixes trac ticket #6521. > > > > Signed-off-by: Vignesh Venkatasubramanian > > --- > > libavformat/isom.h| 2 + > > libavformat/mov.c | 41 ++- > > tests/fate/mov.mak| 6 +++ > > .../fate/mov-heic-demux-still-image-1-item| 11 + > > .../mov-heic-demux-still-image-multiple-items | 11 + > > 5 files changed, 70 insertions(+), 1 deletion(-) > > create mode 100644 tests/ref/fate/mov-heic-demux-still-image-1-item > > create mode 100644 > > tests/ref/fate/mov-heic-demux-still-image-multiple-items > > This seems to have been forgotten, so I'll apply it soon. Sorry that was my bad. Thanks for applying. > ___ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > To unsubscribe, visit link above, or email > ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe". -- Vignesh ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH 1/2] avformat/mov: rename avif fields to heif
On Tue, Jan 9, 2024 at 11:56 AM James Almer wrote: > > They are no longer avif specific. > > Signed-off-by: James Almer > --- > libavformat/isom.h | 4 ++-- > libavformat/mov.c | 28 ++-- > 2 files changed, 16 insertions(+), 16 deletions(-) > > diff --git a/libavformat/isom.h b/libavformat/isom.h > index b30b9da65e..90c4fb5530 100644 > --- a/libavformat/isom.h > +++ b/libavformat/isom.h > @@ -325,8 +325,8 @@ typedef struct MOVContext { > int item_id; > int extent_length; > int64_t extent_offset; > -} *avif_info; > -int avif_info_size; > +} *heif_info; > +int heif_info_size; > int64_t hvcC_offset; > int hvcC_size; > int interleaved_read; > diff --git a/libavformat/mov.c b/libavformat/mov.c > index c6398d6d81..12e82c66a9 100644 > --- a/libavformat/mov.c > +++ b/libavformat/mov.c > @@ -4916,15 +4916,15 @@ static int mov_read_custom(MOVContext *c, AVIOContext > *pb, MOVAtom atom) > return ret; > } > > -static int avif_add_stream(MOVContext *c, int item_id) > +static int heif_add_stream(MOVContext *c, int item_id) > { > MOVStreamContext *sc; > AVStream *st; > int item_index = -1; > if (c->fc->nb_streams) > return AVERROR_INVALIDDATA; > -for (int i = 0; i < c->avif_info_size; i++) > -if (c->avif_info[i].item_id == item_id) { > +for (int i = 0; i < c->heif_info_size; i++) > +if (c->heif_info[i].item_id == item_id) { > item_index = i; > break; > } > @@ -4987,8 +4987,8 @@ static int avif_add_stream(MOVContext *c, int item_id) > sc->stts_data[0].count = 1; > // Not used for still images. But needed by mov_build_index. > sc->stts_data[0].duration = 0; > -sc->sample_sizes[0] = c->avif_info[item_index].extent_length; > -sc->chunk_offsets[0] = c->avif_info[item_index].extent_offset; > +sc->sample_sizes[0] = c->heif_info[item_index].extent_length; > +sc->chunk_offsets[0] = c->heif_info[item_index].extent_offset; > > mov_build_index(c, st); > return 0; > @@ -5013,7 +5013,7 @@ static int mov_read_meta(MOVContext *c, AVIOContext > *pb, MOVAtom atom) > if (c->is_still_picture_avif) { > int ret; > // Add a stream for the YUV planes (primary item). > -if ((ret = avif_add_stream(c, c->primary_item_id)) < 0) > +if ((ret = heif_add_stream(c, c->primary_item_id)) < 0) > return ret; > // For still AVIF images, the meta box contains all the > // necessary information that would generally be provided by > the > @@ -7820,7 +7820,7 @@ static int mov_read_iloc(MOVContext *c, AVIOContext > *pb, MOVAtom atom) > return 0; > } > > -if (c->avif_info) { > +if (c->heif_info) { > av_log(c->fc, AV_LOG_INFO, "Duplicate iloc box found\n"); > return 0; > } > @@ -7841,16 +7841,16 @@ static int mov_read_iloc(MOVContext *c, AVIOContext > *pb, MOVAtom atom) > } > item_count = (version < 2) ? avio_rb16(pb) : avio_rb32(pb); > > -c->avif_info = av_malloc_array(item_count, sizeof(*c->avif_info)); > -if (!c->avif_info) > +c->heif_info = av_malloc_array(item_count, sizeof(*c->heif_info)); > +if (!c->heif_info) > return AVERROR(ENOMEM); > -c->avif_info_size = item_count; > +c->heif_info_size = item_count; > > for (int i = 0; i < item_count; i++) { > int item_id = (version < 2) ? avio_rb16(pb) : avio_rb32(pb); > if (avio_feof(pb)) > return AVERROR_INVALIDDATA; > -c->avif_info[i].item_id = item_id; > +c->heif_info[i].item_id = item_id; > > if (version > 0) > avio_rb16(pb); // construction_method. > @@ -7867,8 +7867,8 @@ static int mov_read_iloc(MOVContext *c, AVIOContext > *pb, MOVAtom atom) > if (rb_size(pb, &extent_offset, offset_size) < 0 || > rb_size(pb, &extent_length, length_size) < 0) > return AVERROR_INVALIDDATA; > -c->avif_info[i].extent_length = extent_length; > -c->avif_info[i].extent_offset = base_offset + extent_offset; > +c->heif_info[i].extent_length = extent_length; > +c->heif_info[i].extent_offset = base_offset + extent_offset; > } > } > > @@ -8502,7 +8502,7 @@ static int mov_read_close(AVFormatContext *s) > > av_freep(&mov->aes_decrypt); > av_freep(&mov->chapter_tracks); > -av_freep(&mov->avif_info); > +av_freep(&mov->heif_info); > > return 0; > } > -- > 2.43.0 > > ___ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > To unsubscribe, visit link above, or email > ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe". lgtm -- Vignesh ___ ffmpeg-de
[FFmpeg-devel] [PATCH 2/4] doc/muxers: add ast
--- doc/muxers.texi | 24 1 file changed, 24 insertions(+) diff --git a/doc/muxers.texi b/doc/muxers.texi index c8b2bcdea6..fee8321eab 100644 --- a/doc/muxers.texi +++ b/doc/muxers.texi @@ -763,6 +763,30 @@ default is @code{false}, otherwise they are cached until the expected time event is found. @end table +@section ast +AST (Audio Stream) muxer. + +This format is used to play audio on some Nintendo Wii games. + +It accepts a single audio stream. + +The @option{loopstart} and @option{loopend} options can be used to +define a section of the file to loop for players honoring such +options. + +@subsection Options +@table @option +@item loopstart @var{start} +Specify loop start position expressesd in milliseconds, from @code{-1} +to @code{INT_MAX}, in case @code{-1} is set then no loop is specified +(default -1) and the @option{loopend} value is ignored. + +@item loopend @var{end} +Specify loop end position expressed in milliseconds, from @code{0} to +@code{INT_MAX}, default is @code{0}, in case @code{0} is set it +assumes the total stream duration. +@end table + @anchor{avi} @section avi -- 2.34.1 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [PATCH 1/4] lavf/astenc: fix weird indent, use braces in else statements
Braces are employed to improve readability. --- libavformat/astenc.c | 16 +--- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/libavformat/astenc.c b/libavformat/astenc.c index 259948b276..250a54b573 100644 --- a/libavformat/astenc.c +++ b/libavformat/astenc.c @@ -143,14 +143,16 @@ static int ast_write_trailer(AVFormatContext *s) /* Loopstart if provided */ if (ast->loopstart > 0) { -if (ast->loopstart >= samples) { -av_log(s, AV_LOG_WARNING, "Loopstart value is out of range and will be ignored\n"); -ast->loopstart = -1; -avio_skip(pb, 4); -} else -avio_wb32(pb, ast->loopstart); -} else +if (ast->loopstart >= samples) { +av_log(s, AV_LOG_WARNING, "Loopstart value is out of range and will be ignored\n"); +ast->loopstart = -1; +avio_skip(pb, 4); +} else { +avio_wb32(pb, ast->loopstart); +} +} else { avio_skip(pb, 4); +} /* Loopend if provided. Otherwise number of samples again */ if (ast->loopend && ast->loopstart >= 0) { -- 2.34.1 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [PATCH 3/4] doc/muxers: add au
--- doc/muxers.texi | 5 + 1 file changed, 5 insertions(+) diff --git a/doc/muxers.texi b/doc/muxers.texi index fee8321eab..7ed5ed50a5 100644 --- a/doc/muxers.texi +++ b/doc/muxers.texi @@ -787,6 +787,11 @@ Specify loop end position expressed in milliseconds, from @code{0} to assumes the total stream duration. @end table +@section au +SUN AU audio muxer. + +It accepts a single audio stream. + @anchor{avi} @section avi -- 2.34.1 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [PATCH 4/4] doc/muxers/avi: apply misc changes
In particular: * sort options by name * apply misc formatting and consistency fixes * add introduction explaining the need to set some options --- doc/muxers.texi | 28 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/doc/muxers.texi b/doc/muxers.texi index 7ed5ed50a5..1c88816c3c 100644 --- a/doc/muxers.texi +++ b/doc/muxers.texi @@ -794,15 +794,24 @@ It accepts a single audio stream. @anchor{avi} @section avi - Audio Video Interleaved muxer. -@subsection Options +AVI is a proprietary format developed by Microsoft, and later formally specified +through the Open DML specification. -It accepts the following options: +Because of differences in players implementations, it might be required to set +some options to make sure that the generated output can be correctly played by +the target player. +@subsection Options @table @option -@item reserve_index_space +@item flipped_raw_rgb @var{bool} +If set to @code{true}, store positive height for raw RGB bitmaps, which +indicates bitmap is stored bottom-up. Note that this option does not flip the +bitmap which has to be done manually beforehand, e.g. by using the @samp{vflip} +filter. Default is @code{false} and indicates bitmap is stored top down. + +@item reserve_index_space @var{size} Reserve the specified amount of bytes for the OpenDML master index of each stream within the file header. By default additional master indexes are embedded within the data packets if there is no space left in the first master @@ -815,20 +824,15 @@ The required index space depends on the output file size and should be about 16 bytes per gigabyte. When this option is omitted or set to zero the necessary index space is guessed. -@item write_channel_mask +Default value is @code{0}. + +@item write_channel_mask @var{bool} Write the channel layout mask into the audio stream header. This option is enabled by default. Disabling the channel mask can be useful in specific scenarios, e.g. when merging multiple audio streams into one for compatibility with software that only supports a single audio stream in AVI (see @ref{amerge,,the "amerge" section in the ffmpeg-filters manual,ffmpeg-filters}). - -@item flipped_raw_rgb -If set to true, store positive height for raw RGB bitmaps, which indicates -bitmap is stored bottom-up. Note that this option does not flip the bitmap -which has to be done manually beforehand, e.g. by using the vflip filter. -Default is @var{false} and indicates bitmap is stored top down. - @end table @anchor{chromaprint} -- 2.34.1 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [PATCH 2/4] doc/muxers: add ast
--- doc/muxers.texi | 24 1 file changed, 24 insertions(+) diff --git a/doc/muxers.texi b/doc/muxers.texi index c8b2bcdea6..fee8321eab 100644 --- a/doc/muxers.texi +++ b/doc/muxers.texi @@ -763,6 +763,30 @@ default is @code{false}, otherwise they are cached until the expected time event is found. @end table +@section ast +AST (Audio Stream) muxer. + +This format is used to play audio on some Nintendo Wii games. + +It accepts a single audio stream. + +The @option{loopstart} and @option{loopend} options can be used to +define a section of the file to loop for players honoring such +options. + +@subsection Options +@table @option +@item loopstart @var{start} +Specify loop start position expressesd in milliseconds, from @code{-1} +to @code{INT_MAX}, in case @code{-1} is set then no loop is specified +(default -1) and the @option{loopend} value is ignored. + +@item loopend @var{end} +Specify loop end position expressed in milliseconds, from @code{0} to +@code{INT_MAX}, default is @code{0}, in case @code{0} is set it +assumes the total stream duration. +@end table + @anchor{avi} @section avi -- 2.34.1 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [PATCH 3/4] doc/muxers: add au
--- doc/muxers.texi | 5 + 1 file changed, 5 insertions(+) diff --git a/doc/muxers.texi b/doc/muxers.texi index fee8321eab..7ed5ed50a5 100644 --- a/doc/muxers.texi +++ b/doc/muxers.texi @@ -787,6 +787,11 @@ Specify loop end position expressed in milliseconds, from @code{0} to assumes the total stream duration. @end table +@section au +SUN AU audio muxer. + +It accepts a single audio stream. + @anchor{avi} @section avi -- 2.34.1 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [PATCH 4/4] doc/muxers/avi: apply misc changes
In particular: * sort options by name * apply misc formatting and consistency fixes * add introduction explaining the need to set some options --- doc/muxers.texi | 28 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/doc/muxers.texi b/doc/muxers.texi index 7ed5ed50a5..1c88816c3c 100644 --- a/doc/muxers.texi +++ b/doc/muxers.texi @@ -794,15 +794,24 @@ It accepts a single audio stream. @anchor{avi} @section avi - Audio Video Interleaved muxer. -@subsection Options +AVI is a proprietary format developed by Microsoft, and later formally specified +through the Open DML specification. -It accepts the following options: +Because of differences in players implementations, it might be required to set +some options to make sure that the generated output can be correctly played by +the target player. +@subsection Options @table @option -@item reserve_index_space +@item flipped_raw_rgb @var{bool} +If set to @code{true}, store positive height for raw RGB bitmaps, which +indicates bitmap is stored bottom-up. Note that this option does not flip the +bitmap which has to be done manually beforehand, e.g. by using the @samp{vflip} +filter. Default is @code{false} and indicates bitmap is stored top down. + +@item reserve_index_space @var{size} Reserve the specified amount of bytes for the OpenDML master index of each stream within the file header. By default additional master indexes are embedded within the data packets if there is no space left in the first master @@ -815,20 +824,15 @@ The required index space depends on the output file size and should be about 16 bytes per gigabyte. When this option is omitted or set to zero the necessary index space is guessed. -@item write_channel_mask +Default value is @code{0}. + +@item write_channel_mask @var{bool} Write the channel layout mask into the audio stream header. This option is enabled by default. Disabling the channel mask can be useful in specific scenarios, e.g. when merging multiple audio streams into one for compatibility with software that only supports a single audio stream in AVI (see @ref{amerge,,the "amerge" section in the ffmpeg-filters manual,ffmpeg-filters}). - -@item flipped_raw_rgb -If set to true, store positive height for raw RGB bitmaps, which indicates -bitmap is stored bottom-up. Note that this option does not flip the bitmap -which has to be done manually beforehand, e.g. by using the vflip filter. -Default is @var{false} and indicates bitmap is stored top down. - @end table @anchor{chromaprint} -- 2.34.1 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [PATCH 1/4] lavf/astenc: fix weird indent, use braces in else statements
Braces are employed to improve readability. --- libavformat/astenc.c | 16 +--- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/libavformat/astenc.c b/libavformat/astenc.c index 259948b276..250a54b573 100644 --- a/libavformat/astenc.c +++ b/libavformat/astenc.c @@ -143,14 +143,16 @@ static int ast_write_trailer(AVFormatContext *s) /* Loopstart if provided */ if (ast->loopstart > 0) { -if (ast->loopstart >= samples) { -av_log(s, AV_LOG_WARNING, "Loopstart value is out of range and will be ignored\n"); -ast->loopstart = -1; -avio_skip(pb, 4); -} else -avio_wb32(pb, ast->loopstart); -} else +if (ast->loopstart >= samples) { +av_log(s, AV_LOG_WARNING, "Loopstart value is out of range and will be ignored\n"); +ast->loopstart = -1; +avio_skip(pb, 4); +} else { +avio_wb32(pb, ast->loopstart); +} +} else { avio_skip(pb, 4); +} /* Loopend if provided. Otherwise number of samples again */ if (ast->loopend && ast->loopstart >= 0) { -- 2.34.1 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH 5/5] avcodec/proresenc_anatoliy: do not write into chroma reserved bitfields
On date Sunday 2024-01-07 19:16:47 +0100, Clément Bœsch wrote: > The layout for the frame flags is as follow: > >chroma_format u(2) >reserved u(2) >interlace_mode u(2) >reserved u(2) > > chroma_format has 2 allowed values: >0: reserved >1: reserved >2: 4:2:2 >3: 4:4:4 > > interlace_mode has 3 allowed values: >0: progressive >1: tff >2: bff >3: reserved > > 0x80 is what we expect for "422 not interlaced", and the extra 0x2 from > 0x82 is actually writting into the reserved bits. nit: writting typo > --- > libavcodec/proresenc_anatoliy.c | 2 +- > tests/ref/vsynth/vsynth1-prores | 2 +- > tests/ref/vsynth/vsynth1-prores_444 | 2 +- > tests/ref/vsynth/vsynth1-prores_444_int | 2 +- > tests/ref/vsynth/vsynth1-prores_int | 2 +- > tests/ref/vsynth/vsynth2-prores | 2 +- > tests/ref/vsynth/vsynth2-prores_444 | 2 +- > tests/ref/vsynth/vsynth2-prores_444_int | 2 +- > tests/ref/vsynth/vsynth2-prores_int | 2 +- > tests/ref/vsynth/vsynth3-prores | 2 +- > tests/ref/vsynth/vsynth3-prores_444 | 2 +- > tests/ref/vsynth/vsynth3-prores_444_int | 2 +- > tests/ref/vsynth/vsynth3-prores_int | 2 +- > tests/ref/vsynth/vsynth_lena-prores | 2 +- > tests/ref/vsynth/vsynth_lena-prores_444 | 2 +- > tests/ref/vsynth/vsynth_lena-prores_444_int | 2 +- > tests/ref/vsynth/vsynth_lena-prores_int | 2 +- > 17 files changed, 17 insertions(+), 17 deletions(-) > > diff --git a/libavcodec/proresenc_anatoliy.c b/libavcodec/proresenc_anatoliy.c > index 1112cb26f1..bee4a14181 100644 > --- a/libavcodec/proresenc_anatoliy.c > +++ b/libavcodec/proresenc_anatoliy.c > @@ -769,7 +769,7 @@ static int prores_encode_frame(AVCodecContext *avctx, > AVPacket *pkt, > bytestream_put_buffer(&buf, ctx->vendor, 4); > bytestream_put_be16(&buf, avctx->width); > bytestream_put_be16(&buf, avctx->height); > -frame_flags = 0x82; /* 422 not interlaced */ > +frame_flags = 0x80; /* 422 not interlaced */ LGTM, thanks. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH 4/4] doc/muxers/avi: apply misc changes
LGTM On Wed, Jan 10, 2024 at 3:38 PM Stefano Sabatini wrote: > In particular: > * sort options by name > * apply misc formatting and consistency fixes > * add introduction explaining the need to set some options > --- > doc/muxers.texi | 28 > 1 file changed, 16 insertions(+), 12 deletions(-) > > diff --git a/doc/muxers.texi b/doc/muxers.texi > index 7ed5ed50a5..1c88816c3c 100644 > --- a/doc/muxers.texi > +++ b/doc/muxers.texi > @@ -794,15 +794,24 @@ It accepts a single audio stream. > > @anchor{avi} > @section avi > - > Audio Video Interleaved muxer. > > -@subsection Options > +AVI is a proprietary format developed by Microsoft, and later formally > specified > +through the Open DML specification. > > -It accepts the following options: > +Because of differences in players implementations, it might be required > to set > +some options to make sure that the generated output can be correctly > played by > +the target player. > > +@subsection Options > @table @option > -@item reserve_index_space > +@item flipped_raw_rgb @var{bool} > +If set to @code{true}, store positive height for raw RGB bitmaps, which > +indicates bitmap is stored bottom-up. Note that this option does not flip > the > +bitmap which has to be done manually beforehand, e.g. by using the > @samp{vflip} > +filter. Default is @code{false} and indicates bitmap is stored top down. > + > +@item reserve_index_space @var{size} > Reserve the specified amount of bytes for the OpenDML master index of each > stream within the file header. By default additional master indexes are > embedded within the data packets if there is no space left in the first > master > @@ -815,20 +824,15 @@ The required index space depends on the output file > size and should be about 16 > bytes per gigabyte. When this option is omitted or set to zero the > necessary > index space is guessed. > > -@item write_channel_mask > +Default value is @code{0}. > + > +@item write_channel_mask @var{bool} > Write the channel layout mask into the audio stream header. > > This option is enabled by default. Disabling the channel mask can be > useful in > specific scenarios, e.g. when merging multiple audio streams into one for > compatibility with software that only supports a single audio stream in > AVI > (see @ref{amerge,,the "amerge" section in the ffmpeg-filters > manual,ffmpeg-filters}). > - > -@item flipped_raw_rgb > -If set to true, store positive height for raw RGB bitmaps, which indicates > -bitmap is stored bottom-up. Note that this option does not flip the bitmap > -which has to be done manually beforehand, e.g. by using the vflip filter. > -Default is @var{false} and indicates bitmap is stored top down. > - > @end table > > @anchor{chromaprint} > -- > 2.34.1 > > ___ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > To unsubscribe, visit link above, or email > ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe". > ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH 5/5] avcodec/proresenc_anatoliy: do not write into chroma reserved bitfields
On Wed, Jan 10, 2024 at 10:43:59PM +0100, Stefano Sabatini wrote: > > 0x82 is actually writting into the reserved bits. > > nit: writting typo [...] > LGTM, thanks. Fixed the typo and applied the patchset. Thank you -- Clément B. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH] avutil/eval: Use even better PRNG
On date Tuesday 2024-01-09 02:55:21 +0100, Michael Niedermayer wrote: > This is the 64bit version of Chris Doty-Humphreys SFC64 > > Compared to the LCGs these produce much better quality numbers. > Compared to LFGs this needs less state. (our LFG has 224 byte > state for its 32bit version) this has 32byte state > Also the initialization for our LFG is slower. > This is also much faster than KISS or PCG. > > This could be merged with the change to integer LCG > Also a few fate tests need an update. I will update fate if SFC64 > is the chosen PRNG > > Signed-off-by: Michael Niedermayer > --- > libavutil/eval.c| 26 > libavutil/sfc64.h | 59 + > tests/ref/fate/eval | 2 +- > 3 files changed, 76 insertions(+), 11 deletions(-) cool :-) > create mode 100644 libavutil/sfc64.h > > diff --git a/libavutil/eval.c b/libavutil/eval.c > index 9d41140056c..d15becf9cda 100644 > --- a/libavutil/eval.c > +++ b/libavutil/eval.c > @@ -33,6 +33,7 @@ > #include "eval.h" > #include "ffmath.h" > #include "internal.h" > +#include "sfc64.h" nit: sort order > #include "log.h" > #include "mathematics.h" > #include "time.h" > @@ -55,7 +56,7 @@ typedef struct Parser { > void *log_ctx; > #define VARS 10 > double *var; > -uint64_t *var_uint64; > +SFC64 *prng_state; > } Parser; this is on top of another patch I guess > > static const AVClass eval_class = { > @@ -174,7 +175,7 @@ struct AVExpr { > } a; > struct AVExpr *param[3]; > double *var; > -uint64_t *var_uint64; > +SFC64 *prng_state; > }; > > static double etime(double v) > @@ -233,10 +234,15 @@ static double eval_expr(Parser *p, AVExpr *e) > > #define COMPUTE_NEXT_RANDOM()\ > int idx = av_clip(eval_expr(p, e->param[0]), 0, VARS-1); \ > -uint64_t r = p->var_uint64[idx] ? p->var_uint64[idx] : > (isnan(p->var[idx]) ? 0 : p->var[idx]);\ > -r = r * 1664525 + 1013904223;\ > +SFC64 *s = p->prng_state + idx; \ > +uint64_t r; \ > + \ > +if (!s->counter) { \ > +r = isnan(p->var[idx]) ? 0 : p->var[idx];\ > +sfc64_init(s, r, r, r, 12); \ for the record, why 12? > +}\ > +r = sfc64_get(s);\ > p->var[idx] = r; \ > -p->var_uint64[idx]= r; > > case e_random: { > COMPUTE_NEXT_RANDOM(); > @@ -334,7 +340,7 @@ static double eval_expr(Parser *p, AVExpr *e) > case e_last:return e->value * d2; > case e_st : { > int index = av_clip(d, 0, VARS-1); > -p->var_uint64[index] = 0; > +p->prng_state[index].counter = 0; I wonder if we should have a dedicated strandom() (or randomst) function to store the value (and deprecate st for setting the random seed, now that we are using a separated variable to store the state) - not blocking though > return e->value * (p->var[index]= d2); > } > case e_hypot:return e->value * hypot(d, d2); > @@ -356,7 +362,7 @@ void av_expr_free(AVExpr *e) > av_expr_free(e->param[1]); > av_expr_free(e->param[2]); > av_freep(&e->var); > -av_freep(&e->var_uint64); > +av_freep(&e->prng_state); > av_freep(&e); > } > > @@ -744,8 +750,8 @@ int av_expr_parse(AVExpr **expr, const char *s, > goto end; > } > e->var= av_mallocz(sizeof(double) *VARS); > -e->var_uint64= av_mallocz(sizeof(uint64_t) *VARS); > -if (!e->var || !e->var_uint64) { > +e->prng_state = av_mallocz(sizeof(*e->prng_state) *VARS); > +if (!e->var || !e->prng_state) { > ret = AVERROR(ENOMEM); > goto end; > } > @@ -787,7 +793,7 @@ double av_expr_eval(AVExpr *e, const double > *const_values, void *opaque) > { > Parser p = { 0 }; > p.var= e->var; > -p.var_uint64= e->var_uint64; > +p.prng_state= e->prng_state; > > p.const_values = const_values; > p.opaque = opaque; > diff --git a/libavutil/sfc64.h b/libavutil/sfc64.h > new file mode 100644 > index 000..25bc43abef1 > --- /dev/null > +++ b/libavutil/sfc64.h > @@ -0,0 +1,59 @@ > +/* > + * Copyright (c) 2024 Michael Niedermayer > + * > + * This file is part of FFmpeg. > + * > + * FFmpeg is free software; you can redistribute it and/or > + * modify it under the terms of the GNU Lesser General Public > + * License as published by the Free Software Foundation; either > + * version 2.1 of
Re: [FFmpeg-devel] [PATCH] avutil/eval: Use even better PRNG
On Wed, Jan 10, 2024 at 11:48:33PM +0100, Stefano Sabatini wrote: > On date Tuesday 2024-01-09 02:55:21 +0100, Michael Niedermayer wrote: [...] > > > > static const AVClass eval_class = { > > @@ -174,7 +175,7 @@ struct AVExpr { > > } a; > > struct AVExpr *param[3]; > > double *var; > > -uint64_t *var_uint64; > > +SFC64 *prng_state; > > }; > > > > static double etime(double v) > > @@ -233,10 +234,15 @@ static double eval_expr(Parser *p, AVExpr *e) > > > > #define COMPUTE_NEXT_RANDOM()\ > > int idx = av_clip(eval_expr(p, e->param[0]), 0, VARS-1); \ > > -uint64_t r = p->var_uint64[idx] ? p->var_uint64[idx] : > > (isnan(p->var[idx]) ? 0 : p->var[idx]);\ > > -r = r * 1664525 + 1013904223;\ > > +SFC64 *s = p->prng_state + idx; \ > > +uint64_t r; \ > > + \ > > +if (!s->counter) { \ > > +r = isnan(p->var[idx]) ? 0 : p->var[idx];\ > > > +sfc64_init(s, r, r, r, 12); \ > > for the record, why 12? The reference has 3 init functions * one that uses one seed for the 3 parameters, it uses 12 rounds * one that uses 3 seperate seeds that uses 18 rounds * one that has "fast" in its name and does 8 rounds with one seed in 3 parameters I will document this better [...] > > return e->value * (p->var[index]= d2); > > } > > case e_hypot:return e->value * hypot(d, d2); > > @@ -356,7 +362,7 @@ void av_expr_free(AVExpr *e) > > av_expr_free(e->param[1]); > > av_expr_free(e->param[2]); > > av_freep(&e->var); > > -av_freep(&e->var_uint64); > > +av_freep(&e->prng_state); > > av_freep(&e); > > } > > > > @@ -744,8 +750,8 @@ int av_expr_parse(AVExpr **expr, const char *s, > > goto end; > > } > > e->var= av_mallocz(sizeof(double) *VARS); > > -e->var_uint64= av_mallocz(sizeof(uint64_t) *VARS); > > -if (!e->var || !e->var_uint64) { > > +e->prng_state = av_mallocz(sizeof(*e->prng_state) *VARS); > > +if (!e->var || !e->prng_state) { > > ret = AVERROR(ENOMEM); > > goto end; > > } > > @@ -787,7 +793,7 @@ double av_expr_eval(AVExpr *e, const double > > *const_values, void *opaque) > > { > > Parser p = { 0 }; > > p.var= e->var; > > -p.var_uint64= e->var_uint64; > > +p.prng_state= e->prng_state; > > > > p.const_values = const_values; > > p.opaque = opaque; > > diff --git a/libavutil/sfc64.h b/libavutil/sfc64.h > > new file mode 100644 > > index 000..25bc43abef1 > > --- /dev/null > > +++ b/libavutil/sfc64.h > > @@ -0,0 +1,59 @@ > > +/* > > + * Copyright (c) 2024 Michael Niedermayer > > + * > > + * This file is part of FFmpeg. > > + * > > + * FFmpeg is free software; you can redistribute it and/or > > + * modify it under the terms of the GNU Lesser General Public > > + * License as published by the Free Software Foundation; either > > + * version 2.1 of the License, or (at your option) any later version. > > + * > > + * FFmpeg is distributed in the hope that it will be useful, > > + * but WITHOUT ANY WARRANTY; without even the implied warranty of > > + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU > > + * Lesser General Public License for more details. > > + * > > + * You should have received a copy of the GNU Lesser General Public > > + * License along with FFmpeg; if not, write to the Free Software > > + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA > > 02110-1301 USA > > + * > > > + * This is a implementation of SFC64 a 64-bit PRNG by Chris Doty-Humphrey. > > nit: This is a implementation of SFC64, a 64-bit PRNG by Chris Doty-Humphrey. > > > + * > > + * This Generator is much faster (0m1.872s) than 64bit KISS (0m3.823s) and > > PCG-XSH-RR-64/32 (0m2.700s) > > what are these benchmarks against? a loop that computes alot of random numbers and at the end prints their sum. The behavior was btw quite different if the numbers are not summed and printed as the compiler can then optimize some things out but noone would run a PRNG and not use the values. [...] > > +static inline uint64_t sfc64_get(SFC64 *s) { > > +uint64_t tmp = s->a + s->b + s->counter++; > > +s->a = s->b ^ (s->b >> 11); > > +s->b = s->c + (s->c << 3); // This is a multiply by 9 > > +s->c = ((s->c << 24) | (s->c >> 40)) + tmp; > > +return tmp; > > +} > > + > > +static inline void sfc64_init(SFC64 *s, uint64_t seeda, uint64_t seedb, > > uint64_t seedc, int rounds) { > > +s->a = seeda; > > +s->b = seedb; > > +s->c = seedc; > > +s->counter = 1; > > +while (rounds--) > > +
Re: [FFmpeg-devel] [PATCH 1/3] swscale: don't assign range converters for float
> On Mon, 27 Nov 2023 02:10:11 + "Chen, Wenbin" intel@ffmpeg.org> wrote: > > > > From: Niklas Haas > > > > > > > > This logic was incongruent with logic used elsewhere, where floating > > > > point formats are explicitly exempted from range conversion. Fixes an > > > > issue where floating point formats were not going through special > > > > unscaled converters even when it was otherwise possible. > > > > --- > > > > libswscale/swscale.c | 3 ++- > > > > 1 file changed, 2 insertions(+), 1 deletion(-) > > > > > > > > diff --git a/libswscale/swscale.c b/libswscale/swscale.c > > > > index 46ba68fe6a..a66db22767 100644 > > > > --- a/libswscale/swscale.c > > > > +++ b/libswscale/swscale.c > > > > @@ -534,7 +534,8 @@ av_cold void > ff_sws_init_range_convert(SwsContext > > > > *c) > > > > { > > > > c->lumConvertRange = NULL; > > > > c->chrConvertRange = NULL; > > > > -if (c->srcRange != c->dstRange && !isAnyRGB(c->dstFormat)) { > > > > +if (c->srcRange != c->dstRange && !isAnyRGB(c->dstFormat) && > > > > +!isFloat(c->srcFormat) && !isFloat(c->dstFormat)) { > > > > if (c->dstBpc <= 14) { > > > > if (c->srcRange) { > > > > c->lumConvertRange = lumRangeFromJpeg_c; > > > > -- > > > > 2.42.0 > > > > > > > > > > This patchset works for me. Thanks for your quick fixing. > > > > Ping. When can this patchset be merged? > > Hi, do you still need this patch, now that YUV negotiation means > vf_scale no longer changes the filter range dynamically? The problem is not solved. Command " ffmpeg -i input.png -vf format=grayf32,format=gray8 output.png " still reports error: "Assertion c->srcBpc == 16 failed at libswscale/x86/swscale.c:533" After I add --disable-sse2, the problem is unseen. > > > > > Thanks > > Wenbin > > > > > > > ___ > > > > ffmpeg-devel mailing list > > > > ffmpeg-devel@ffmpeg.org > > > > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > > > > > > > To unsubscribe, visit link above, or email > > > > ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe". > > ___ > > ffmpeg-devel mailing list > > ffmpeg-devel@ffmpeg.org > > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > > > To unsubscribe, visit link above, or email > > ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe". > ___ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > To unsubscribe, visit link above, or email > ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe". ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH 4/4] fate: add raw IAMF tests
On Wed, Jan 10, 2024 at 09:52:28AM -0300, James Almer wrote: > On 1/10/2024 12:05 AM, Michael Niedermayer wrote: > > On Sun, Jan 07, 2024 at 06:31:00PM -0300, James Almer wrote: > > > Covers muxing from raw pcm audio input into FLAC, using several scalable > > > layouts, > > > and demuxing the result. > > > > > > Signed-off-by: James Almer > > > --- > > > tests/Makefile | 7 +- > > > tests/fate/iamf.mak| 31 ++ > > > tests/filtergraphs/iamf_5_1| 4 + > > > tests/filtergraphs/iamf_5_1_2 | 5 + > > > tests/filtergraphs/iamf_5_1_4 | 6 ++ > > > tests/filtergraphs/iamf_7_1_4 | 7 ++ > > > tests/ref/fate/iamf-5_1_4 | 98 ++ > > > tests/ref/fate/iamf-7_1_4 | 114 + > > > tests/ref/fate/iamf-stereo | 18 > > > tests/streamgroups/audio_element-5_1_4 | 7 ++ > > > tests/streamgroups/audio_element-7_1_4 | 6 ++ > > > tests/streamgroups/audio_element-stereo| 3 + > > > tests/streamgroups/mix_presentation-5_1_4 | 2 + > > > tests/streamgroups/mix_presentation-7_1_4 | 2 + > > > tests/streamgroups/mix_presentation-stereo | 3 + > > > 15 files changed, 312 insertions(+), 1 deletion(-) > > > create mode 100644 tests/fate/iamf.mak > > > create mode 100644 tests/filtergraphs/iamf_5_1 > > > create mode 100644 tests/filtergraphs/iamf_5_1_2 > > > create mode 100644 tests/filtergraphs/iamf_5_1_4 > > > create mode 100644 tests/filtergraphs/iamf_7_1_4 > > > create mode 100644 tests/ref/fate/iamf-5_1_4 > > > create mode 100644 tests/ref/fate/iamf-7_1_4 > > > create mode 100644 tests/ref/fate/iamf-stereo > > > create mode 100644 tests/streamgroups/audio_element-5_1_4 > > > create mode 100644 tests/streamgroups/audio_element-7_1_4 > > > create mode 100644 tests/streamgroups/audio_element-stereo > > > create mode 100644 tests/streamgroups/mix_presentation-5_1_4 > > > create mode 100644 tests/streamgroups/mix_presentation-7_1_4 > > > create mode 100644 tests/streamgroups/mix_presentation-stereo > > > > Iam probably missing some dependancies but, reporting anyway > > this fails fate: > > > > [aist#0:0/pcm_s16le @ 0x5645f5820680] Guessed Channel Layout: stereo > > Input #0, wav, from 'ffmpeg/tests/data/asynth-44100-2.wav': > >Duration: 00:00:06.00, bitrate: 1411 kb/s > >Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 44100 Hz, 2 > > channels, s16, 1411 kb/s > > [in#0/wav @ 0x5645f5812400] Codec AVOption idct (select IDCT > > implementation) has not been used for any stream. The most likely reason is > > either wrong type (e.g. a video option with no video streams) or that it is > > a private option of some decoder which was not actually used for any stream. > > [out#0/iamf @ 0x5645f585af80] Codec AVOption dct (DCT algorithm) has not > > been used for any stream. The most likely reason is either wrong type (e.g. > > a video option with no video streams) or that it is a private option of > > some encoder which was not actually used for any stream. > > [out#0/iamf @ 0x5645f585af80] Codec AVOption idct (select IDCT > > implementation) has not been used for any stream. The most likely reason is > > either wrong type (e.g. a video option with no video streams) or that it is > > a private option of some encoder which was not actually used for any stream. > > [out#0/iamf @ 0x5645f585af80] Invalid or missing stream group index in > > submix element specification > > "stg=0:parameter_id=100:headphones_rendering_mode=stereo:annotations=en-us=Scalable_Submix" > > Error opening output file ffmpeg/tests/data/fate/iamf-stereo.iamf. > > Error opening output files: Invalid argument > > threads=1 > > tests/Makefile:317: recipe for target 'fate-iamf-stereo' failed > > make: *** [fate-iamf-stereo] Error 234 > > > > thx > > I can't reproduce this. Tried with these four patches using current master > and it works. > Could it be strtoll misbehaving? Can you check what values are in idx, > oc->nb_stream_groups, and endptr? didnt had time to look its 4am i need to eat and go to bed :) but a quick test with this: diff --git a/fftools/ffmpeg_mux_init.c b/fftools/ffmpeg_mux_init.c index 1b42ac9a1d7..224e9e8268e 100644 --- a/fftools/ffmpeg_mux_init.c +++ b/fftools/ffmpeg_mux_init.c @@ -2113,8 +2113,10 @@ static int of_parse_iamf_submixes(Muxer *mux, AVStreamGroup *stg, char *ptr) char *endptr = NULL; int64_t idx = -1; -if (e = av_dict_get(dict, "stg", NULL, 0)) +if (e = av_dict_get(dict, "stg", NULL, 0)) { idx = strtoll(e->value, &endptr, 0); +av_log(0,0, "B idx:%"PRId64" NSG:%d endptr: %p endptr:%s value:%s\n", idx, oc->nb_stream_groups, endptr, endptr, e->value); +} av_dict_set(&dict, "stg", NULL, 0);
[FFmpeg-devel] [PATCH v3] dvdvideo: add DVD-Video demuxer, powered by libdvdnav and libdvdread
Fixes for several authoring styles/discs. ffmpeg CLI may report wrong output time and show progress strangely for some discs. This is not reproducible prior to `fftools/ffmpeg: convert to a threaded architecture` But, I am looking into it. Signed-off-by: Marth64 --- Changelog |1 + configure |8 + libavformat/Makefile |1 + libavformat/allformats.c |1 + libavformat/avlanguage.c | 10 +- libavformat/dvdvideodec.c | 1001 + 6 files changed, 1020 insertions(+), 2 deletions(-) create mode 100644 libavformat/dvdvideodec.c diff --git a/Changelog b/Changelog index 5b2899d05b..1b377fed2f 100644 --- a/Changelog +++ b/Changelog @@ -18,6 +18,7 @@ version : - lavu/eval: introduce randomi() function in expressions - VVC decoder - fsync filter +- DVD-Video demuxer, powered by libdvdnav and libdvdread version 6.1: - libaribcaption decoder diff --git a/configure b/configure index e87a09ce83..1f21f4f1c2 100755 --- a/configure +++ b/configure @@ -227,6 +227,8 @@ External library support: --enable-libdavs2enable AVS2 decoding via libdavs2 [no] --enable-libdc1394 enable IIDC-1394 grabbing using libdc1394 and libraw1394 [no] + --enable-libdvdnav enable libdvdnav, needed for DVD demuxing [no] + --enable-libdvdread enable libdvdread, needed for DVD demuxing [no] --enable-libfdk-aac enable AAC de/encoding via libfdk-aac [no] --enable-libfliteenable flite (voice synthesis) support via libflite [no] --enable-libfontconfig enable libfontconfig, useful for drawtext filter [no] @@ -1806,6 +1808,8 @@ EXTERNAL_LIBRARY_GPL_LIST=" frei0r libcdio libdavs2 +libdvdnav +libdvdread librubberband libvidstab libx264 @@ -3519,6 +3523,8 @@ dts_demuxer_select="dca_parser" dtshd_demuxer_select="dca_parser" dv_demuxer_select="dvprofile" dv_muxer_select="dvprofile" +dvdvideo_demuxer_select="mpegps_demuxer" +dvdvideo_demuxer_deps="libdvdnav libdvdread" dxa_demuxer_select="riffdec" eac3_demuxer_select="ac3_parser" evc_demuxer_select="evc_frame_merge_bsf evc_parser" @@ -6760,6 +6766,8 @@ enabled libdav1d && require_pkg_config libdav1d "dav1d >= 0.5.0" "dav1d enabled libdavs2 && require_pkg_config libdavs2 "davs2 >= 1.6.0" davs2.h davs2_decoder_open enabled libdc1394 && require_pkg_config libdc1394 libdc1394-2 dc1394/dc1394.h dc1394_new enabled libdrm&& check_pkg_config libdrm libdrm xf86drm.h drmGetVersion +enabled libdvdnav && require_pkg_config libdvdnav "dvdnav >= 6.1.1" dvdnav/dvdnav.h dvdnav_open2 +enabled libdvdread&& require_pkg_config libdvdread "dvdread >= 6.1.2" dvdread/dvd_reader.h DVDOpen2 -ldvdread enabled libfdk_aac&& { check_pkg_config libfdk_aac fdk-aac "fdk-aac/aacenc_lib.h" aacEncOpen || { require libfdk_aac fdk-aac/aacenc_lib.h aacEncOpen -lfdk-aac && warn "using libfdk without pkg-config"; } } diff --git a/libavformat/Makefile b/libavformat/Makefile index 581e378d95..3c1cb21fe2 100644 --- a/libavformat/Makefile +++ b/libavformat/Makefile @@ -192,6 +192,7 @@ OBJS-$(CONFIG_DTS_MUXER) += rawenc.o OBJS-$(CONFIG_DV_MUXER) += dvenc.o OBJS-$(CONFIG_DVBSUB_DEMUXER)+= dvbsub.o rawdec.o OBJS-$(CONFIG_DVBTXT_DEMUXER)+= dvbtxt.o rawdec.o +OBJS-$(CONFIG_DVDVIDEO_DEMUXER) += dvdvideodec.o OBJS-$(CONFIG_DXA_DEMUXER) += dxa.o OBJS-$(CONFIG_EA_CDATA_DEMUXER) += eacdata.o OBJS-$(CONFIG_EA_DEMUXER)+= electronicarts.o diff --git a/libavformat/allformats.c b/libavformat/allformats.c index ce6be5f04d..ea88d4c094 100644 --- a/libavformat/allformats.c +++ b/libavformat/allformats.c @@ -150,6 +150,7 @@ extern const AVInputFormat ff_dv_demuxer; extern const FFOutputFormat ff_dv_muxer; extern const AVInputFormat ff_dvbsub_demuxer; extern const AVInputFormat ff_dvbtxt_demuxer; +extern const AVInputFormat ff_dvdvideo_demuxer; extern const AVInputFormat ff_dxa_demuxer; extern const AVInputFormat ff_ea_demuxer; extern const AVInputFormat ff_ea_cdata_demuxer; diff --git a/libavformat/avlanguage.c b/libavformat/avlanguage.c index 782a58adb2..202d9aa835 100644 --- a/libavformat/avlanguage.c +++ b/libavformat/avlanguage.c @@ -29,7 +29,7 @@ typedef struct LangEntry { uint16_t next_equivalent; } LangEntry; -static const uint16_t lang_table_counts[] = { 484, 20, 184 }; +static const uint16_t lang_table_counts[] = { 484, 20, 190 }; static const uint16_t lang_table_offsets[] = { 0, 484, 504 }; static const LangEntry lang_table[] = { @@ -539,7 +539,7 @@ static const LangEntry lang_table[] = { /*0501*/ { "slk", 647 }, /*0502*/ { "sqi", 652 }, /*0503*/ { "zho", 686 }, -/*- AV_LANG_ISO639_1 entries (184) -*/ +/*- AV_LANG_ISO639_1 entr
Re: [FFmpeg-devel] [PATCH v3] dvdvideo: add DVD-Video demuxer, powered by libdvdnav and libdvdread
Also deleted more redundant code in v3^ On Wed, Jan 10, 2024 at 9:48 PM Marth64 wrote: > Fixes for several authoring styles/discs. > ffmpeg CLI may report wrong output time and show progress strangely for > some discs. > This is not reproducible prior to `fftools/ffmpeg: convert to a threaded > architecture` > But, I am looking into it. > > Signed-off-by: Marth64 > --- > Changelog |1 + > configure |8 + > libavformat/Makefile |1 + > libavformat/allformats.c |1 + > libavformat/avlanguage.c | 10 +- > libavformat/dvdvideodec.c | 1001 + > 6 files changed, 1020 insertions(+), 2 deletions(-) > create mode 100644 libavformat/dvdvideodec.c > > diff --git a/Changelog b/Changelog > index 5b2899d05b..1b377fed2f 100644 > --- a/Changelog > +++ b/Changelog > @@ -18,6 +18,7 @@ version : > - lavu/eval: introduce randomi() function in expressions > - VVC decoder > - fsync filter > +- DVD-Video demuxer, powered by libdvdnav and libdvdread > > version 6.1: > - libaribcaption decoder > diff --git a/configure b/configure > index e87a09ce83..1f21f4f1c2 100755 > --- a/configure > +++ b/configure > @@ -227,6 +227,8 @@ External library support: >--enable-libdavs2enable AVS2 decoding via libdavs2 [no] >--enable-libdc1394 enable IIDC-1394 grabbing using libdc1394 > and libraw1394 [no] > + --enable-libdvdnav enable libdvdnav, needed for DVD demuxing [no] > + --enable-libdvdread enable libdvdread, needed for DVD demuxing > [no] >--enable-libfdk-aac enable AAC de/encoding via libfdk-aac [no] >--enable-libfliteenable flite (voice synthesis) support via > libflite [no] >--enable-libfontconfig enable libfontconfig, useful for drawtext > filter [no] > @@ -1806,6 +1808,8 @@ EXTERNAL_LIBRARY_GPL_LIST=" > frei0r > libcdio > libdavs2 > +libdvdnav > +libdvdread > librubberband > libvidstab > libx264 > @@ -3519,6 +3523,8 @@ dts_demuxer_select="dca_parser" > dtshd_demuxer_select="dca_parser" > dv_demuxer_select="dvprofile" > dv_muxer_select="dvprofile" > +dvdvideo_demuxer_select="mpegps_demuxer" > +dvdvideo_demuxer_deps="libdvdnav libdvdread" > dxa_demuxer_select="riffdec" > eac3_demuxer_select="ac3_parser" > evc_demuxer_select="evc_frame_merge_bsf evc_parser" > @@ -6760,6 +6766,8 @@ enabled libdav1d && require_pkg_config > libdav1d "dav1d >= 0.5.0" "dav1d > enabled libdavs2 && require_pkg_config libdavs2 "davs2 >= 1.6.0" > davs2.h davs2_decoder_open > enabled libdc1394 && require_pkg_config libdc1394 libdc1394-2 > dc1394/dc1394.h dc1394_new > enabled libdrm&& check_pkg_config libdrm libdrm xf86drm.h > drmGetVersion > +enabled libdvdnav && require_pkg_config libdvdnav "dvdnav >= > 6.1.1" dvdnav/dvdnav.h dvdnav_open2 > +enabled libdvdread&& require_pkg_config libdvdread "dvdread >= > 6.1.2" dvdread/dvd_reader.h DVDOpen2 -ldvdread > enabled libfdk_aac&& { check_pkg_config libfdk_aac fdk-aac > "fdk-aac/aacenc_lib.h" aacEncOpen || > { require libfdk_aac fdk-aac/aacenc_lib.h > aacEncOpen -lfdk-aac && > warn "using libfdk without pkg-config"; > } } > diff --git a/libavformat/Makefile b/libavformat/Makefile > index 581e378d95..3c1cb21fe2 100644 > --- a/libavformat/Makefile > +++ b/libavformat/Makefile > @@ -192,6 +192,7 @@ OBJS-$(CONFIG_DTS_MUXER) += rawenc.o > OBJS-$(CONFIG_DV_MUXER) += dvenc.o > OBJS-$(CONFIG_DVBSUB_DEMUXER)+= dvbsub.o rawdec.o > OBJS-$(CONFIG_DVBTXT_DEMUXER)+= dvbtxt.o rawdec.o > +OBJS-$(CONFIG_DVDVIDEO_DEMUXER) += dvdvideodec.o > OBJS-$(CONFIG_DXA_DEMUXER) += dxa.o > OBJS-$(CONFIG_EA_CDATA_DEMUXER) += eacdata.o > OBJS-$(CONFIG_EA_DEMUXER)+= electronicarts.o > diff --git a/libavformat/allformats.c b/libavformat/allformats.c > index ce6be5f04d..ea88d4c094 100644 > --- a/libavformat/allformats.c > +++ b/libavformat/allformats.c > @@ -150,6 +150,7 @@ extern const AVInputFormat ff_dv_demuxer; > extern const FFOutputFormat ff_dv_muxer; > extern const AVInputFormat ff_dvbsub_demuxer; > extern const AVInputFormat ff_dvbtxt_demuxer; > +extern const AVInputFormat ff_dvdvideo_demuxer; > extern const AVInputFormat ff_dxa_demuxer; > extern const AVInputFormat ff_ea_demuxer; > extern const AVInputFormat ff_ea_cdata_demuxer; > diff --git a/libavformat/avlanguage.c b/libavformat/avlanguage.c > index 782a58adb2..202d9aa835 100644 > --- a/libavformat/avlanguage.c > +++ b/libavformat/avlanguage.c > @@ -29,7 +29,7 @@ typedef struct LangEntry { > uint16_t next_equivalent; > } LangEntry; > > -static const uint16_t lang_table_counts[] = { 484, 20, 184 }; > +static const uint16_t lang_table_counts[] = { 484, 20, 190 }; > static const uint16_t lang_table_offse
[FFmpeg-devel] [PATCH 1/2] avcodec/d3d12va_decode: check existance before assigning a new index
From: Tong Wu Fixes #10759. It can happen in H.264, MPEG2, VC1 that the current frame resource memory is already in ref_resource. For example, for a interlaced frame, the same curr memory is passed twice. For the second time it could possibly reference itself. When this happens the curr is already given an index and in ref_resources. When the reference frame index is required, we should check the existance in the ref_resources first before assigning a new index for it. Signed-off-by: Tong Wu --- libavcodec/d3d12va_decode.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/libavcodec/d3d12va_decode.c b/libavcodec/d3d12va_decode.c index c5c599675e..a6f40236d1 100644 --- a/libavcodec/d3d12va_decode.c +++ b/libavcodec/d3d12va_decode.c @@ -62,14 +62,14 @@ unsigned ff_d3d12va_get_surface_index(const AVCodecContext *avctx, if (!res) goto fail; -if (!curr) { -for (i = 0; i < ctx->max_num_ref; i++) { -if (ctx->ref_resources[i] && res == ctx->ref_resources[i]) { -ctx->used_mask |= 1 << i; -return i; -} +for (i = 0; i < ctx->max_num_ref; i++) { +if (ctx->ref_resources[i] && res == ctx->ref_resources[i]) { +ctx->used_mask |= 1 << i; +return i; } -} else { +} + +if (curr) { for (i = 0; i < ctx->max_num_ref; i++) { if (!((ctx->used_mask >> i) & 0x1)) { ctx->ref_resources[i] = res; -- 2.41.0.windows.1 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [PATCH 2/2] avcodec/d3d12va_mpeg2|vc1: remove the unused macros
From: Tong Wu These macros are no longer used. Remove them. Signed-off-by: Tong Wu --- libavcodec/d3d12va_mpeg2.c | 4 libavcodec/d3d12va_vc1.c | 4 2 files changed, 8 deletions(-) diff --git a/libavcodec/d3d12va_mpeg2.c b/libavcodec/d3d12va_mpeg2.c index b964f8d2ff..936af5f86a 100644 --- a/libavcodec/d3d12va_mpeg2.c +++ b/libavcodec/d3d12va_mpeg2.c @@ -31,10 +31,6 @@ #define MAX_SLICES 1024 #define INVALID_REF 0x -#define REF_RESOURCE(index) if (index != INVALID_REF) { \ -ctx->ref_resources[index] = frames_hwctx->texture_infos[index].texture; \ -} - typedef struct D3D12DecodePictureContext { DXVA_PictureParameters pp; DXVA_QmatrixDataqm; diff --git a/libavcodec/d3d12va_vc1.c b/libavcodec/d3d12va_vc1.c index 3d15abd1f1..4b89a65bb0 100644 --- a/libavcodec/d3d12va_vc1.c +++ b/libavcodec/d3d12va_vc1.c @@ -33,10 +33,6 @@ #define MAX_SLICES 1024 #define INVALID_REF 0x -#define REF_RESOURCE(index) if (index != INVALID_REF) { \ -ctx->ref_resources[index] = frames_hwctx->texture_infos[index].texture; \ -} - typedef struct D3D12DecodePictureContext { DXVA_PictureParameters pp; unsigned slice_count; -- 2.41.0.windows.1 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".