On 1/13/2025 12:49 AM, Michael Niedermayer wrote:
Hi JamesOn Sun, Jan 12, 2025 at 06:52:55PM -0300, James Almer wrote:On 1/12/2025 6:25 PM, Michael Niedermayer wrote:Hi On Sat, Jan 11, 2025 at 11:13:30AM -0300, James Almer wrote:With this, the output from ffmpeg -i $fate-samples/ac3/monsters_inc_5.1_448_small.ac3 -af aresample,aformat=channel_layouts=mono -f s16le - matches the one from ffmpeg -downmix mono -i $fate-samples/ac3/monsters_inc_5.1_448_small.ac3 -f s16le - When testing with tiny_psnr. Signed-off-by: James Almer <[email protected]> --- libswresample/rematrix.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)This worsense test results:What test is this, and how is it read?its just tests/swresample and a dumb script that tries to compare its output to spot cases that worsen
Is this any better? (Also makes the above command line match)
diff --git a/libswresample/rematrix.c b/libswresample/rematrix.c
index b9bf4dcac0..af89c30451 100644
--- a/libswresample/rematrix.c
+++ b/libswresample/rematrix.c
@@ -217,7 +217,7 @@ av_cold int swr_build_matrix2(const AVChannelLayout
*in_layout, const AVChannelL
matrix[FRONT_CENTER][ FRONT_LEFT]+= M_SQRT1_2;
matrix[FRONT_CENTER][FRONT_RIGHT]+= M_SQRT1_2;
if (av_channel_layout_index_from_channel(&in_ch_layout,
AV_CHAN_FRONT_CENTER) >= 0)
- matrix[FRONT_CENTER][ FRONT_CENTER] = center_mix_level*sqrt(2);
+ matrix[FRONT_CENTER][ FRONT_CENTER] +=
center_mix_level*sqrt(2);
}else
av_assert0(0);
}
@@ -334,7 +334,7 @@ av_cold int swr_build_matrix2(const AVChannelLayout
*in_layout, const AVChannelL
matrix[TOP_FRONT_CENTER][TOP_FRONT_LEFT ] += M_SQRT1_2;
matrix[TOP_FRONT_CENTER][TOP_FRONT_RIGHT] += M_SQRT1_2;
if (av_channel_layout_index_from_channel(&in_ch_layout,
AV_CHAN_TOP_FRONT_CENTER) >= 0)
- matrix[TOP_FRONT_CENTER][TOP_FRONT_CENTER] = center_mix_level
* sqrt(2);
+ matrix[TOP_FRONT_CENTER][TOP_FRONT_CENTER] += center_mix_level
* sqrt(2);
} else if (av_channel_layout_index_from_channel(&out_ch_layout,
AV_CHAN_FRONT_LEFT) >= 0) {
if (av_channel_layout_index_from_channel(&in_ch_layout,
AV_CHAN_FRONT_LEFT) >= 0) {
matrix[FRONT_LEFT ][TOP_FRONT_LEFT ] += M_SQRT1_2;
OpenPGP_signature.asc
Description: OpenPGP digital signature
_______________________________________________ ffmpeg-devel mailing list [email protected] https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email [email protected] with subject "unsubscribe".
