[FFmpeg-cvslog] doc/examples/qsv_transcode: Initialize pointer before free

2024-04-24 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Wed 
Apr 24 03:30:20 2024 +0200| [cae0f2bc550312c99655057f8ffab5b59556ceeb] | 
committer: Michael Niedermayer

doc/examples/qsv_transcode: Initialize pointer before free

Fixees: CID1517023 Uninitialized pointer read

Sponsored-by: Sovereign Tech Fund
Reviewed-by: "Xiang, Haihao" 
Signed-off-by: Michael Niedermayer 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=cae0f2bc550312c99655057f8ffab5b59556ceeb
---

 doc/examples/qsv_transcode.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/doc/examples/qsv_transcode.c b/doc/examples/qsv_transcode.c
index 8e843ddd84..665a76af2e 100644
--- a/doc/examples/qsv_transcode.c
+++ b/doc/examples/qsv_transcode.c
@@ -342,7 +342,7 @@ int main(int argc, char **argv)
 {
 const AVCodec *enc_codec;
 int ret = 0;
-AVPacket *dec_pkt;
+AVPacket *dec_pkt = NULL;
 
 if (argc < 5 || (argc - 5) % 2) {
 av_log(NULL, AV_LOG_ERROR, "Usage: %s   "

___
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/examples/qsv_transcode: Simplify str_to_dict() loop

2024-04-24 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Wed 
Apr 24 03:28:00 2024 +0200| [191950d1bfc3924d1b54f236b2c35149ba4487a1] | 
committer: Michael Niedermayer

doc/examples/qsv_transcode: Simplify str_to_dict() loop

Fixes: CID1517022 Logically dead code

Sponsored-by: Sovereign Tech Fund
Reviewed-by: "Xiang, Haihao" 
Signed-off-by: Michael Niedermayer 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=191950d1bfc3924d1b54f236b2c35149ba4487a1
---

 doc/examples/qsv_transcode.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/doc/examples/qsv_transcode.c b/doc/examples/qsv_transcode.c
index a4440a3403..8e843ddd84 100644
--- a/doc/examples/qsv_transcode.c
+++ b/doc/examples/qsv_transcode.c
@@ -76,8 +76,7 @@ static int str_to_dict(char* optstr, AVDictionary **opt)
 if (value == NULL)
 return AVERROR(EINVAL);
 av_dict_set(opt, key, value, 0);
-} while(key != NULL);
-return 0;
+} while(1);
 }
 
 static int dynamic_set_parameter(AVCodecContext *avctx)

___
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/examples/vaapi_transcode: Simplify loop

2024-04-24 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Wed 
Apr 24 03:20:38 2024 +0200| [c9c11a0866d45827201b034349bceb2dc58a3499] | 
committer: Michael Niedermayer

doc/examples/vaapi_transcode: Simplify loop

Fixes: CID1428858(1/2) Logically dead code

Sponsored-by: Sovereign Tech Fund
Reviewed-by: "myp...@gmail.com" 
Signed-off-by: Michael Niedermayer 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=c9c11a0866d45827201b034349bceb2dc58a3499
---

 doc/examples/vaapi_transcode.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/doc/examples/vaapi_transcode.c b/doc/examples/vaapi_transcode.c
index 8367cb3040..e1b7a43883 100644
--- a/doc/examples/vaapi_transcode.c
+++ b/doc/examples/vaapi_transcode.c
@@ -215,10 +215,8 @@ static int dec_enc(AVPacket *pkt, const AVCodec *enc_codec)
 
 fail:
 av_frame_free();
-if (ret < 0)
-return ret;
 }
-return 0;
+return ret;
 }
 
 int main(int argc, char **argv)

___
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/examples/qsv_transcode: Simplify loop

2024-04-24 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Wed 
Apr 24 03:20:38 2024 +0200| [82cce209349d2a7c893a4f9691ec8698704b0486] | 
committer: Michael Niedermayer

doc/examples/qsv_transcode: Simplify loop

Fixes: CID1428858(2/2) Logically dead code

Sponsored-by: Sovereign Tech Fund
Reviewed-by: "Xiang, Haihao" 
Signed-off-by: Michael Niedermayer 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=82cce209349d2a7c893a4f9691ec8698704b0486
---

 doc/examples/qsv_transcode.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/doc/examples/qsv_transcode.c b/doc/examples/qsv_transcode.c
index 8e7d2899f1..a4440a3403 100644
--- a/doc/examples/qsv_transcode.c
+++ b/doc/examples/qsv_transcode.c
@@ -335,10 +335,8 @@ static int dec_enc(AVPacket *pkt, const AVCodec 
*enc_codec, char *optstr)
 
 fail:
 av_frame_free();
-if (ret < 0)
-return ret;
 }
-return 0;
+return ret;
 }
 
 int main(int argc, char **argv)

___
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] avcodec/nvenc: add high bit depth encoding for HEVC

2024-04-24 Thread Diego Felix de Souza
ffmpeg | branch: master | Diego Felix de Souza  | Fri Apr 
19 08:38:51 2024 +| [9d675bb60d2542631f37613aa92b7e1144bbeaa1] | committer: 
Timo Rothenpieler

avcodec/nvenc: add high bit depth encoding for HEVC

Adding 10-bit encoding support for HEVC if the input is 8-bit. In
case of 8-bit input content, NVENC performs an internal CUDA 8 to
10-bit conversion of the input prior to encoding. Currently, only
AV1 supports encoding 8-bit content as 10-bit.

Signed-off-by: Diego Felix de Souza 
Signed-off-by: Timo Rothenpieler 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=9d675bb60d2542631f37613aa92b7e1144bbeaa1
---

 libavcodec/nvenc.c  | 10 +-
 libavcodec/nvenc_hevc.c |  3 +++
 2 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/libavcodec/nvenc.c b/libavcodec/nvenc.c
index 794174a53f..e48224347d 100644
--- a/libavcodec/nvenc.c
+++ b/libavcodec/nvenc.c
@@ -514,7 +514,7 @@ static int nvenc_check_capabilities(AVCodecContext *avctx)
 }
 
 ret = nvenc_check_cap(avctx, NV_ENC_CAPS_SUPPORT_10BIT_ENCODE);
-if (IS_10BIT(ctx->data_pix_fmt) && ret <= 0) {
+if ((IS_10BIT(ctx->data_pix_fmt) || ctx->highbitdepth) && ret <= 0) {
 av_log(avctx, AV_LOG_WARNING, "10 bit encode not supported\n");
 return AVERROR(ENOSYS);
 }
@@ -1420,8 +1420,8 @@ static av_cold int nvenc_setup_hevc_config(AVCodecContext 
*avctx)
 break;
 }
 
-// force setting profile as main10 if input is 10 bit
-if (IS_10BIT(ctx->data_pix_fmt)) {
+// force setting profile as main10 if input is 10 bit or if it should be 
encoded as 10 bit
+if (IS_10BIT(ctx->data_pix_fmt) || ctx->highbitdepth) {
 cc->profileGUID = NV_ENC_HEVC_PROFILE_MAIN10_GUID;
 avctx->profile = AV_PROFILE_HEVC_MAIN_10;
 }
@@ -1435,8 +1435,8 @@ static av_cold int nvenc_setup_hevc_config(AVCodecContext 
*avctx)
 hevc->chromaFormatIDC = IS_YUV444(ctx->data_pix_fmt) ? 3 : 1;
 
 #ifdef NVENC_HAVE_NEW_BIT_DEPTH_API
-hevc->inputBitDepth = hevc->outputBitDepth =
-IS_10BIT(ctx->data_pix_fmt) ? NV_ENC_BIT_DEPTH_10 : NV_ENC_BIT_DEPTH_8;
+hevc->inputBitDepth = IS_10BIT(ctx->data_pix_fmt) ? NV_ENC_BIT_DEPTH_10 : 
NV_ENC_BIT_DEPTH_8;
+hevc->outputBitDepth = (IS_10BIT(ctx->data_pix_fmt) || ctx->highbitdepth) 
? NV_ENC_BIT_DEPTH_10 : NV_ENC_BIT_DEPTH_8;
 #else
 hevc->pixelBitDepthMinus8 = IS_10BIT(ctx->data_pix_fmt) ? 2 : 0;
 #endif
diff --git a/libavcodec/nvenc_hevc.c b/libavcodec/nvenc_hevc.c
index b949cb1bd7..d54e5f2512 100644
--- a/libavcodec/nvenc_hevc.c
+++ b/libavcodec/nvenc_hevc.c
@@ -183,6 +183,9 @@ static const AVOption options[] = {
 { "fullres",  "Two Pass encoding is enabled where first Pass is full 
resolution",
 0, 
   AV_OPT_TYPE_CONST, { .i64 = NV_ENC_TWO_PASS_FULL_RESOLUTION },0, 
 0,   VE, .unit = "multipass" },
 #endif
+#ifdef NVENC_HAVE_NEW_BIT_DEPTH_API
+{ "highbitdepth", "Enable 10 bit encode for 8 bit 
input",OFFSET(highbitdepth),AV_OPT_TYPE_BOOL,  { .i64 = 0 }, 0, 1, VE },
+#endif
 #ifdef NVENC_HAVE_LDKFS
 { "ldkfs","Low delay key frame scale; Specifies the Scene Change 
frame size increase allowed in case of single frame VBV and CBR",
 OFFSET(ldkfs), 
   AV_OPT_TYPE_INT,   { .i64 = 0 }, 0, UCHAR_MAX, VE },

___
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/iamf: fix mix_gain_class name

2024-04-24 Thread James Almer
ffmpeg | branch: release/7.0 | James Almer  | Wed Apr 24 
17:35:36 2024 -0300| [96d941b30ea1d7195ee13dbab192984efb5572b7] | committer: 
James Almer

avutil/iamf: fix mix_gain_class name

Signed-off-by: James Almer 
(cherry picked from commit b9af58184fd3bf6438924ce7e827ed198e517f7f)

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=96d941b30ea1d7195ee13dbab192984efb5572b7
---

 libavutil/iamf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavutil/iamf.c b/libavutil/iamf.c
index 84bed5a45e..c96100e7a0 100644
--- a/libavutil/iamf.c
+++ b/libavutil/iamf.c
@@ -74,7 +74,7 @@ static const AVOption mix_gain_options[] = {
 };
 
 static const AVClass mix_gain_class = {
-.class_name = "AVIAMFSubmixElement",
+.class_name = "AVIAMFMixGain",
 .item_name  = av_default_item_name,
 .version= LIBAVUTIL_VERSION_INT,
 .option = mix_gain_options,

___
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] fate/iamf: add a demux text

2024-04-24 Thread James Almer
ffmpeg | branch: master | James Almer  | Wed Apr 24 17:47:21 
2024 -0300| [1a8d50e379dfe48edc0d89183ded910717240a92] | committer: James Almer

fate/iamf: add a demux text

Using the same input sample as iamf-5_1-copy, in order to compare both test's 
output

Signed-off-by: James Almer 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=1a8d50e379dfe48edc0d89183ded910717240a92
---

 tests/fate/iamf.mak   |   5 +
 tests/ref/fate/iamf-5_1-demux | 409 ++
 2 files changed, 414 insertions(+)

diff --git a/tests/fate/iamf.mak b/tests/fate/iamf.mak
index c72c956358..394de0a904 100644
--- a/tests/fate/iamf.mak
+++ b/tests/fate/iamf.mak
@@ -37,6 +37,11 @@ fate-iamf-ambisonic_1: CMD = transcode wav $(SRC) iamf 
"-auto_conversion_filters
   -streamid 0:0 -streamid 1:1 -streamid 2:2 -streamid 3:3 -map [MONO0] -map 
[MONO1] -map [MONO2] -map [MONO3] -c:a flac -t 1" "-c:a copy -map 0" \
   "-show_entries 
stream_group=index,id,nb_streams,type:stream_group_components:stream_group_stream=index,id:stream_group_stream_disposition"
 
+FATE_IAMF_SAMPLES-$(call FRAMECRC, IAMF, OPUS) += fate-iamf-5_1-demux
+fate-iamf-5_1-demux: CMD = stream_demux iamf 
$(TARGET_SAMPLES)/iamf/test_59.iamf "" \
+  "-c:a copy -map 0" \
+  "-show_entries 
stream_group=index,id,nb_streams,type:stream_group_components:stream_group_stream=index,id:stream_group_stream_disposition"
+
 FATE_IAMF_SAMPLES-$(call REMUX, IAMF, OPUS_DECODER) += fate-iamf-5_1-copy
 fate-iamf-5_1-copy: CMD = stream_remux iamf 
$(TARGET_SAMPLES)/iamf/test_59.iamf "" iamf \
   "-map 0 -stream_group map=0=0:st=0:st=1:st=2:st=3 -stream_group 
map=0=1:stg=0 -streamid 0:0 -streamid 1:1 -streamid 2:2 -streamid 3:3" "" "-c:a 
copy -map 0" \
diff --git a/tests/ref/fate/iamf-5_1-demux b/tests/ref/fate/iamf-5_1-demux
new file mode 100644
index 00..1f0b67b1f7
--- /dev/null
+++ b/tests/ref/fate/iamf-5_1-demux
@@ -0,0 +1,409 @@
+#extradata 0:   19, 0x379c0490
+#extradata 1:   19, 0x379c0490
+#extradata 2:   19, 0x3792048f
+#extradata 3:   19, 0x3792048f
+#tb 0: 1/48000
+#media_type 0: audio
+#codec_id 0: opus
+#sample_rate 0: 48000
+#channel_layout_name 0: stereo
+#tb 1: 1/48000
+#media_type 1: audio
+#codec_id 1: opus
+#sample_rate 1: 48000
+#channel_layout_name 1: stereo
+#tb 2: 1/48000
+#media_type 2: audio
+#codec_id 2: opus
+#sample_rate 2: 48000
+#channel_layout_name 2: mono
+#tb 3: 1/48000
+#media_type 3: audio
+#codec_id 3: opus
+#sample_rate 3: 48000
+#channel_layout_name 3: mono
+0,  0,  0,  960,  371, 0x552eba36, S=3,   10,  
 96,  136
+1,  0,  0,  960,  381, 0x6779b329, S=3,   10,  
 96,  136
+2,  0,  0,  960,   66, 0x4ce02142, S=3,   10,  
 96,  136
+3,  0,  0,  960,   67, 0x935223f9, S=3,   10,  
 96,  136
+0,960,960,  960,  313, 0xa5e19a4f, S=2,   96,  
136
+1,960,960,  960,  339, 0xf83daf6a, S=2,   96,  
136
+2,960,960,  960,   62, 0x80c91ca8, S=2,   96,  
136
+3,960,960,  960,   64, 0xaae41dd7, S=2,   96,  
136
+0,   1920,   1920,  960,  210, 0x5fc26f7a, S=2,   96,  
136
+1,   1920,   1920,  960,  207, 0xc8c768e8, S=2,   96,  
136
+2,   1920,   1920,  960,   75, 0x85012598, S=2,   96,  
136
+3,   1920,   1920,  960,   94, 0x5dc52d3b, S=2,   96,  
136
+0,   2880,   2880,  960,  211, 0x8f006c62, S=2,   96,  
136
+1,   2880,   2880,  960,  215, 0x30c8674d, S=2,   96,  
136
+2,   2880,   2880,  960,   88, 0x46772b87, S=2,   96,  
136
+3,   2880,   2880,  960,  105, 0x831c3191, S=2,   96,  
136
+0,   3840,   3840,  960,  340, 0x3c92a527, S=2,   96,  
136
+1,   3840,   3840,  960,  303, 0x65e09e91, S=2,   96,  
136
+2,   3840,   3840,  960,  121, 0xc45d3ec1, S=2,   96,  
136
+3,   3840,   3840,  960,  126, 0xff3a44d7, S=2,   96,  
136
+0,   4800,   4800,  960,  206, 0x3087662a, S=2,   96,  
136
+1,   4800,   4800,  960,  206, 0xd2b469de, S=2,   96,  
136
+2,   4800,   4800,  960,  124, 0xd9423baf, S=2,   96,  
136
+3,   4800,   4800,  960,  121, 0x24073ab0, S=2,   96,  
136
+0,   5760,   5760,  960,  212, 0x85686b01, S=2,   96,  
136
+1,   5760,   5760,  960,  230, 0x7ce56f22, S=2,   96,  
136
+2,   5760,   5760,  960,  128, 0xca6840ad, S=2,   96,  
136
+3,   5760,   5760,  960,  138, 0xa1f24207, S=2,   96,  
136
+0,   6720,   6720,  960,  

[FFmpeg-cvslog] fftools/ffmpeg_mux_init: remove leftover debug log messages

2024-04-24 Thread James Almer
ffmpeg | branch: master | James Almer  | Wed Apr 24 17:36:45 
2024 -0300| [f684228407c988c1789539be6945fe9dc939602f] | committer: James Almer

fftools/ffmpeg_mux_init: remove leftover debug log messages

Signed-off-by: James Almer 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=f684228407c988c1789539be6945fe9dc939602f
---

 fftools/ffmpeg_mux_init.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/fftools/ffmpeg_mux_init.c b/fftools/ffmpeg_mux_init.c
index a46b0628d8..3b3b22f7ed 100644
--- a/fftools/ffmpeg_mux_init.c
+++ b/fftools/ffmpeg_mux_init.c
@@ -2303,7 +2303,6 @@ static int of_map_group(Muxer *mux, AVDictionary **dict, 
AVBPrint *bp, const cha
 av_log(mux, AV_LOG_ERROR, "Error parsing mapped group specification 
%s\n", ptr);
 av_dict_set_int(dict, "type", stg->type, 0);
 
-av_log(mux, AV_LOG_VERBOSE, "stg %s\n", bp->str);
 av_bprint_clear(bp);
 switch(stg->type) {
 case AV_STREAM_GROUP_PARAMS_IAMF_AUDIO_ELEMENT: {
@@ -2353,7 +2352,6 @@ static int of_map_group(Muxer *mux, AVDictionary **dict, 
AVBPrint *bp, const cha
 ret = AVERROR(EINVAL);
 break;
 }
-av_log(mux, AV_LOG_VERBOSE, "extra %s\n", bp->str);
 return 0;
 }
 

___
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] fftools/ffmpeg_mux_init: add missing IAMF Param Definition copies

2024-04-24 Thread James Almer
ffmpeg | branch: master | James Almer  | Wed Apr 24 17:31:45 
2024 -0300| [8c27cdd2d47b2055cf73d530ce3b6a6e1dfde5ce] | committer: James Almer

fftools/ffmpeg_mux_init: add missing IAMF Param Definition copies

Signed-off-by: James Almer 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=8c27cdd2d47b2055cf73d530ce3b6a6e1dfde5ce
---

 fftools/ffmpeg_mux_init.c| 25 +
 tests/ref/fate/iamf-5_1-copy |  2 +-
 2 files changed, 26 insertions(+), 1 deletion(-)

diff --git a/fftools/ffmpeg_mux_init.c b/fftools/ffmpeg_mux_init.c
index 3b3b22f7ed..8797265145 100644
--- a/fftools/ffmpeg_mux_init.c
+++ b/fftools/ffmpeg_mux_init.c
@@ -2257,6 +2257,15 @@ static int of_serialize_options(Muxer *mux, void *obj, 
AVBPrint *bp)
 return ret; \
 } while (0)
 
+#define SERIALIZE_LOOP_SUBBLOCK(obj) do {\
+for (int k = 0; k < obj->nb_subblocks; k++) {\
+ret = of_serialize_options(mux,  \
+  av_iamf_param_definition_get_subblock(obj, k), bp);\
+if (ret < 0) \
+return ret;  \
+}\
+} while (0)
+
 #define SERIALIZE_LOOP(parent, child, suffix, separator) do {\
 for (int j = 0; j < parent->nb_## child ## suffix; j++) {\
 av_bprintf(bp, separator#child "="); \
@@ -2309,12 +2318,20 @@ static int of_map_group(Muxer *mux, AVDictionary 
**dict, AVBPrint *bp, const cha
 AVIAMFAudioElement *audio_element = stg->params.iamf_audio_element;
 
 if (audio_element->demixing_info) {
+AVIAMFParamDefinition *demixing_info = 
audio_element->demixing_info;
 av_bprintf(bp, ",demixing=");
 SERIALIZE(audio_element, demixing_info);
+if (ret && demixing_info->nb_subblocks)
+av_bprintf(bp, ":");
+SERIALIZE_LOOP_SUBBLOCK(demixing_info);
 }
 if (audio_element->recon_gain_info) {
+AVIAMFParamDefinition *recon_gain_info = 
audio_element->recon_gain_info;
 av_bprintf(bp, ",recon_gain=");
 SERIALIZE(audio_element, recon_gain_info);
+if (ret && recon_gain_info->nb_subblocks)
+av_bprintf(bp, ":");
+SERIALIZE_LOOP_SUBBLOCK(recon_gain_info);
 }
 SERIALIZE_LOOP(audio_element, layer, s, ",");
 break;
@@ -2324,11 +2341,16 @@ static int of_map_group(Muxer *mux, AVDictionary 
**dict, AVBPrint *bp, const cha
 
 for (int i = 0; i < mix->nb_submixes; i++) {
 AVIAMFSubmix *submix = mix->submixes[i];
+AVIAMFParamDefinition *output_mix_config = 
submix->output_mix_config;
 
 av_bprintf(bp, ",submix=");
 SERIALIZE(mix, submixes[i]);
+if (ret && output_mix_config->nb_subblocks)
+av_bprintf(bp, ":");
+SERIALIZE_LOOP_SUBBLOCK(output_mix_config);
 for (int j = 0; j < submix->nb_elements; j++) {
 AVIAMFSubmixElement *element = submix->elements[j];
+AVIAMFParamDefinition *element_mix_config = 
element->element_mix_config;
 int64_t id = get_stream_group_index_from_id(mux, 
element->audio_element_id);
 
 if (id < 0) {
@@ -2339,6 +2361,9 @@ static int of_map_group(Muxer *mux, AVDictionary **dict, 
AVBPrint *bp, const cha
 
 av_bprintf(bp, "|element=");
 SERIALIZE(submix, elements[j]);
+if (ret && element_mix_config->nb_subblocks)
+av_bprintf(bp, ":");
+SERIALIZE_LOOP_SUBBLOCK(element_mix_config);
 if (ret)
 av_bprintf(bp, ":");
 av_bprintf(bp, "stg=%"PRId64, id);
diff --git a/tests/ref/fate/iamf-5_1-copy b/tests/ref/fate/iamf-5_1-copy
index 92409a43c7..1f0b67b1f7 100644
--- a/tests/ref/fate/iamf-5_1-copy
+++ b/tests/ref/fate/iamf-5_1-copy
@@ -155,7 +155,7 @@ duration=960
 constant_subblock_duration=960
 [PIECE]
 subblock_duration=960
-dmixp_mode=0
+dmixp_mode=1
 [/PIECE]
 [/SUBCOMPONENT]
 [SUBCOMPONENT]

___
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/iamf: fix mix_gain_class name

2024-04-24 Thread James Almer
ffmpeg | branch: master | James Almer  | Wed Apr 24 17:35:36 
2024 -0300| [b9af58184fd3bf6438924ce7e827ed198e517f7f] | committer: James Almer

avutil/iamf: fix mix_gain_class name

Signed-off-by: James Almer 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b9af58184fd3bf6438924ce7e827ed198e517f7f
---

 libavutil/iamf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavutil/iamf.c b/libavutil/iamf.c
index 84bed5a45e..c96100e7a0 100644
--- a/libavutil/iamf.c
+++ b/libavutil/iamf.c
@@ -74,7 +74,7 @@ static const AVOption mix_gain_options[] = {
 };
 
 static const AVClass mix_gain_class = {
-.class_name = "AVIAMFSubmixElement",
+.class_name = "AVIAMFMixGain",
 .item_name  = av_default_item_name,
 .version= LIBAVUTIL_VERSION_INT,
 .option = mix_gain_options,

___
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] fate/iamf: add a remux test with stream group copying

2024-04-24 Thread James Almer
ffmpeg | branch: master | James Almer  | Wed Apr 24 13:25:42 
2024 -0300| [8c0045f013be046ab9f13accf9c5322a9fa00e51] | committer: James Almer

fate/iamf: add a remux test with stream group copying

Signed-off-by: James Almer 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=8c0045f013be046ab9f13accf9c5322a9fa00e51
---

 tests/fate/iamf.mak  |   9 +-
 tests/ref/fate/iamf-5_1-copy | 409 +++
 2 files changed, 417 insertions(+), 1 deletion(-)

diff --git a/tests/fate/iamf.mak b/tests/fate/iamf.mak
index cf56a67e6f..c72c956358 100644
--- a/tests/fate/iamf.mak
+++ b/tests/fate/iamf.mak
@@ -37,8 +37,15 @@ fate-iamf-ambisonic_1: CMD = transcode wav $(SRC) iamf 
"-auto_conversion_filters
   -streamid 0:0 -streamid 1:1 -streamid 2:2 -streamid 3:3 -map [MONO0] -map 
[MONO1] -map [MONO2] -map [MONO3] -c:a flac -t 1" "-c:a copy -map 0" \
   "-show_entries 
stream_group=index,id,nb_streams,type:stream_group_components:stream_group_stream=index,id:stream_group_stream_disposition"
 
+FATE_IAMF_SAMPLES-$(call REMUX, IAMF, OPUS_DECODER) += fate-iamf-5_1-copy
+fate-iamf-5_1-copy: CMD = stream_remux iamf 
$(TARGET_SAMPLES)/iamf/test_59.iamf "" iamf \
+  "-map 0 -stream_group map=0=0:st=0:st=1:st=2:st=3 -stream_group 
map=0=1:stg=0 -streamid 0:0 -streamid 1:1 -streamid 2:2 -streamid 3:3" "" "-c:a 
copy -map 0" \
+  "-show_entries 
stream_group=index,id,nb_streams,type:stream_group_components:stream_group_stream=index,id:stream_group_stream_disposition"
+
 FATE_IAMF += $(FATE_IAMF-yes)
+FATE_IAMF_SAMPLES += $(FATE_IAMF_SAMPLES-yes)
 
 FATE_FFMPEG_FFPROBE += $(FATE_IAMF)
+FATE_SAMPLES_FFMPEG_FFPROBE += $(FATE_IAMF_SAMPLES)
 
-fate-iamf: $(FATE_IAMF)
+fate-iamf: $(FATE_IAMF) $(FATE_IAMF_SAMPLES)
diff --git a/tests/ref/fate/iamf-5_1-copy b/tests/ref/fate/iamf-5_1-copy
new file mode 100644
index 00..92409a43c7
--- /dev/null
+++ b/tests/ref/fate/iamf-5_1-copy
@@ -0,0 +1,409 @@
+#extradata 0:   19, 0x379c0490
+#extradata 1:   19, 0x379c0490
+#extradata 2:   19, 0x3792048f
+#extradata 3:   19, 0x3792048f
+#tb 0: 1/48000
+#media_type 0: audio
+#codec_id 0: opus
+#sample_rate 0: 48000
+#channel_layout_name 0: stereo
+#tb 1: 1/48000
+#media_type 1: audio
+#codec_id 1: opus
+#sample_rate 1: 48000
+#channel_layout_name 1: stereo
+#tb 2: 1/48000
+#media_type 2: audio
+#codec_id 2: opus
+#sample_rate 2: 48000
+#channel_layout_name 2: mono
+#tb 3: 1/48000
+#media_type 3: audio
+#codec_id 3: opus
+#sample_rate 3: 48000
+#channel_layout_name 3: mono
+0,  0,  0,  960,  371, 0x552eba36, S=3,   10,  
 96,  136
+1,  0,  0,  960,  381, 0x6779b329, S=3,   10,  
 96,  136
+2,  0,  0,  960,   66, 0x4ce02142, S=3,   10,  
 96,  136
+3,  0,  0,  960,   67, 0x935223f9, S=3,   10,  
 96,  136
+0,960,960,  960,  313, 0xa5e19a4f, S=2,   96,  
136
+1,960,960,  960,  339, 0xf83daf6a, S=2,   96,  
136
+2,960,960,  960,   62, 0x80c91ca8, S=2,   96,  
136
+3,960,960,  960,   64, 0xaae41dd7, S=2,   96,  
136
+0,   1920,   1920,  960,  210, 0x5fc26f7a, S=2,   96,  
136
+1,   1920,   1920,  960,  207, 0xc8c768e8, S=2,   96,  
136
+2,   1920,   1920,  960,   75, 0x85012598, S=2,   96,  
136
+3,   1920,   1920,  960,   94, 0x5dc52d3b, S=2,   96,  
136
+0,   2880,   2880,  960,  211, 0x8f006c62, S=2,   96,  
136
+1,   2880,   2880,  960,  215, 0x30c8674d, S=2,   96,  
136
+2,   2880,   2880,  960,   88, 0x46772b87, S=2,   96,  
136
+3,   2880,   2880,  960,  105, 0x831c3191, S=2,   96,  
136
+0,   3840,   3840,  960,  340, 0x3c92a527, S=2,   96,  
136
+1,   3840,   3840,  960,  303, 0x65e09e91, S=2,   96,  
136
+2,   3840,   3840,  960,  121, 0xc45d3ec1, S=2,   96,  
136
+3,   3840,   3840,  960,  126, 0xff3a44d7, S=2,   96,  
136
+0,   4800,   4800,  960,  206, 0x3087662a, S=2,   96,  
136
+1,   4800,   4800,  960,  206, 0xd2b469de, S=2,   96,  
136
+2,   4800,   4800,  960,  124, 0xd9423baf, S=2,   96,  
136
+3,   4800,   4800,  960,  121, 0x24073ab0, S=2,   96,  
136
+0,   5760,   5760,  960,  212, 0x85686b01, S=2,   96,  
136
+1,   5760,   5760,  960,  230, 0x7ce56f22, S=2,   96,  
136
+2,   5760,   5760,  960,  128, 0xca6840ad, S=2,   96,  
136
+3,   5760,   5760,  960,  138, 0xa1f24207, S=2,   96,  
136
+0,   6720,   6720,  

[FFmpeg-cvslog] av1dec: Fix RefFrameSignBias calculation

2024-04-24 Thread Mark Thompson
ffmpeg | branch: release/7.0 | Mark Thompson  | Mon Apr 22 
21:24:20 2024 +0100| [9963b9e3c9e51ae6fb5ff4df5a26a459922dc51c] | committer: 
Lynne

av1dec: Fix RefFrameSignBias calculation

(cherry picked from commit ba6b08c75b6e8394c5c53bde22623a393a2d1c47)

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=9963b9e3c9e51ae6fb5ff4df5a26a459922dc51c
---

 libavcodec/av1dec.c | 9 +++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/libavcodec/av1dec.c b/libavcodec/av1dec.c
index 2850dc96ff..1d3c5dfc9d 100644
--- a/libavcodec/av1dec.c
+++ b/libavcodec/av1dec.c
@@ -372,8 +372,13 @@ static void order_hint_info(AV1DecContext *s)
 int ref_order_hint = s->ref[ref_slot].order_hint;
 
 frame->order_hints[ref_name] = ref_order_hint;
-frame->ref_frame_sign_bias[ref_name] =
-get_relative_dist(seq, ref_order_hint, frame->order_hint);
+if (!seq->enable_order_hint) {
+frame->ref_frame_sign_bias[ref_name] = 0;
+} else {
+frame->ref_frame_sign_bias[ref_name] =
+get_relative_dist(seq, ref_order_hint,
+  frame->order_hint) > 0;
+}
 }
 }
 

___
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".