[FFmpeg-cvslog] avformat/iamf_parse: add missing constrains for num_parameters in audio_element_oub()
ffmpeg | branch: release/7.0 | James Almer | Mon Feb 17 11:41:24 2025 -0300| [695dcf29c21911db19cc41722af94ece131303d8] | committer: James Almer avformat/iamf_parse: add missing constrains for num_parameters in audio_element_oub() Fixes ticket #11475. Signed-off-by: James Almer (cherry picked from commit 0526535cd58444dd264e810b2f3348b4d96cff3b) > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=695dcf29c21911db19cc41722af94ece131303d8 --- libavformat/iamf_parse.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/libavformat/iamf_parse.c b/libavformat/iamf_parse.c index 5c7004664e..b97a3fb3fe 100644 --- a/libavformat/iamf_parse.c +++ b/libavformat/iamf_parse.c @@ -733,6 +733,12 @@ static int audio_element_obu(void *s, IAMFContext *c, AVIOContext *pb, int len) } num_parameters = ffio_read_leb(pbc); +if (num_parameters > 2 && audio_element_type == 0) { +av_log(s, AV_LOG_ERROR, "Audio Element parameter count %u is invalid" +" for Channel representations\n", num_parameters); +ret = AVERROR_INVALIDDATA; +goto fail; +} if (num_parameters && audio_element_type != 0) { av_log(s, AV_LOG_ERROR, "Audio Element parameter count %u is invalid" " for Scene representations\n", num_parameters); ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] aarch64: Fix a few misindented lines
ffmpeg | branch: master | Martin Storsjö | Fri Feb 28 14:10:01 2025 +0200| [b137347278fe261f32c73269469b6f9569c2e9de] | committer: Martin Storsjö aarch64: Fix a few misindented lines Signed-off-by: Martin Storsjö > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b137347278fe261f32c73269469b6f9569c2e9de --- libswresample/aarch64/resample.S | 8 libswscale/aarch64/yuv2rgb_neon.S | 10 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/libswresample/aarch64/resample.S b/libswresample/aarch64/resample.S index 6d9eaaeb23..89edd1ce60 100644 --- a/libswresample/aarch64/resample.S +++ b/libswresample/aarch64/resample.S @@ -30,7 +30,7 @@ function ff_resample_common_apply_filter_x4_float_neon, export=1 faddp v0.4s, v0.4s, v0.4s// pair adding of the 4x32-bit accumulated values faddp v0.4s, v0.4s, v0.4s// pair adding of the 4x32-bit accumulated values st1 {v0.s}[0], [x0], #4// write accumulator -ret +ret endfunc function ff_resample_common_apply_filter_x8_float_neon, export=1 @@ -46,7 +46,7 @@ function ff_resample_common_apply_filter_x8_float_neon, export=1 faddp v0.4s, v0.4s, v0.4s// pair adding of the 4x32-bit accumulated values faddp v0.4s, v0.4s, v0.4s// pair adding of the 4x32-bit accumulated values st1 {v0.s}[0], [x0], #4// write accumulator -ret +ret endfunc function ff_resample_common_apply_filter_x4_s16_neon, export=1 @@ -59,7 +59,7 @@ function ff_resample_common_apply_filter_x4_s16_neon, export=1 addpv0.4s, v0.4s, v0.4s// pair adding of the 4x32-bit accumulated values addpv0.4s, v0.4s, v0.4s// pair adding of the 4x32-bit accumulated values st1 {v0.s}[0], [x0], #4// write accumulator -ret +ret endfunc function ff_resample_common_apply_filter_x8_s16_neon, export=1 @@ -73,5 +73,5 @@ function ff_resample_common_apply_filter_x8_s16_neon, export=1 addpv0.4s, v0.4s, v0.4s// pair adding of the 4x32-bit accumulated values addpv0.4s, v0.4s, v0.4s// pair adding of the 4x32-bit accumulated values st1 {v0.s}[0], [x0], #4// write accumulator -ret +ret endfunc diff --git a/libswscale/aarch64/yuv2rgb_neon.S b/libswscale/aarch64/yuv2rgb_neon.S index cc7d8b58fc..0797a6d5e0 100644 --- a/libswscale/aarch64/yuv2rgb_neon.S +++ b/libswscale/aarch64/yuv2rgb_neon.S @@ -126,7 +126,7 @@ .endm .macro load_chroma_yuv422p -load_chroma_yuv420p +load_chroma_yuv420p .endm .macro increment_nv12 @@ -136,7 +136,7 @@ .endm .macro increment_nv21 -increment_nv12 +increment_nv12 .endm .macro increment_yuv420p @@ -182,7 +182,7 @@ function ff_\ifmt\()_to_\ofmt\()_neon, export=1 mov w8, w0 // w8 = width 2: moviv5.8h, #4, lsl #8 // 128 * (1<<3) -load_chroma_\ifmt +load_chroma_\ifmt sub v18.8h, v18.8h, v5.8h // U*(1<<3) - 128*(1<<3) sub v19.8h, v19.8h, v5.8h // V*(1<<3) - 128*(1<<3) sqdmulh v20.8h, v19.8h, v1.h[0] // V * v2r(R) @@ -237,11 +237,11 @@ function ff_\ifmt\()_to_\ofmt\()_neon, export=1 add x15, x15, w16, sxtw // dst2 += padding2 .endif add x4, x4, w5, sxtw// srcY += paddingY -increment_\ifmt +increment_\ifmt subsw1, w1, #1 // height -= 1 b.gt1b mov w0, w9 -ret +ret endfunc .endm ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] doc/t2h: Support texinfo 7.1 and 7.2 pretest
ffmpeg | branch: release/7.0 | Patrice Dumas | Fri Nov 1 15:57:07 2024 +0100| [f1e8e74477c3736597f700d8986b1bd4967cbd79] | committer: James Almer doc/t2h: Support texinfo 7.1 and 7.2 pretest Here is a proposed patch for portability of doc/t2h.pm for GNU Texinfo 7.1 and 7.1.90 (7.2 pretest). I tested against 7.1 and 7.1.90 (7.2 pretest). There is a difference in the headings compared to the website version, maybe related to FA_ICONS not being set the same, but the result seems correct. I also renamed $element to $output_unit in ffmpeg_heading_command as in new equivalent makeinfo/texi2any code the $element variable is the $command variable in ffmpeg_heading_command, which is very confusing. I left as is the $command variable to have a patch easier to read, but it could make sense to rename $command as $element later on. The patch could also have effects with Texinfo 7.0, since some of the changes are for that version, but that probably never show up because it is for situations that may not exist in ffmpeg manuals (for example @node without sectioning command), or because the code is robust to some missing information (case of $heading_level in ffmpeg_heading_command that was not set, as far as I can tell). Signed-off-by: James Almer (cherry picked from commit 4d9cdf82ee36a7da4f065821c86165fe565aeac2) > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=f1e8e74477c3736597f700d8986b1bd4967cbd79 --- doc/t2h.pm | 169 ++--- 1 file changed, 129 insertions(+), 40 deletions(-) diff --git a/doc/t2h.pm b/doc/t2h.pm index b7485e1f1e..4875d66305 100644 --- a/doc/t2h.pm +++ b/doc/t2h.pm @@ -54,12 +54,24 @@ sub get_formatting_function($$) { } # determine texinfo version -my $program_version_num = version->declare(ff_get_conf('PACKAGE_VERSION'))->numify; +my $package_version = ff_get_conf('PACKAGE_VERSION'); +$package_version =~ s/\+dev$//; +my $program_version_num = version->declare($package_version)->numify; my $program_version_6_8 = $program_version_num >= 6.008000; # no navigation elements ff_set_from_init_file('HEADERS', 0); +my %sectioning_commands = %Texinfo::Common::sectioning_commands; +if (scalar(keys(%sectioning_commands)) == 0) { + %sectioning_commands = %Texinfo::Commands::sectioning_heading_commands; +} + +my %root_commands = %Texinfo::Common::root_commands; +if (scalar(keys(%root_commands)) == 0) { + %root_commands = %Texinfo::Commands::root_commands; +} + sub ffmpeg_heading_command($) { my $self = shift; @@ -77,6 +89,9 @@ sub ffmpeg_heading_command($) return $result; } +# no need to set it as the $element_id is output unconditionally +my $heading_id; + my $element_id = $self->command_id($command); $result .= "\n" if (defined($element_id) and $element_id ne ''); @@ -84,24 +99,40 @@ sub ffmpeg_heading_command($) print STDERR "Process $command " .Texinfo::Structuring::_print_root_command_texi($command)."\n" if ($self->get_conf('DEBUG')); -my $element; -if ($Texinfo::Common::root_commands{$command->{'cmdname'}} -and $command->{'parent'} -and $command->{'parent'}->{'type'} -and $command->{'parent'}->{'type'} eq 'element') { -$element = $command->{'parent'}; +my $output_unit; +if ($root_commands{$command->{'cmdname'}}) { +if ($command->{'associated_unit'}) { + $output_unit = $command->{'associated_unit'}; +} elsif ($command->{'structure'} + and $command->{'structure'}->{'associated_unit'}) { + $output_unit = $command->{'structure'}->{'associated_unit'}; +} elsif ($command->{'parent'} + and $command->{'parent'}->{'type'} + and $command->{'parent'}->{'type'} eq 'element') { + $output_unit = $command->{'parent'}; +} } -if ($element) { + +if ($output_unit) { $result .= &{get_formatting_function($self, 'format_element_header')}($self, $cmdname, - $command, $element); + $command, $output_unit); } my $heading_level; # node is used as heading if there is nothing else. if ($cmdname eq 'node') { -if (!$element or (!$element->{'extra'}->{'section'} -and $element->{'extra'}->{'node'} -and $element->{'extra'}->{'node'} eq $command +if (!$output_unit or +(((!$output_unit->{'extra'}->{'section'} + and $output_unit->{'extra'}->{'node'} + and $output_unit->{'extra'}->{'node'} eq $command) + or + ((($output_unit->{'extra'}->{'unit_command'} +and $output_unit->{'extra'}->{'unit_command'} eq $command) + or + ($output_unit->{'unit_command'} +and $output_unit->{'unit_command'} eq $command))
[FFmpeg-cvslog] Changelog: update
ffmpeg | branch: release/7.0 | James Almer | Fri Feb 28 16:15:56 2025 -0300| [cacdb41ef22b0fe38348dfc0846a14f1eb7ca6fb] | committer: James Almer Changelog: update Signed-off-by: James Almer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=cacdb41ef22b0fe38348dfc0846a14f1eb7ca6fb --- Changelog | 9 + 1 file changed, 9 insertions(+) diff --git a/Changelog b/Changelog index 2fd8477a18..f88d35aafe 100644 --- a/Changelog +++ b/Changelog @@ -2,6 +2,15 @@ Entries are sorted chronologically from oldest to youngest within each release, releases are sorted from youngest to oldest. version 7.0.3: + doc/t2h: Support texinfo 7.1 and 7.2 pretest + avformat/iamf_parse: ensure there's at most one of each parameter types in audio elements + avformat/iamf_parse: add missing constrains for num_parameters in audio_element_oub() + avformat/iamf_parse: add missing av_free() call on failure path + avformat/iamf_writer: ensure the stream groups are not empty + avformat/iamf_writer: fix setting num_samples_per_frame for OPUS + avformat/iamf_parse: fix setting duration for the last subblock in a parameter definition + avformat/iamf_parse: add checks to parameter definition durations + avformat/iamfdec: don't set individual streams as dependent avformat/iff: Check that we have a stream in read_dst_frame() avformat/mlvdec: fix size checks avformat/wavdec: Fix overflow of intermediate in block_align check ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] avformat/iamf_parse: add missing av_free() call on failure path
ffmpeg | branch: release/7.0 | James Almer | Mon Jan 13 17:28:02 2025 -0300| [d6270e6b5cbfac87c8e6bcaffd9017eadc21ce36] | committer: James Almer avformat/iamf_parse: add missing av_free() call on failure path Fixes ticket #11416 Signed-off-by: James Almer (cherry picked from commit d5873be583ada9e1fb887e2fe8dcfd4b12e0efcd) > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d6270e6b5cbfac87c8e6bcaffd9017eadc21ce36 --- libavformat/iamf_parse.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavformat/iamf_parse.c b/libavformat/iamf_parse.c index 2497061d7a..5c7004664e 100644 --- a/libavformat/iamf_parse.c +++ b/libavformat/iamf_parse.c @@ -567,6 +567,7 @@ static int param_parse(void *s, IAMFContext *c, AVIOContext *pb, if (!mode && !constant_subblock_duration && total_duration != duration) { av_log(s, AV_LOG_ERROR, "Invalid subblock durations in parameter_id %u\n", parameter_id); +av_free(param); return AVERROR_INVALIDDATA; } ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] avformat/iamf_writer: ensure the stream groups are not empty
ffmpeg | branch: release/7.0 | James Almer | Fri Dec 27 16:17:51 2024 -0300| [c10f15c0e871e1f21f1b4affac1b08ac568785d8] | committer: James Almer avformat/iamf_writer: ensure the stream groups are not empty Signed-off-by: James Almer (cherry picked from commit cedd9151f863e3db9c325aff2f9375c39adbbec2) > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=c10f15c0e871e1f21f1b4affac1b08ac568785d8 --- libavformat/iamf_writer.c | 8 1 file changed, 8 insertions(+) diff --git a/libavformat/iamf_writer.c b/libavformat/iamf_writer.c index b4874806e4..7dfe658bf9 100644 --- a/libavformat/iamf_writer.c +++ b/libavformat/iamf_writer.c @@ -217,6 +217,10 @@ int ff_iamf_add_audio_element(IAMFContext *iamf, const AVStreamGroup *stg, void if (stg->type != AV_STREAM_GROUP_PARAMS_IAMF_AUDIO_ELEMENT) return AVERROR(EINVAL); +if (!stg->nb_streams) { +av_log(log_ctx, AV_LOG_ERROR, "Audio Element id %"PRId64" has no streams\n", stg->id); +return AVERROR(EINVAL); +} iamf_audio_element = stg->params.iamf_audio_element; if (iamf_audio_element->audio_element_type == AV_IAMF_AUDIO_ELEMENT_TYPE_SCENE) { @@ -381,6 +385,10 @@ int ff_iamf_add_mix_presentation(IAMFContext *iamf, const AVStreamGroup *stg, vo if (stg->type != AV_STREAM_GROUP_PARAMS_IAMF_MIX_PRESENTATION) return AVERROR(EINVAL); +if (!stg->nb_streams) { +av_log(log_ctx, AV_LOG_ERROR, "Mix Presentation id %"PRId64" has no streams\n", stg->id); +return AVERROR(EINVAL); +} for (int i = 0; i < iamf->nb_mix_presentations; i++) { if (stg->id == iamf->mix_presentations[i]->mix_presentation_id) { ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] avformat/iamf_parse: ensure there's at most one of each parameter types in audio elements
ffmpeg | branch: release/7.0 | James Almer | Mon Feb 17 11:41:25 2025 -0300| [e0e7c95a06c22b60a5924e1a268df1c2ccc472d2] | committer: James Almer avformat/iamf_parse: ensure there's at most one of each parameter types in audio elements Should prevent potential memory leaks on invalid files. Signed-off-by: James Almer (cherry picked from commit 5470d024e18968b3bdef2b745966f7617f1eb9f2) > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=e0e7c95a06c22b60a5924e1a268df1c2ccc472d2 --- libavformat/iamf_parse.c | 14 +++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/libavformat/iamf_parse.c b/libavformat/iamf_parse.c index b97a3fb3fe..c1e9cbebaa 100644 --- a/libavformat/iamf_parse.c +++ b/libavformat/iamf_parse.c @@ -752,11 +752,19 @@ static int audio_element_obu(void *s, IAMFContext *c, AVIOContext *pb, int len) type = ffio_read_leb(pbc); if (type == AV_IAMF_PARAMETER_DEFINITION_MIX_GAIN) ret = AVERROR_INVALIDDATA; -else if (type == AV_IAMF_PARAMETER_DEFINITION_DEMIXING) +else if (type == AV_IAMF_PARAMETER_DEFINITION_DEMIXING) { +if (element->demixing_info) { +ret = AVERROR_INVALIDDATA; +goto fail; +} ret = param_parse(s, c, pbc, type, audio_element, &element->demixing_info); -else if (type == AV_IAMF_PARAMETER_DEFINITION_RECON_GAIN) +} else if (type == AV_IAMF_PARAMETER_DEFINITION_RECON_GAIN) { +if (element->recon_gain_info) { +ret = AVERROR_INVALIDDATA; +goto fail; +} ret = param_parse(s, c, pbc, type, audio_element, &element->recon_gain_info); -else { +} else { unsigned param_definition_size = ffio_read_leb(pbc); avio_skip(pbc, param_definition_size); } ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] avformat/iamf_parse: fix setting duration for the last subblock in a parameter definition
ffmpeg | branch: release/7.0 | James Almer | Wed Dec 11 23:34:32 2024 -0300| [70ae846c71f4daaf8f89927ba24845773edcce1f] | committer: James Almer avformat/iamf_parse: fix setting duration for the last subblock in a parameter definition When subblock durations are constant, the last block may be smaller and the value needs to be calculated. Signed-off-by: James Almer (cherry picked from commit fb5e8ea9719c8afcd0d9e3a51e370c06c361d9ba) > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=70ae846c71f4daaf8f89927ba24845773edcce1f --- libavformat/iamf_parse.c | 3 ++- libavformat/iamf_reader.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/libavformat/iamf_parse.c b/libavformat/iamf_parse.c index 8d952cf203..2497061d7a 100644 --- a/libavformat/iamf_parse.c +++ b/libavformat/iamf_parse.c @@ -536,7 +536,8 @@ static int param_parse(void *s, IAMFContext *c, AVIOContext *pb, if (constant_subblock_duration == 0) { subblock_duration = ffio_read_leb(pb); total_duration += subblock_duration; -} +} else if (i == nb_subblocks - 1) +subblock_duration = duration - i * constant_subblock_duration; switch (type) { case AV_IAMF_PARAMETER_DEFINITION_MIX_GAIN: { diff --git a/libavformat/iamf_reader.c b/libavformat/iamf_reader.c index b43ed76df4..02e8b694d7 100644 --- a/libavformat/iamf_reader.c +++ b/libavformat/iamf_reader.c @@ -177,7 +177,8 @@ static int parameter_block_obu(AVFormatContext *s, IAMFDemuxContext *c, if (!param_definition->mode && !constant_subblock_duration) { subblock_duration = ffio_read_leb(pb); total_duration += subblock_duration; -} +} else if (i == nb_subblocks - 1) +subblock_duration = duration - i * constant_subblock_duration; switch (param->type) { case AV_IAMF_PARAMETER_DEFINITION_MIX_GAIN: { ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] avformat/iamfdec: don't set individual streams as dependent
ffmpeg | branch: release/7.0 | James Almer | Tue Dec 10 14:07:09 2024 -0300| [3c3d252449527321a8706952eea369623d9181ae] | committer: James Almer avformat/iamfdec: don't set individual streams as dependent Signed-off-by: James Almer (cherry picked from commit 2d33f66f9ac85b3b58280e27793a2b7aa47dc054) > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=3c3d252449527321a8706952eea369623d9181ae --- libavformat/iamfdec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/iamfdec.c b/libavformat/iamfdec.c index 2e6608b868..ad47c5e5f7 100644 --- a/libavformat/iamfdec.c +++ b/libavformat/iamfdec.c @@ -109,7 +109,7 @@ static int iamf_read_header(AVFormatContext *s) if (!i && !j && audio_element->nb_layers && audio_element->layers[0].substream_count == 1) st->disposition |= AV_DISPOSITION_DEFAULT; -else +else if (audio_element->nb_layers > 1 || audio_element->layers[0].substream_count > 1) st->disposition |= AV_DISPOSITION_DEPENDENT; st->id = substream->audio_substream_id; avpriv_set_pts_info(st, 64, 1, st->codecpar->sample_rate); ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] avformat/iamf_writer: fix setting num_samples_per_frame for OPUS
ffmpeg | branch: release/7.0 | James Almer | Wed Dec 11 13:30:23 2024 -0300| [d88741836ee3a04a9c5645a51ebf1134ab94995e] | committer: James Almer avformat/iamf_writer: fix setting num_samples_per_frame for OPUS As per section 3.11.1 of the IAMF spec, the sample rate used in Codec Config for Opus shall be 48kHz, regardless of the original sample rate used during encoding. Signed-off-by: James Almer (cherry picked from commit 76049d1c4564a6a03c467b1f9b0bc853bc971769) > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d88741836ee3a04a9c5645a51ebf1134ab94995e --- libavformat/iamf_writer.c | 16 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/libavformat/iamf_writer.c b/libavformat/iamf_writer.c index 5e8d8f768b..b4874806e4 100644 --- a/libavformat/iamf_writer.c +++ b/libavformat/iamf_writer.c @@ -112,9 +112,17 @@ static int fill_codec_config(IAMFContext *iamf, const AVStreamGroup *stg, int j, ret = 0; codec_config->codec_id = st->codecpar->codec_id; -codec_config->sample_rate = st->codecpar->sample_rate; codec_config->codec_tag = st->codecpar->codec_tag; -codec_config->nb_samples = st->codecpar->frame_size; +switch (codec_config->codec_id) { +case AV_CODEC_ID_OPUS: +codec_config->sample_rate = 48000; +codec_config->nb_samples = av_rescale(st->codecpar->frame_size, 48000, st->codecpar->sample_rate); +break; +default: +codec_config->sample_rate = st->codecpar->sample_rate; +codec_config->nb_samples = st->codecpar->frame_size; +break; +} populate_audio_roll_distance(codec_config); if (st->codecpar->extradata_size) { codec_config->extradata = av_memdup(st->codecpar->extradata, st->codecpar->extradata_size); @@ -183,9 +191,9 @@ static int add_param_definition(IAMFContext *iamf, AVIAMFParamDefinition *param, } if (codec_config) { if (!param->duration) -param->duration = codec_config->nb_samples; +param->duration = av_rescale(codec_config->nb_samples, param->parameter_rate, codec_config->sample_rate); if (!param->constant_subblock_duration) -param->constant_subblock_duration = codec_config->nb_samples; +param->constant_subblock_duration = av_rescale(codec_config->nb_samples, param->parameter_rate, codec_config->sample_rate); } param_definition = av_mallocz(sizeof(*param_definition)); ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] avformat/hls: Partially revert "reduce default max reload to 3"
ffmpeg | branch: master | softworkz | Thu Feb 27 16:36:56 2025 +| [ace9f03a6c0a58b84a02701df1b6e5d5ac1d1b8e] | committer: Michael Niedermayer avformat/hls: Partially revert "reduce default max reload to 3" (setting to 100 as a reasonable compromise) The change has caused regressions for many users and consumers. Playlist reloads only happen when a playlist doesn't indicate that it has ended (via #EXT-X-ENDLIST), which means that the addition of future segments is still expected. It is well possible that an HLS server is temporarily unable to serve further segments but resumes after some time, either indicating a discontinuity or even by fully catching up. With a segment length of 3s, a max_reload value of 1000 corresponds to a duration of 50 minutes which appears to be a reasonable default. Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ace9f03a6c0a58b84a02701df1b6e5d5ac1d1b8e --- libavformat/hls.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/hls.c b/libavformat/hls.c index 3bdc1bc848..4ee142f0c4 100644 --- a/libavformat/hls.c +++ b/libavformat/hls.c @@ -2633,7 +2633,7 @@ static const AVOption hls_options[] = { {"extension_picky", "Be picky with all extensions matching", OFFSET(extension_picky), AV_OPT_TYPE_BOOL, {.i64 = 1}, 0, 1, FLAGS}, {"max_reload", "Maximum number of times a insufficient list is attempted to be reloaded", -OFFSET(max_reload), AV_OPT_TYPE_INT, {.i64 = 3}, 0, INT_MAX, FLAGS}, +OFFSET(max_reload), AV_OPT_TYPE_INT, {.i64 = 100}, 0, INT_MAX, FLAGS}, {"m3u8_hold_counters", "The maximum number of times to load m3u8 when it refreshes without new segments", OFFSET(m3u8_hold_counters), AV_OPT_TYPE_INT, {.i64 = 1000}, 0, INT_MAX, FLAGS}, {"http_persistent", "Use persistent HTTP connections", ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] doc/developer: Better {} style rule
ffmpeg | branch: master | Michael Niedermayer | Thu Feb 27 02:02:12 2025 +0100| [469b7a0ee444f208e8cc0570a9b9ba761d2f04c2] | committer: Michael Niedermayer doc/developer: Better {} style rule This makes developer.texi consistent with tools/patcheck Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=469b7a0ee444f208e8cc0570a9b9ba761d2f04c2 --- doc/developer.texi | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/doc/developer.texi b/doc/developer.texi index a1bfe180c9..757e0f0ac1 100644 --- a/doc/developer.texi +++ b/doc/developer.texi @@ -179,18 +179,17 @@ int fields = ilace ? 2 : 1; @end example @item -No braces around single-line blocks: +Don't wrap single-line blocks in braces. Use braces only if there is an accompanying else statement. This keeps future code changes easier to keep track of. @example c, good // Good -if (bits_pixel == 24) +if (bits_pixel == 24) @{ avctx->pix_fmt = AV_PIX_FMT_BGR24; -else if (bits_pixel == 8) +@} else if (bits_pixel == 8) @{ avctx->pix_fmt = AV_PIX_FMT_GRAY8; -else @{ -av_log(avctx, AV_LOG_ERROR, "Invalid pixel format.\n"); +@} else return AVERROR_INVALIDDATA; -@} + @end example @item ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] libavutil/vulkan: Expose ff_vk_set_descriptor_image
ffmpeg | branch: master | IndecisiveTurtle | Fri Feb 28 09:49:11 2025 +0200| [b37ce9b0166827bbd3a6ad4cd8959d326daf62aa] | committer: Lynne libavutil/vulkan: Expose ff_vk_set_descriptor_image Useful when creating a descriptor array of separate images > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b37ce9b0166827bbd3a6ad4cd8959d326daf62aa --- libavutil/vulkan.c | 12 ++-- libavutil/vulkan.h | 8 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/libavutil/vulkan.c b/libavutil/vulkan.c index 31610e2d94..91415957fd 100644 --- a/libavutil/vulkan.c +++ b/libavutil/vulkan.c @@ -2381,10 +2381,10 @@ static inline void update_set_pool_write(FFVulkanContext *s, FFVkExecContext *e, } } -static int vk_set_descriptor_image(FFVulkanContext *s, FFVulkanShader *shd, - FFVkExecContext *e, int set, int bind, int offs, - VkImageView view, VkImageLayout layout, - VkSampler sampler) +int ff_vk_set_descriptor_image(FFVulkanContext *s, FFVulkanShader *shd, + FFVkExecContext *e, int set, int bind, int offs, + VkImageView view, VkImageLayout layout, + VkSampler sampler) { FFVulkanDescriptorSet *desc_set = &shd->desc_set[set]; @@ -2521,8 +2521,8 @@ void ff_vk_shader_update_img_array(FFVulkanContext *s, FFVkExecContext *e, const int nb_planes = av_pix_fmt_count_planes(hwfc->sw_format); for (int i = 0; i < nb_planes; i++) -vk_set_descriptor_image(s, shd, e, set, binding, i, -views[i], layout, sampler); +ff_vk_set_descriptor_image(s, shd, e, set, binding, i, + views[i], layout, sampler); } void ff_vk_shader_update_push_const(FFVulkanContext *s, FFVkExecContext *e, diff --git a/libavutil/vulkan.h b/libavutil/vulkan.h index 8690c13b3d..617df952c4 100644 --- a/libavutil/vulkan.h +++ b/libavutil/vulkan.h @@ -590,6 +590,14 @@ int ff_vk_shader_update_desc_buffer(FFVulkanContext *s, FFVkExecContext *e, FFVkBuffer *buf, VkDeviceSize offset, VkDeviceSize len, VkFormat fmt); +/** + * Sets an image descriptor for specified shader and binding. + */ +int ff_vk_set_descriptor_image(FFVulkanContext *s, FFVulkanShader *shd, + FFVkExecContext *e, int set, int bind, int offs, + VkImageView view, VkImageLayout layout, + VkSampler sampler); + /** * Update a descriptor in a buffer with an image array.. * Must be called before binding the shader. ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] avutil/aarch64/tx_float_neon.S: clean up FFT4_X2
ffmpeg | branch: master | Krzysztof Pyrkosz via ffmpeg-devel | Tue Feb 25 21:45:56 2025 +0100| [9993a64d7bcd5baa730d1ff95f6ab4d5a49af369] | committer: Lynne avutil/aarch64/tx_float_neon.S: clean up FFT4_X2 > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=9993a64d7bcd5baa730d1ff95f6ab4d5a49af369 --- libavutil/aarch64/tx_float_neon.S | 32 1 file changed, 8 insertions(+), 24 deletions(-) diff --git a/libavutil/aarch64/tx_float_neon.S b/libavutil/aarch64/tx_float_neon.S index 78e4876d6c..d00b3f9684 100644 --- a/libavutil/aarch64/tx_float_neon.S +++ b/libavutil/aarch64/tx_float_neon.S @@ -119,13 +119,6 @@ endconst .endif .endm -const shuf_4pt_x2, align=4 -.byte 24, 25, 26, 27 // reg2, 3 -.byte 12, 13, 14, 15 // reg1, 4 -.byte8, 9, 10, 11 // reg1, 3 -.byte 28, 29, 30, 31 // reg2, 4 -endconst - // Identical to FFT4, but does 2 transforms in parallel, with no deinterleaving .macro FFT4_X2 e0, o0, e1, o1, \ t0=v16, t1=v17, t2=v18, t3=v19, t4=v20, t5=v21, t6=v22 @@ -135,18 +128,17 @@ endconst fsub\e0\().4s, \e0\().4s, \o0\().4s // t1234 fsub\e1\().4s, \e1\().4s, \o1\().4s // t1234 -movrel x5, shuf_4pt_x2 - rev64 \t4\().4s, \e0\().4s rev64 \t5\().4s, \e1\().4s -zip2\o0\().2d, \t0\().2d, \e0\().2d // t3,4 r3,4 -zip2\o1\().2d, \t2\().2d, \e1\().2d // t3,4 r3,4 +zip2\o0\().2d, \t0\().2d, \t4\().2d // t3,4 r3,4 +zip2\o1\().2d, \t2\().2d, \t5\().2d // t3,4 r3,4 -ld1 { \t6\().16b }, [x5] +fneg\t3\().4s, \t4\().4s +fneg\t4\().4s, \t5\().4s -mov \o0\().d[1], \t4\().d[1] -mov \o1\().d[1], \t5\().d[1] +mov \o0\().s[3], \t3\().s[3] +mov \o1\().s[3], \t4\().s[3] zip1\t1\().2d, \t0\().2d, \e0\().2d // t1,2 r1,2 zip1\t3\().2d, \t2\().2d, \e1\().2d // t1,2 r1,2 @@ -156,18 +148,10 @@ endconst fsub\t2\().4s, \t3\().4s, \o1\().4s // a34 b32 fadd\t3\().4s, \t3\().4s, \o1\().4s // a12 b14 -// TODO: experiment with movs instead of tables here -tbl \o0\().16b, { \t4\().16b, \t5\().16b }, \t6\().16b // b1234 -tbl \o1\().16b, { \t2\().16b, \t3\().16b }, \t6\().16b // b1234 - zip1\e0\().2d, \t5\().2d, \t4\().2d // a1234 -//zip2\o0\().2d, \t5\().2d, \t4\().2d // b1432 +zip2\o0\().2d, \t5\().2d, \t4\().2d // b1432 zip1\e1\().2d, \t3\().2d, \t2\().2d // a1234 -//zip2\o1\().2d, \t3\().2d, \t2\().2d // b1432 -//rev64 \o0\().4s, \o0\().4s // b4123 -//rev64 \o1\().4s, \o1\().4s // b4123 -//ext \o0\().16b, \o0\().16b, \o0\().16b, #4 // b1234 -//ext \o1\().16b, \o1\().16b, \o1\().16b, #4 // b1234 +zip2\o1\().2d, \t3\().2d, \t2\().2d // b1432 .endm const tab_8pt, align=4 ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".