[FFmpeg-devel] [PATCH 05/10] avfilter/vf_swapuv: Remove empty options and AVClass

2024-03-30 Thread Andreas Rheinhardt
This filter only had an AVClass and empty options because up until
recently, avfilter_init_str() errored out when options were provided
for a filter without an AVClass. But setting (generic) options is
necessary to take advantage of timeline support. So with
avfilter_init_str() fixed, the AVClass and the options can be removed.

Signed-off-by: Andreas Rheinhardt 
---
 libavfilter/vf_swapuv.c | 13 -
 1 file changed, 13 deletions(-)

diff --git a/libavfilter/vf_swapuv.c b/libavfilter/vf_swapuv.c
index df04631d20..7965dc5dd1 100644
--- a/libavfilter/vf_swapuv.c
+++ b/libavfilter/vf_swapuv.c
@@ -23,23 +23,12 @@
  * swap UV filter
  */
 
-#include "libavutil/opt.h"
 #include "libavutil/pixdesc.h"
 #include "avfilter.h"
 #include "formats.h"
 #include "internal.h"
 #include "video.h"
 
-typedef struct SwapUVContext {
-const AVClass *class;
-} SwapUVContext;
-
-static const AVOption swapuv_options[] = {
-{ NULL }
-};
-
-AVFILTER_DEFINE_CLASS(swapuv);
-
 static void do_swap(AVFrame *frame)
 {
 FFSWAP(uint8_t*, frame->data[1], frame->data[2]);
@@ -104,8 +93,6 @@ static const AVFilterPad swapuv_inputs[] = {
 const AVFilter ff_vf_swapuv = {
 .name  = "swapuv",
 .description   = NULL_IF_CONFIG_SMALL("Swap U and V components."),
-.priv_size = sizeof(SwapUVContext),
-.priv_class= _class,
 FILTER_INPUTS(swapuv_inputs),
 FILTER_OUTPUTS(ff_video_default_filterpad),
 FILTER_QUERY_FUNC(query_formats),
-- 
2.40.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 10/10] all: Don't use av_uninit

2024-03-30 Thread Andreas Rheinhardt
It is unnecessary, because we use -Wno-maybe-unitialized with GCC
nowadays.

Signed-off-by: Andreas Rheinhardt 
---
 libavcodec/ac3enc.c| 4 ++--
 libavcodec/ac3enc_template.c   | 4 ++--
 libavcodec/bfi.c   | 2 +-
 libavcodec/dvdsubenc.c | 2 +-
 libavcodec/eamad.c | 2 +-
 libavcodec/ffv1enc_template.c  | 2 +-
 libavcodec/flacdec.c   | 2 +-
 libavcodec/lpc.c   | 2 +-
 libavcodec/mpeg4videodec.c | 2 +-
 libavcodec/msmpeg4dec.c| 2 +-
 libavcodec/ppc/mpegaudiodsp_altivec.c  | 2 +-
 libavcodec/qtrleenc.c  | 2 +-
 libavcodec/ra144enc.c  | 4 ++--
 libavcodec/vp8.c   | 2 +-
 libavcodec/wmavoice.c  | 4 ++--
 libavfilter/af_aecho.c | 2 +-
 libavfilter/af_compand.c   | 2 +-
 libavfilter/vsrc_mandelbrot.c  | 2 +-
 libavformat/electronicarts.c   | 2 +-
 libavformat/flvdec.c   | 4 ++--
 libavformat/srtp.c | 4 ++--
 libavformat/tests/seek.c   | 2 +-
 libavformat/wavdec.c   | 2 +-
 libpostproc/postprocess_altivec_template.c | 4 ++--
 libswscale/yuv2rgb.c   | 2 +-
 25 files changed, 32 insertions(+), 32 deletions(-)

diff --git a/libavcodec/ac3enc.c b/libavcodec/ac3enc.c
index 7a6bcf7900..4d3049f012 100644
--- a/libavcodec/ac3enc.c
+++ b/libavcodec/ac3enc.c
@@ -1482,7 +1482,7 @@ static void ac3_output_frame_header(AC3EncodeContext *s)
  */
 static void output_audio_block(AC3EncodeContext *s, int blk)
 {
-int ch, i, baie, bnd, got_cpl, av_uninit(ch0);
+int ch, i, baie, bnd, got_cpl, ch0;
 AC3Block *block = >blocks[blk];
 
 /* block switching */
@@ -2383,7 +2383,7 @@ static av_cold int validate_options(AC3EncodeContext *s)
  */
 static av_cold void set_bandwidth(AC3EncodeContext *s)
 {
-int blk, ch, av_uninit(cpl_start);
+int blk, ch, cpl_start;
 
 if (s->cutoff) {
 /* calculate bandwidth based on user-specified cutoff frequency */
diff --git a/libavcodec/ac3enc_template.c b/libavcodec/ac3enc_template.c
index 45dbc98804..ea0402fac4 100644
--- a/libavcodec/ac3enc_template.c
+++ b/libavcodec/ac3enc_template.c
@@ -117,7 +117,7 @@ static void apply_channel_coupling(AC3EncodeContext *s)
 #else
 int32_t (*fixed_cpl_coords)[AC3_MAX_CHANNELS][16] = cpl_coords;
 #endif
-int av_uninit(blk), ch, bnd, i, j;
+int blk, ch, bnd, i, j;
 CoefSumType energy[AC3_MAX_BLOCKS][AC3_MAX_CHANNELS][16] = {{{0}}};
 int cpl_start, num_cpl_coefs;
 
@@ -231,7 +231,7 @@ static void apply_channel_coupling(AC3EncodeContext *s)
 for (bnd = 0; bnd < s->num_cpl_bands; bnd++) {
 blk = 0;
 while (blk < s->num_blocks) {
-int av_uninit(blk1);
+int blk1;
 AC3Block *block  = >blocks[blk];
 
 if (!block->cpl_in_use) {
diff --git a/libavcodec/bfi.c b/libavcodec/bfi.c
index 58158f6eee..ef5dd0ce85 100644
--- a/libavcodec/bfi.c
+++ b/libavcodec/bfi.c
@@ -103,7 +103,7 @@ FF_ENABLE_DEPRECATION_WARNINGS
 
 while (dst != frame_end) {
 static const uint8_t lentab[4] = { 0, 2, 0, 1 };
-unsigned int byte   = bytestream2_get_byte(), av_uninit(offset);
+unsigned int byte   = bytestream2_get_byte(), offset;
 unsigned int code   = byte >> 6;
 unsigned int length = byte & ~0xC0;
 
diff --git a/libavcodec/dvdsubenc.c b/libavcodec/dvdsubenc.c
index c6110c29ff..c312da8afc 100644
--- a/libavcodec/dvdsubenc.c
+++ b/libavcodec/dvdsubenc.c
@@ -123,7 +123,7 @@ static void count_colors(AVCodecContext *avctx, unsigned 
hits[33],
 unsigned count[256] = { 0 };
 uint32_t *palette = (uint32_t *)r->data[1];
 uint32_t color;
-int x, y, i, j, match, d, best_d, av_uninit(best_j);
+int x, y, i, j, match, d, best_d, best_j;
 uint8_t *p = r->data[0];
 
 for (y = 0; y < r->h; y++) {
diff --git a/libavcodec/eamad.c b/libavcodec/eamad.c
index 1c3f97653c..12a0f50124 100644
--- a/libavcodec/eamad.c
+++ b/libavcodec/eamad.c
@@ -205,7 +205,7 @@ static int decode_motion(GetBitContext *gb)
 static int decode_mb(MadContext *s, AVFrame *frame, int inter)
 {
 int mv_map = 0;
-int av_uninit(mv_x), av_uninit(mv_y);
+int mv_x, mv_y;
 int j;
 
 if (inter) {
diff --git a/libavcodec/ffv1enc_template.c b/libavcodec/ffv1enc_template.c
index 8953dbe07c..e8350d4862 100644
--- a/libavcodec/ffv1enc_template.c
+++ b/libavcodec/ffv1enc_template.c
@@ -148,7 +148,7 @@ static int RENAME(encode_rgb_frame)(FFV1Context *s, const 
uint8_t *src[4],
 sample[p][i]= RENAME(s->sample_buffer) + p*ring_size*(w+6) + 
((h+i-y)%ring_size)*(w+6) + 3;
 
 for (x = 0; x < w; x++) {
-int b, g, r, av_uninit(a);
+int b, g, r, a;
 if (lbd) {
  

[FFmpeg-devel] [PATCH 09/10] avfilter/avfilter: Don't use av_uninit

2024-03-30 Thread Andreas Rheinhardt
GCC 9-13 do not emit warnings for this at all optimization
levels even when -Wmaybe-uninitialized is not disabled.

Signed-off-by: Andreas Rheinhardt 
---
 libavfilter/avfilter.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c
index 21d6832deb..7f94e71fbc 100644
--- a/libavfilter/avfilter.c
+++ b/libavfilter/avfilter.c
@@ -835,14 +835,14 @@ int ff_filter_opt_parse(void *logctx, const AVClass 
*priv_class,
 {
 const AVOption *o = NULL;
 int ret;
-char *av_uninit(parsed_key), *av_uninit(value);
-const char *key;
 int offset= -1;
 
 if (!args)
 return 0;
 
 while (*args) {
+char *parsed_key, *value;
+const char *key;
 const char *shorthand = NULL;
 int additional_flags  = 0;
 
-- 
2.40.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 08/10] avfilter/vf_grayworld: Remove empty options and AVClass

2024-03-30 Thread Andreas Rheinhardt
This filter only had an AVClass and empty options because up until
recently, avfilter_init_str() errored out when options were provided
for a filter without an AVClass. But setting (generic) options is
necessary to take advantage of timeline support. So with
avfilter_init_str() fixed, the AVClass and the options can be removed.

Signed-off-by: Andreas Rheinhardt 
---
 libavfilter/vf_grayworld.c | 11 ---
 1 file changed, 11 deletions(-)

diff --git a/libavfilter/vf_grayworld.c b/libavfilter/vf_grayworld.c
index 61ed832253..0b6d673168 100644
--- a/libavfilter/vf_grayworld.c
+++ b/libavfilter/vf_grayworld.c
@@ -27,7 +27,6 @@
 
 #include "libavutil/imgutils.h"
 #include "libavutil/mem.h"
-#include "libavutil/opt.h"
 
 #include "avfilter.h"
 #include "internal.h"
@@ -41,20 +40,11 @@ typedef struct ThreadData {
 } ThreadData;
 
 typedef struct GrayWorldContext {
-const AVClass *class;
 float *tmpplab;
 int *line_count_pels;
 float *line_sum;
 } GrayWorldContext;
 
-#define OFFSET(x) offsetof(GrayWorldContext, x)
-#define FLAGS AV_OPT_FLAG_FILTERING_PARAM | AV_OPT_FLAG_VIDEO_PARAM | 
AV_OPT_FLAG_RUNTIME_PARAM
-static const AVOption grayworld_options[] = {
-{ NULL }
-};
-
-AVFILTER_DEFINE_CLASS(grayworld);
-
 static void apply_matrix(const float matrix[3][3], const float input[3], float 
output[3])
 {
 output[0] = matrix[0][0] * input[0] + matrix[0][1] * input[1] + 
matrix[0][2] * input[2];
@@ -311,7 +301,6 @@ const AVFilter ff_vf_grayworld = {
 .name  = "grayworld",
 .description   = NULL_IF_CONFIG_SMALL("Adjust white balance using LAB gray 
world algorithm"),
 .priv_size = sizeof(GrayWorldContext),
-.priv_class= _class,
 FILTER_INPUTS(grayworld_inputs),
 FILTER_OUTPUTS(ff_video_default_filterpad),
 FILTER_PIXFMTS(AV_PIX_FMT_GBRPF32, AV_PIX_FMT_GBRAPF32),
-- 
2.40.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 07/10] avfilter/vf_hflip: Remove empty options and AVClass

2024-03-30 Thread Andreas Rheinhardt
This filter only had an AVClass and empty options because up until
recently, avfilter_init_str() errored out when options were provided
for a filter without an AVClass. But setting (generic) options is
necessary to take advantage of timeline support. So with
avfilter_init_str() fixed, the AVClass and the options can be removed.

Signed-off-by: Andreas Rheinhardt 
---
 libavfilter/hflip.h | 3 +--
 libavfilter/vf_hflip.c  | 8 
 libavfilter/vf_hflip_init.h | 1 +
 3 files changed, 2 insertions(+), 10 deletions(-)

diff --git a/libavfilter/hflip.h b/libavfilter/hflip.h
index 8532dc0f46..0d8b1025f3 100644
--- a/libavfilter/hflip.h
+++ b/libavfilter/hflip.h
@@ -22,10 +22,9 @@
 #ifndef AVFILTER_HFLIP_H
 #define AVFILTER_HFLIP_H
 
-#include "avfilter.h"
+#include 
 
 typedef struct FlipContext {
-const AVClass *class;
 int max_step[4];///< max pixel step for each plane, expressed as a 
number of bytes
 int bayer_plus1;///< 1 .. not a Bayer input format, 2 .. Bayer input 
format
 int planewidth[4];  ///< width of each plane
diff --git a/libavfilter/vf_hflip.c b/libavfilter/vf_hflip.c
index 09f4e08ea3..9f5958a392 100644
--- a/libavfilter/vf_hflip.c
+++ b/libavfilter/vf_hflip.c
@@ -26,7 +26,6 @@
 
 #include 
 
-#include "libavutil/opt.h"
 #include "avfilter.h"
 #include "formats.h"
 #include "hflip.h"
@@ -38,12 +37,6 @@
 #include "libavutil/intreadwrite.h"
 #include "libavutil/imgutils.h"
 
-static const AVOption hflip_options[] = {
-{ NULL }
-};
-
-AVFILTER_DEFINE_CLASS(hflip);
-
 static int query_formats(AVFilterContext *ctx)
 {
 AVFilterFormats *pix_fmts = NULL;
@@ -155,7 +148,6 @@ const AVFilter ff_vf_hflip = {
 .name  = "hflip",
 .description   = NULL_IF_CONFIG_SMALL("Horizontally flip the input 
video."),
 .priv_size = sizeof(FlipContext),
-.priv_class= _class,
 FILTER_INPUTS(avfilter_vf_hflip_inputs),
 FILTER_OUTPUTS(ff_video_default_filterpad),
 FILTER_QUERY_FUNC(query_formats),
diff --git a/libavfilter/vf_hflip_init.h b/libavfilter/vf_hflip_init.h
index d0319f463d..5c1d69b2b6 100644
--- a/libavfilter/vf_hflip_init.h
+++ b/libavfilter/vf_hflip_init.h
@@ -26,6 +26,7 @@
 
 #include "config.h"
 #include "libavutil/attributes.h"
+#include "libavutil/error.h"
 #include "libavutil/intreadwrite.h"
 #include "hflip.h"
 
-- 
2.40.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 06/10] avfilter/vf_vflip: Remove empty options and AVClass

2024-03-30 Thread Andreas Rheinhardt
This filter only had an AVClass and empty options because up until
recently, avfilter_init_str() errored out when options were provided
for a filter without an AVClass. But setting (generic) options is
necessary to take advantage of timeline support. So with
avfilter_init_str() fixed, the AVClass and the options can be removed.

Signed-off-by: Andreas Rheinhardt 
---
 libavfilter/vf_vflip.c | 9 -
 1 file changed, 9 deletions(-)

diff --git a/libavfilter/vf_vflip.c b/libavfilter/vf_vflip.c
index 8d6724ed37..d72605bef0 100644
--- a/libavfilter/vf_vflip.c
+++ b/libavfilter/vf_vflip.c
@@ -24,24 +24,16 @@
  */
 
 #include "libavutil/internal.h"
-#include "libavutil/opt.h"
 #include "libavutil/pixdesc.h"
 #include "avfilter.h"
 #include "internal.h"
 #include "video.h"
 
 typedef struct FlipContext {
-const AVClass *class;
 int vsub;   ///< vertical chroma subsampling
 int bayer;
 } FlipContext;
 
-static const AVOption vflip_options[] = {
-{ NULL }
-};
-
-AVFILTER_DEFINE_CLASS(vflip);
-
 static int config_input(AVFilterLink *link)
 {
 FlipContext *flip = link->dst->priv;
@@ -139,7 +131,6 @@ const AVFilter ff_vf_vflip = {
 .name= "vflip",
 .description = NULL_IF_CONFIG_SMALL("Flip the input video vertically."),
 .priv_size   = sizeof(FlipContext),
-.priv_class  = _class,
 FILTER_INPUTS(avfilter_vf_vflip_inputs),
 FILTER_OUTPUTS(ff_video_default_filterpad),
 .flags   = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC,
-- 
2.40.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 04/10] avfilter/avfilter: Honour the short options documentation

2024-03-30 Thread Andreas Rheinhardt
The documentation for filter arguments states that short options must
precede long options (i.e. those of the form key=value). Yet if
process_options() encounters arguments not abiding by this, it simply
treats short options after a long option as if it were parsing short
options for the first time. In particular, it overwrites options already
set earlier, possibly via other short options. This is not how it is
intended (as a comment in the code indicates).

This commit modifies the code to reject further shorthand options
after a long option has been encountered. After all, avfilter_init_str()
errors out upon unrecognized options, so it is intended to be picky.

Signed-off-by: Andreas Rheinhardt 
---
 libavfilter/avfilter.c | 8 ++--
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c
index 508fe1b26b..21d6832deb 100644
--- a/libavfilter/avfilter.c
+++ b/libavfilter/avfilter.c
@@ -846,9 +846,7 @@ int ff_filter_opt_parse(void *logctx, const AVClass 
*priv_class,
 const char *shorthand = NULL;
 int additional_flags  = 0;
 
-if (priv_class)
-o = av_opt_next(_class, o);
-if (o) {
+if (priv_class && (o = av_opt_next(_class, o))) {
 if (o->type == AV_OPT_TYPE_CONST || o->offset == offset)
 continue;
 offset = o->offset;
@@ -871,9 +869,7 @@ int ff_filter_opt_parse(void *logctx, const AVClass 
*priv_class,
 if (parsed_key) {
 key = parsed_key;
 additional_flags = AV_DICT_DONT_STRDUP_KEY;
-/* discard all remaining shorthand */
-if (priv_class)
-while ((o = av_opt_next(_class, o)));
+priv_class = NULL; /* reject all remaining shorthand */
 } else {
 key = shorthand;
 }
-- 
2.40.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 03/10] avfilter/avfilter: Use AV_DICT_DONT_STRDUP_(KEY|VAL) when possible

2024-03-30 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt 
---
 libavfilter/avfilter.c | 9 -
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c
index 856862a393..508fe1b26b 100644
--- a/libavfilter/avfilter.c
+++ b/libavfilter/avfilter.c
@@ -844,6 +844,7 @@ int ff_filter_opt_parse(void *logctx, const AVClass 
*priv_class,
 
 while (*args) {
 const char *shorthand = NULL;
+int additional_flags  = 0;
 
 if (priv_class)
 o = av_opt_next(_class, o);
@@ -869,7 +870,7 @@ int ff_filter_opt_parse(void *logctx, const AVClass 
*priv_class,
 args++;
 if (parsed_key) {
 key = parsed_key;
-
+additional_flags = AV_DICT_DONT_STRDUP_KEY;
 /* discard all remaining shorthand */
 if (priv_class)
 while ((o = av_opt_next(_class, o)));
@@ -879,10 +880,8 @@ int ff_filter_opt_parse(void *logctx, const AVClass 
*priv_class,
 
 av_log(logctx, AV_LOG_DEBUG, "Setting '%s' to value '%s'\n", key, 
value);
 
-av_dict_set(options, key, value, AV_DICT_MULTIKEY);
-
-av_free(value);
-av_free(parsed_key);
+av_dict_set(options, key, value,
+additional_flags | AV_DICT_DONT_STRDUP_VAL | 
AV_DICT_MULTIKEY);
 }
 
 return 0;
-- 
2.40.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 02/10] avcodec/tiff: Don't cast const away via bsearch

2024-03-30 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt 
---
 libavcodec/tiff.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/tiff.c b/libavcodec/tiff.c
index 1b934457b5..19301d9e49 100644
--- a/libavcodec/tiff.c
+++ b/libavcodec/tiff.c
@@ -176,7 +176,7 @@ static int cmp_id_key(const void *id, const void *k)
 
 static const char *search_keyval(const TiffGeoTagKeyName *keys, int n, int id)
 {
-TiffGeoTagKeyName *r = bsearch(, keys, n, sizeof(keys[0]), cmp_id_key);
+const TiffGeoTagKeyName *r = bsearch(, keys, n, sizeof(keys[0]), 
cmp_id_key);
 if(r)
 return r->name;
 
-- 
2.40.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 01/10] avcodec/libvpxenc: Avoid unused-variable warning if VP9 enc is disabled

2024-03-30 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt 
---
 libavcodec/libvpxenc.c | 7 ---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/libavcodec/libvpxenc.c b/libavcodec/libvpxenc.c
index 635cdf7a0e..bcbdc4981e 100644
--- a/libavcodec/libvpxenc.c
+++ b/libavcodec/libvpxenc.c
@@ -49,6 +49,9 @@
 #include "libavutil/opt.h"
 #include "libavutil/pixdesc.h"
 
+#define IS_VP9(avctx) (CONFIG_LIBVPX_VP9_ENCODER && avctx->codec_id == 
AV_CODEC_ID_VP9)
+#define IS_VP8(avctx) (CONFIG_LIBVPX_VP8_ENCODER && avctx->codec_id == 
AV_CODEC_ID_VP8)
+
 /**
  * Portion of struct vpx_codec_cx_pkt from vpx_encoder.h.
  * One encoded frame returned from the library.
@@ -359,8 +362,7 @@ static int frame_data_submit(AVCodecContext *avctx, AVFifo 
*fifo,
 FrameData fd = { .pts = frame->pts };
 int ret;
 
-#if CONFIG_LIBVPX_VP9_ENCODER
-if (avctx->codec_id == AV_CODEC_ID_VP9 &&
+if (IS_VP9(avctx) &&
 // Keep HDR10+ if it has bit depth higher than 8 and
 // it has PQ trc (SMPTE2084).
 enccfg->g_bit_depth > 8 && avctx->color_trc == AVCOL_TRC_SMPTE2084) {
@@ -372,7 +374,6 @@ static int frame_data_submit(AVCodecContext *avctx, AVFifo 
*fifo,
 return AVERROR(ENOMEM);
 }
 }
-#endif
 
 fd.duration = frame->duration;
 fd.frame_opaque = frame->opaque;
-- 
2.40.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/rtmpproto: Don't free AVOpt-strings manually, fix crash

2024-03-30 Thread Liu Steven


> On Mar 30, 2024, at 12:21, Andreas Rheinhardt 
>  wrote:
> 
> Andreas Rheinhardt:
Hi Andreas,

>> Besides being redundant, freeing manually is actually harmful here,
>> as rtmp_close() may call gen_fcunpublish_stream() which dereferences
>> rt->playpath.
>> 
>> Reported-by: Armin Hasitzka 
>> Signed-off-by: Andreas Rheinhardt 
>> ---
>> libavformat/rtmpproto.c | 3 ---
>> 1 file changed, 3 deletions(-)
>> 
>> diff --git a/libavformat/rtmpproto.c b/libavformat/rtmpproto.c
>> index 4b01b67d28..b1d73b3d75 100644
>> --- a/libavformat/rtmpproto.c
>> +++ b/libavformat/rtmpproto.c
>> @@ -2917,9 +2917,6 @@ reconnect:
>> return 0;
>> 
>> fail:
>> -av_freep(>playpath);
>> -av_freep(>tcurl);
>> -av_freep(>flashver);
>> av_dict_free(opts);
>> rtmp_close(s);
>> return ret;
> 
> I am pinging this and explicitly cc'ing Steven Liu, whose commit
> 991cf95fdeebc3af added the av_freeps to be removed above. Steven, did
> you just feel that there was missing freeing code for the buffers above
> or was there an actually confirmed memleak (there shouldn't be)?

Confirmed memleak, but it’s long time i cannot sure how to reproduce that, I 
test rtmp those years use SRS.



Thanks
Steven


___
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/rtmpproto: Don't free AVOpt-strings manually, fix crash

2024-03-30 Thread Andreas Rheinhardt
Andreas Rheinhardt:
> Andreas Rheinhardt:
>> Besides being redundant, freeing manually is actually harmful here,
>> as rtmp_close() may call gen_fcunpublish_stream() which dereferences
>> rt->playpath.
>>
>> Reported-by: Armin Hasitzka 
>> Signed-off-by: Andreas Rheinhardt 
>> ---
>>  libavformat/rtmpproto.c | 3 ---
>>  1 file changed, 3 deletions(-)
>>
>> diff --git a/libavformat/rtmpproto.c b/libavformat/rtmpproto.c
>> index 4b01b67d28..b1d73b3d75 100644
>> --- a/libavformat/rtmpproto.c
>> +++ b/libavformat/rtmpproto.c
>> @@ -2917,9 +2917,6 @@ reconnect:
>>  return 0;
>>  
>>  fail:
>> -av_freep(>playpath);
>> -av_freep(>tcurl);
>> -av_freep(>flashver);
>>  av_dict_free(opts);
>>  rtmp_close(s);
>>  return ret;
> 
> I am pinging this and explicitly cc'ing Steven Liu, whose commit
> 991cf95fdeebc3af added the av_freeps to be removed above. Steven, did
> you just feel that there was missing freeing code for the buffers above
> or was there an actually confirmed memleak (there shouldn't be)?
> 
> - Andreas
> 

Another ping explicitly cc'ing Steven Liu, this time with a more recent
email.

- Andreas

___
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 2/2] avformat/lc3: Add file format for LC3/LC3plus transport

2024-03-30 Thread Paul B Mahol
On Sat, Mar 30, 2024 at 10:51 PM Antoine Soulier 
wrote:

> I am not sure about the block:
>
>> +lc3->timestamp += lc3->dt;
>> +if (lc3->timestamp > lc3->length) {
>> +pkt->duration -= lc3->timestamp - lc3->length;
>> +lc3->timestamp = lc3->length;
>> +}
>
>
> The purpose is to reduce the duration of the last packet.
> When converting a file, the last frame can contain "zeros" (or irrelevant)
> samples that are not present in the source file (alignment to frame
> boundary). These samples should be discarded.
> > If I remove the "read_seek()" implementation, I lose the PTS / timestamp
> information, and I don't know how to detect the last frame in the stream.
> Do you know how I can handle a reduced duration for the last frame without
> having an implementation of "read_seek()"?
>
> (I can play with the position and EOF information, but can lead to strange
> behaviors if the encoder adds extra frames at the end).
>

Looks like format limitation. If duration is not stored in each packet than
demuxer can not do it and no spagetti code can fix it in demuxer. Still
output frame duration is set by decoder too when decoding, so make sure
that decoder outputs valid output and timestamps/durations.
So its not really possible to have also correct and robust duration of last
packet returned by demuxer. Even more the file may be manipulated in such
way that its no longer correct to derive last packet duration from full
duration stored in header when the EOF reached.


>
>
> On Sat, Mar 30, 2024 at 4:46 AM Paul B Mahol  wrote:
>
>>
>>
>> On Fri, Mar 29, 2024 at 6:30 PM Antoine Soulier via ffmpeg-devel <
>> ffmpeg-devel@ffmpeg.org> wrote:
>>
>>> A file format is described in Bluetooth SIG LC3 and ETSI TS 103 634, for
>>> test purpose. This is the format implemented here.
>>>
>>> Signed-off-by: Antoine Soulier 
>>> ---
>>>  Changelog|   1 +
>>>  doc/muxers.texi  |   6 ++
>>>  libavformat/Makefile |   2 +
>>>  libavformat/allformats.c |   2 +
>>>  libavformat/lc3dec.c | 164 +++
>>>  libavformat/lc3enc.c | 100 
>>>  6 files changed, 275 insertions(+)
>>>  create mode 100644 libavformat/lc3dec.c
>>>  create mode 100644 libavformat/lc3enc.c
>>>
>>> diff --git a/Changelog b/Changelog
>>> index 83a4cf7888..08c200a41d 100644
>>> --- a/Changelog
>>> +++ b/Changelog
>>> @@ -2,6 +2,7 @@ Entries are sorted chronologically from oldest to
>>> youngest within each release,
>>>  releases are sorted from youngest to oldest.
>>>
>>>  version :
>>> +- LC3/LC3plus demuxer and muxer
>>>  - LC3/LC3plus decoding/encoding using external library liblc3
>>>
>>>
>>> diff --git a/doc/muxers.texi b/doc/muxers.texi
>>> index a10a8e216f..9687746c30 100644
>>> --- a/doc/muxers.texi
>>> +++ b/doc/muxers.texi
>>> @@ -2612,6 +2612,12 @@ WebDAV server every second:
>>>  ffmpeg -f x11grab -framerate 1 -i :0.0 -q:v 6 -update 1 -protocol_opts
>>> method=PUT http://example.com/desktop.jpg
>>>  @end example
>>>
>>> +@section lc3
>>> +Bluetooth SIG Low Complexity Communication Codec audio (LC3), or
>>> +ETSI TS 103 634 Low Complexity Communication Codec plus (LC3plus).
>>> +
>>> +This muxer accepts a single @code{lc3} audio stream.
>>> +
>>>  @section matroska
>>>
>>>  Matroska container muxer.
>>> diff --git a/libavformat/Makefile b/libavformat/Makefile
>>> index 44aa485029..4961c42852 100644
>>> --- a/libavformat/Makefile
>>> +++ b/libavformat/Makefile
>>> @@ -332,6 +332,8 @@ OBJS-$(CONFIG_KVAG_DEMUXER)  += kvag.o
>>>  OBJS-$(CONFIG_KVAG_MUXER)+= kvag.o rawenc.o
>>>  OBJS-$(CONFIG_LAF_DEMUXER)   += lafdec.o
>>>  OBJS-$(CONFIG_LATM_MUXER)+= latmenc.o rawenc.o
>>> +OBJS-$(CONFIG_LC3_DEMUXER)   += lc3dec.o
>>> +OBJS-$(CONFIG_LC3_MUXER) += lc3enc.o
>>>  OBJS-$(CONFIG_LMLM4_DEMUXER) += lmlm4.o
>>>  OBJS-$(CONFIG_LOAS_DEMUXER)  += loasdec.o rawdec.o
>>>  OBJS-$(CONFIG_LUODAT_DEMUXER)+= luodatdec.o
>>> diff --git a/libavformat/allformats.c b/libavformat/allformats.c
>>> index 9df42bb87a..0b36a7c3eb 100644
>>> --- a/libavformat/allformats.c
>>> +++ b/libavformat/allformats.c
>>> @@ -252,6 +252,8 @@ extern const FFInputFormat  ff_kvag_demuxer;
>>>  extern const FFOutputFormat ff_kvag_muxer;
>>>  extern const FFInputFormat  ff_laf_demuxer;
>>>  extern const FFOutputFormat ff_latm_muxer;
>>> +extern const FFInputFormat  ff_lc3_demuxer;
>>> +extern const FFOutputFormat ff_lc3_muxer;
>>>  extern const FFInputFormat  ff_lmlm4_demuxer;
>>>  extern const FFInputFormat  ff_loas_demuxer;
>>>  extern const FFInputFormat  ff_luodat_demuxer;
>>> diff --git a/libavformat/lc3dec.c b/libavformat/lc3dec.c
>>> new file mode 100644
>>> index 00..74d6794d00
>>> --- /dev/null
>>> +++ b/libavformat/lc3dec.c
>>> @@ -0,0 +1,164 @@
>>> +/*
>>> + * LC3 demuxer
>>> + * Copyright (C) 2024  Antoine Soulier 
>>> + *
>>> + * This file is part of 

[FFmpeg-devel] [PATCH 4/4] fate/ffprobe: Fix test requirements

2024-03-30 Thread Andreas Rheinhardt
The ffprobe-test file is generated via ffmpeg and several filters;
the requirements for them were missing.
Also deduplicate this while just at it.

Signed-off-by: Andreas Rheinhardt 
---
 tests/Makefile |  1 +
 tests/fate/ffprobe.mak | 40 +---
 2 files changed, 10 insertions(+), 31 deletions(-)

diff --git a/tests/Makefile b/tests/Makefile
index ed6b1801a8..9b70145015 100644
--- a/tests/Makefile
+++ b/tests/Makefile
@@ -253,6 +253,7 @@ include $(SRC_PATH)/tests/fate/xvid.mak
 
 FATE_FFMPEG += $(FATE_FFMPEG-yes) $(FATE_AVCONV) $(FATE_AVCONV-yes)
 FATE-$(CONFIG_FFMPEG) += $(FATE_FFMPEG)
+FATE_FFPROBE += $(FATE_FFPROBE-yes)
 FATE-$(CONFIG_FFPROBE) += $(FATE_FFPROBE)
 FATE-$(call ALLYES, FFMPEG FFPROBE) += $(FATE_FFMPEG_FFPROBE)
 
diff --git a/tests/fate/ffprobe.mak b/tests/fate/ffprobe.mak
index f30cc2d4ba..23c6d3550d 100644
--- a/tests/fate/ffprobe.mak
+++ b/tests/fate/ffprobe.mak
@@ -10,41 +10,19 @@ tests/data/ffprobe-test.nut: ffmpeg$(PROGSSUF)$(EXESUF) 
tests/test_copy.ffmeta |
 FFPROBE_TEST_FILE=tests/data/ffprobe-test.nut
 FFPROBE_COMMAND=ffprobe$(PROGSSUF)$(EXESUF) -show_streams -show_packets 
-show_format -show_frames -bitexact $(TARGET_PATH)/$(FFPROBE_TEST_FILE) 
-print_filename $(FFPROBE_TEST_FILE)
 
-FATE_FFPROBE-$(call ALLYES, AVDEVICE ARESAMPLE_FILTER) += fate-ffprobe_compact
-fate-ffprobe_compact: $(FFPROBE_TEST_FILE)
-fate-ffprobe_compact: CMD = run $(FFPROBE_COMMAND) -of compact
+FFPROBE_OUTPUT_MODES_TESTS = $(addprefix fate-ffprobe_, compact csv default 
flat ini json xml)
+$(FFPROBE_OUTPUT_MODES_TESTS): $(FFPROBE_TEST_FILE)
+$(FFPROBE_OUTPUT_MODES_TESTS): CMD = run $(FFPROBE_COMMAND) -of 
$(@:fate-ffprobe_%=%)
+FFPROBE_TEST_FILE_TESTS-yes += $(FFPROBE_OUTPUT_MODES_TESTS)
 
-FATE_FFPROBE-$(call ALLYES, AVDEVICE ARESAMPLE_FILTER) += fate-ffprobe_csv
-fate-ffprobe_csv: $(FFPROBE_TEST_FILE)
-fate-ffprobe_csv: CMD = run $(FFPROBE_COMMAND) -of csv
-
-FATE_FFPROBE-$(call ALLYES, AVDEVICE ARESAMPLE_FILTER) += fate-ffprobe_default
-fate-ffprobe_default: $(FFPROBE_TEST_FILE)
-fate-ffprobe_default: CMD = run $(FFPROBE_COMMAND) -of default
-
-FATE_FFPROBE-$(call ALLYES, AVDEVICE ARESAMPLE_FILTER) += fate-ffprobe_flat
-fate-ffprobe_flat: $(FFPROBE_TEST_FILE)
-fate-ffprobe_flat: CMD = run $(FFPROBE_COMMAND) -of flat
-
-FATE_FFPROBE-$(call ALLYES, AVDEVICE ARESAMPLE_FILTER) += fate-ffprobe_ini
-fate-ffprobe_ini: $(FFPROBE_TEST_FILE)
-fate-ffprobe_ini: CMD = run $(FFPROBE_COMMAND) -of ini
-
-FATE_FFPROBE-$(call ALLYES, AVDEVICE ARESAMPLE_FILTER) += fate-ffprobe_json
-fate-ffprobe_json: $(FFPROBE_TEST_FILE)
-fate-ffprobe_json: CMD = run $(FFPROBE_COMMAND) -of json
-
-FATE_FFPROBE-$(call ALLYES, AVDEVICE ARESAMPLE_FILTER) += fate-ffprobe_xml
-fate-ffprobe_xml: $(FFPROBE_TEST_FILE)
-fate-ffprobe_xml: CMD = run $(FFPROBE_COMMAND) -of xml
-
-FATE_FFPROBE_SCHEMA-$(call ALLYES, AVDEVICE ARESAMPLE_FILTER) += 
fate-ffprobe_xsd
+FFPROBE_TEST_FILE_TESTS-$(HAVE_XMLLINT) += fate-ffprobe_xsd
 fate-ffprobe_xsd: $(FFPROBE_TEST_FILE)
 fate-ffprobe_xsd: CMD = run $(FFPROBE_COMMAND) -noprivate -of xml=q=1:x=1 | \
xmllint --schema $(SRC_PATH)/doc/ffprobe.xsd -
 
-FATE_FFPROBE-$(HAVE_XMLLINT) += $(FATE_FFPROBE_SCHEMA-yes)
-FATE_FFPROBE += $(FATE_FFPROBE-yes)
+FATE_FFPROBE-$(call FILTERDEMDECENCMUX, AEVALSRC TESTSRC ARESAMPLE, 
FFMETADATA, WRAPPED_AVFRAME, RAWVIDEO, NUT,   \
+FFMPEG LAVFI_INDEV PCM_F64BE_DECODER 
PCM_F64LE_DECODER PCM_S16LE_ENCODER) \
++= $(FFPROBE_TEST_FILE_TESTS-yes)
 
-fate-ffprobe: $(FATE_FFPROBE)
+fate-ffprobe: $(FATE_FFPROBE-yes)
 
-- 
2.40.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] fate/api: Fix requirements of fate-api-seek

2024-03-30 Thread Andreas Rheinhardt
It relies on the fate-lavf-flv test.

Signed-off-by: Andreas Rheinhardt 
---
 tests/fate/api.mak | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/fate/api.mak b/tests/fate/api.mak
index 688fc0f9b3..d2868e57ac 100644
--- a/tests/fate/api.mak
+++ b/tests/fate/api.mak
@@ -16,7 +16,7 @@ FATE_API_SAMPLES_LIBAVFORMAT-$(call DEMDEC, H264, H264) += 
fate-api-h264-slice
 fate-api-h264-slice: $(APITESTSDIR)/api-h264-slice-test$(EXESUF)
 fate-api-h264-slice: CMD = run $(APITESTSDIR)/api-h264-slice-test$(EXESUF) 2 
$(TARGET_SAMPLES)/h264/crew_cif.nal
 
-FATE_API_LIBAVFORMAT-$(call DEMDEC, FLV, FLV) += fate-api-seek
+FATE_API_LIBAVFORMAT-yes += $(if $(findstring 
fate-lavf-flv,$(FATE_LAVF_CONTAINER)),fate-api-seek)
 fate-api-seek: $(APITESTSDIR)/api-seek-test$(EXESUF) fate-lavf-flv
 fate-lavf-flv: KEEP_FILES ?= 1
 fate-api-seek: CMD = run $(APITESTSDIR)/api-seek-test$(EXESUF) 
$(TARGET_PATH)/tests/data/lavf/lavf.flv 0 720
-- 
2.40.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] fate/lavf-container: Check earlier for presence of ffmpeg cli

2024-03-30 Thread Andreas Rheinhardt
Several other tests (e.g. concatdec) examine FATE_LAVF_CONTAINER
in order to enable or disable tests that depend on samples
created by the lavf-container tests; right now this procedure
did not account for CONFIG_FFMPEG.

Signed-off-by: Andreas Rheinhardt 
---
 tests/fate/lavf-container.mak | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/fate/lavf-container.mak b/tests/fate/lavf-container.mak
index 7a925117c3..d89174d221 100644
--- a/tests/fate/lavf-container.mak
+++ b/tests/fate/lavf-container.mak
@@ -30,7 +30,7 @@ FATE_LAVF_CONTAINER_SCALE := dv dv_pal dv_ntsc flm gxf 
gxf_pal gxf_ntsc \
 FATE_LAVF_CONTAINER-$(!CONFIG_SCALE_FILTER) := $(filter-out 
$(FATE_LAVF_CONTAINER_SCALE),$(FATE_LAVF_CONTAINER-yes))
 
 FATE_LAVF_CONTAINER = $(FATE_LAVF_CONTAINER-yes:%=fate-lavf-%)
-FATE_LAVF_CONTAINER := $(if $(call ENCDEC2, RAWVIDEO PGMYUV, PCM_S16LE, CRC 
IMAGE2, PCM_S16LE_DEMUXER PIPE_PROTOCOL), $(FATE_LAVF_CONTAINER))
+FATE_LAVF_CONTAINER := $(if $(call ENCDEC2, RAWVIDEO PGMYUV, PCM_S16LE, CRC 
IMAGE2, PCM_S16LE_DEMUXER PIPE_PROTOCOL FFMPEG), $(FATE_LAVF_CONTAINER))
 
 $(FATE_LAVF_CONTAINER): CMD = lavf_container
 $(FATE_LAVF_CONTAINER): REF = $(SRC_PATH)/tests/ref/lavf/$(@:fate-lavf-%=%)
-- 
2.40.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] fate/libswscale: Disable ffmpeg-dependent tests without ffmpeg

2024-03-30 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt 
---
 tests/fate/libswscale.mak | 9 -
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/tests/fate/libswscale.mak b/tests/fate/libswscale.mak
index f8572f9c37..4c29220e6f 100644
--- a/tests/fate/libswscale.mak
+++ b/tests/fate/libswscale.mak
@@ -17,17 +17,15 @@ $(SWS_SLICE_TEST-yes): tools/scale_slice_test$(EXESUF)
 $(SWS_SLICE_TEST-yes): REF = /dev/null
 FATE_LIBSWSCALE_SAMPLES += $(SWS_SLICE_TEST-yes)
 
-FATE_LIBSWSCALE-$(CONFIG_RAWVIDEO_DEMUXER) += fate-sws-yuv-colorspace
+FATE_LIBSWSCALE_FFMPEG-$(call FRAMECRC, RAWVIDEO, RAWVIDEO, SCALE_FILTER) += 
fate-sws-yuv-colorspace \
+ 
fate-sws-yuv-range
 fate-sws-yuv-colorspace: tests/data/vsynth1.yuv
-fate-sws-yuv-colorspace: ffmpeg$(PROGSSUF)$(EXESUF)
 fate-sws-yuv-colorspace: CMD = framecrc \
   -f rawvideo -s 352x288 -pix_fmt yuv420p -i 
$(TARGET_PATH)/tests/data/vsynth1.yuv \
   -frames 1 \
   -vf 
scale=in_color_matrix=bt709:in_range=limited:out_color_matrix=bt601:out_range=full:flags=+accurate_rnd+bitexact
 
-FATE_LIBSWSCALE-$(CONFIG_RAWVIDEO_DEMUXER) += fate-sws-yuv-range
 fate-sws-yuv-range: tests/data/vsynth1.yuv
-fate-sws-yuv-range: ffmpeg$(PROGSSUF)$(EXESUF)
 fate-sws-yuv-range: CMD = framecrc \
   -f rawvideo -s 352x288 -pix_fmt yuv420p -i 
$(TARGET_PATH)/tests/data/vsynth1.yuv \
   -frames 1 \
@@ -36,5 +34,6 @@ fate-sws-yuv-range: CMD = framecrc \
 FATE_LIBSWSCALE += $(FATE_LIBSWSCALE-yes)
 FATE_LIBSWSCALE_SAMPLES += $(FATE_LIBSWSCALE_SAMPLES-yes)
 FATE-$(CONFIG_SWSCALE) += $(FATE_LIBSWSCALE)
+FATE_FFMPEG += $(FATE_LIBSWSCALE_FFMPEG-yes)
 FATE_EXTERN-$(CONFIG_SWSCALE) += $(FATE_LIBSWSCALE_SAMPLES)
-fate-libswscale: $(FATE_LIBSWSCALE) $(FATE_LIBSWSCALE_SAMPLES)
+fate-libswscale: $(FATE_LIBSWSCALE) $(FATE_LIBSWSCALE_SAMPLES) 
$(FATE_LIBSWSCALE_FFMPEG-yes)
-- 
2.40.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 2/2] avformat/lc3: Add file format for LC3/LC3plus transport

2024-03-30 Thread Antoine Soulier via ffmpeg-devel
I am not sure about the block:

> +lc3->timestamp += lc3->dt;
> +if (lc3->timestamp > lc3->length) {
> +pkt->duration -= lc3->timestamp - lc3->length;
> +lc3->timestamp = lc3->length;
> +}


The purpose is to reduce the duration of the last packet.
When converting a file, the last frame can contain "zeros" (or irrelevant)
samples that are not present in the source file (alignment to frame
boundary). These samples should be discarded.
> If I remove the "read_seek()" implementation, I lose the PTS / timestamp
information, and I don't know how to detect the last frame in the stream.
Do you know how I can handle a reduced duration for the last frame without
having an implementation of "read_seek()"?

(I can play with the position and EOF information, but can lead to strange
behaviors if the encoder adds extra frames at the end).


On Sat, Mar 30, 2024 at 4:46 AM Paul B Mahol  wrote:

>
>
> On Fri, Mar 29, 2024 at 6:30 PM Antoine Soulier via ffmpeg-devel <
> ffmpeg-devel@ffmpeg.org> wrote:
>
>> A file format is described in Bluetooth SIG LC3 and ETSI TS 103 634, for
>> test purpose. This is the format implemented here.
>>
>> Signed-off-by: Antoine Soulier 
>> ---
>>  Changelog|   1 +
>>  doc/muxers.texi  |   6 ++
>>  libavformat/Makefile |   2 +
>>  libavformat/allformats.c |   2 +
>>  libavformat/lc3dec.c | 164 +++
>>  libavformat/lc3enc.c | 100 
>>  6 files changed, 275 insertions(+)
>>  create mode 100644 libavformat/lc3dec.c
>>  create mode 100644 libavformat/lc3enc.c
>>
>> diff --git a/Changelog b/Changelog
>> index 83a4cf7888..08c200a41d 100644
>> --- a/Changelog
>> +++ b/Changelog
>> @@ -2,6 +2,7 @@ Entries are sorted chronologically from oldest to
>> youngest within each release,
>>  releases are sorted from youngest to oldest.
>>
>>  version :
>> +- LC3/LC3plus demuxer and muxer
>>  - LC3/LC3plus decoding/encoding using external library liblc3
>>
>>
>> diff --git a/doc/muxers.texi b/doc/muxers.texi
>> index a10a8e216f..9687746c30 100644
>> --- a/doc/muxers.texi
>> +++ b/doc/muxers.texi
>> @@ -2612,6 +2612,12 @@ WebDAV server every second:
>>  ffmpeg -f x11grab -framerate 1 -i :0.0 -q:v 6 -update 1 -protocol_opts
>> method=PUT http://example.com/desktop.jpg
>>  @end example
>>
>> +@section lc3
>> +Bluetooth SIG Low Complexity Communication Codec audio (LC3), or
>> +ETSI TS 103 634 Low Complexity Communication Codec plus (LC3plus).
>> +
>> +This muxer accepts a single @code{lc3} audio stream.
>> +
>>  @section matroska
>>
>>  Matroska container muxer.
>> diff --git a/libavformat/Makefile b/libavformat/Makefile
>> index 44aa485029..4961c42852 100644
>> --- a/libavformat/Makefile
>> +++ b/libavformat/Makefile
>> @@ -332,6 +332,8 @@ OBJS-$(CONFIG_KVAG_DEMUXER)  += kvag.o
>>  OBJS-$(CONFIG_KVAG_MUXER)+= kvag.o rawenc.o
>>  OBJS-$(CONFIG_LAF_DEMUXER)   += lafdec.o
>>  OBJS-$(CONFIG_LATM_MUXER)+= latmenc.o rawenc.o
>> +OBJS-$(CONFIG_LC3_DEMUXER)   += lc3dec.o
>> +OBJS-$(CONFIG_LC3_MUXER) += lc3enc.o
>>  OBJS-$(CONFIG_LMLM4_DEMUXER) += lmlm4.o
>>  OBJS-$(CONFIG_LOAS_DEMUXER)  += loasdec.o rawdec.o
>>  OBJS-$(CONFIG_LUODAT_DEMUXER)+= luodatdec.o
>> diff --git a/libavformat/allformats.c b/libavformat/allformats.c
>> index 9df42bb87a..0b36a7c3eb 100644
>> --- a/libavformat/allformats.c
>> +++ b/libavformat/allformats.c
>> @@ -252,6 +252,8 @@ extern const FFInputFormat  ff_kvag_demuxer;
>>  extern const FFOutputFormat ff_kvag_muxer;
>>  extern const FFInputFormat  ff_laf_demuxer;
>>  extern const FFOutputFormat ff_latm_muxer;
>> +extern const FFInputFormat  ff_lc3_demuxer;
>> +extern const FFOutputFormat ff_lc3_muxer;
>>  extern const FFInputFormat  ff_lmlm4_demuxer;
>>  extern const FFInputFormat  ff_loas_demuxer;
>>  extern const FFInputFormat  ff_luodat_demuxer;
>> diff --git a/libavformat/lc3dec.c b/libavformat/lc3dec.c
>> new file mode 100644
>> index 00..74d6794d00
>> --- /dev/null
>> +++ b/libavformat/lc3dec.c
>> @@ -0,0 +1,164 @@
>> +/*
>> + * LC3 demuxer
>> + * Copyright (C) 2024  Antoine Soulier 
>> + *
>> + * 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 

Re: [FFmpeg-devel] [PATCH] avfilter/buffersrc: fix overriding unknown channel layouts with negotiated one

2024-03-30 Thread James Almer

On 3/29/2024 7:01 PM, Marton Balint wrote:



On Sat, 23 Mar 2024, Marton Balint wrote:

Fixes ffplay playback of unknown layouts, when SDL directly supports 
the audio

format, such as:

ffplay -f lavfi anullsrc=cl=2C,aformat=s16

Without the patch, "Channel layout change is not supported" errors are
generated because buffersrc (unknown 2 channel) and buffersink (stereo)
negotiated a stereo layout, but the stereo layout was never stored in the
BufferSourceContext.

This fixes a regression of 7251f909721a570726775acf61b2b9c28a950c76, 
but this

is more of a regression of the avfilter channel layout conversion
(1f96db959c1235bb7079d354e09914a0a2608f62).

Signed-off-by: Marton Balint 
---
libavfilter/buffersrc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavfilter/buffersrc.c b/libavfilter/buffersrc.c
index ddcd403785..fcae4f8e69 100644
--- a/libavfilter/buffersrc.c
+++ b/libavfilter/buffersrc.c
@@ -507,7 +507,7 @@ static int config_props(AVFilterLink *link)
    }
    break;
    case AVMEDIA_TYPE_AUDIO:
-    if (!c->ch_layout.nb_channels) {
+    if (!c->ch_layout.nb_channels || c->ch_layout.order == 
AV_CHANNEL_ORDER_UNSPEC) {
    int ret = av_channel_layout_copy(>ch_layout, 
>ch_layout);


Why is this the only field in the function where BufferSourceContext is 
the destination and the link is the source?



    if (ret < 0)
    return ret;


Will apply and backport.

Regards,
Marton
___
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] web/download: Extend the verification procedure to check for difference between git and release tarball

2024-03-30 Thread Michael Niedermayer
On Sat, Mar 30, 2024 at 02:31:54PM -0300, James Almer wrote:
> On 3/30/2024 2:30 PM, Michael Niedermayer wrote:
> > On Sat, Mar 30, 2024 at 11:51:17AM -0300, James Almer wrote:
> > > On 3/30/2024 11:02 AM, Michael Niedermayer wrote:
> > > > Iam not 100% sure this is the best place to put this. But we should 
> > > > somewhere
> > > > describe what differences are expected
> > > > 
> > > > Signed-off-by: Michael Niedermayer 
> > > > ---
> > > >src/download | 34 ++
> > > >1 file changed, 34 insertions(+)
> > > > 
> > > > diff --git a/src/download b/src/download
> > > > index 0e6fa7e..34733de 100644
> > > > --- a/src/download
> > > > +++ b/src/download
> > > > @@ -284,6 +284,40 @@ gpg:using RSA key 
> > > > FCF986EA15E6E293A5644F10B4322F04D67658D8
> > > >gpg:issuer "ffmpeg-devel@ffmpeg.org"
> > > >gpg: Good signature from "FFmpeg release signing key 
> > > > ffmpeg-devel@ffmpeg.org" [full]
> > > >  
> > > > +  
> > > > +Verify that the release tarball matches the git tag: (expected 
> > > > differences are missing .git, .gitignore and .gitattributes and an 
> > > > additional VERSION file)
> > > > +
> > > > +$ diff -ru ffmpeg-5.1.4 gitdir2
> > > > +Only in gitdir2/doc/doxy: .gitignore
> > > > +Only in gitdir2/doc/examples: .gitignore
> > > > +Only in gitdir2/doc: .gitignore
> > > > +Only in gitdir2/ffbuild: .gitignore
> > > > +Only in gitdir2: .git
> > > > +Only in gitdir2: .gitattributes
> > > > +Only in gitdir2: .gitignore
> > > > +Only in gitdir2/libavcodec: .gitignore
> > > > +Only in gitdir2/libavcodec/tests: .gitignore
> > > > +Only in gitdir2/libavdevice: .gitignore
> > > > +Only in gitdir2/libavdevice/tests: .gitignore
> > > > +Only in gitdir2/libavfilter: .gitignore
> > > > +Only in gitdir2/libavfilter/opencl: .gitignore
> > > > +Only in gitdir2/libavfilter/tests: .gitignore
> > > > +Only in gitdir2/libavformat: .gitignore
> > > > +Only in gitdir2/libavformat/tests: .gitignore
> > > > +Only in gitdir2/libavutil: .gitignore
> > > > +Only in gitdir2/libavutil/tests: .gitignore
> > > > +Only in gitdir2/libswresample/tests: .gitignore
> > > > +Only in gitdir2/libswscale/tests: .gitignore
> > > > +Only in gitdir2/tests/api: .gitignore
> > > > +Only in gitdir2/tests/checkasm: .gitignore
> > > > +Only in gitdir2/tests: .gitignore
> > > > +Only in gitdir2/tools: .gitignore
> > > > +Only in ffmpeg-5.1.4: VERSION
> > > > +
> > > > +  
> > > > +  
> > > > +Verify that the tag in git is signed
> > > 
> > > The tags are signed with your key made for this purpose,
> > > DD1EC9E8DE085C629B3E1846B18E8928B3948D64, and not with the tarball one
> > > listed above. You should include it here the same way, unless the 
> > > signature
> > 
> > yes but before doing that, do you think this is the best place to put all 
> > this?
> 
> Sure, why would it not? It's the section where we explain how to verify
> releases.

The verification ends with the tarball signature being verified.

Checking the difference between 2 mirrors, or git vs. tarball is not
verifying if the user obtained a unmodified copy of a release.

It would check for a subset of variants of compromises on the FFmpeg side.
I think we should publish somewhere how the difference between git and
tarball should look. But iam not sure anything is achieved by asking
everyone to download things twice and compare them.

Maybe the security page is a better place ?

thx

[...]
-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Some people wanted to paint the bikeshed green, some blue and some pink.
People argued and fought, when they finally agreed, only rust was left.


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] web/download: Extend the verification procedure to check for difference between git and release tarball

2024-03-30 Thread Kieran Kunhya
On Sat, 30 Mar 2024 at 17:30, Michael Niedermayer 
wrote:

> On Sat, Mar 30, 2024 at 11:51:17AM -0300, James Almer wrote:
> > On 3/30/2024 11:02 AM, Michael Niedermayer wrote:
> > > Iam not 100% sure this is the best place to put this. But we should
> somewhere
> > > describe what differences are expected
> > >
> > > Signed-off-by: Michael Niedermayer 
> > > ---
> > >   src/download | 34 ++
> > >   1 file changed, 34 insertions(+)
> > >
> > > diff --git a/src/download b/src/download
> > > index 0e6fa7e..34733de 100644
> > > --- a/src/download
> > > +++ b/src/download
> > > @@ -284,6 +284,40 @@ gpg:using RSA key
> FCF986EA15E6E293A5644F10B4322F04D67658D8
> > >   gpg:issuer "ffmpeg-devel@ffmpeg.org"
> > >   gpg: Good signature from "FFmpeg release signing key &
> lt;ffmpeg-devel@ffmpeg.org" [full]
> > > 
> > > +  
> > > +Verify that the release tarball matches the git tag:
> (expected differences are missing .git, .gitignore and .gitattributes and
> an additional VERSION file)
> > > +
> > > +$ diff -ru ffmpeg-5.1.4 gitdir2
> > > +Only in gitdir2/doc/doxy: .gitignore
> > > +Only in gitdir2/doc/examples: .gitignore
> > > +Only in gitdir2/doc: .gitignore
> > > +Only in gitdir2/ffbuild: .gitignore
> > > +Only in gitdir2: .git
> > > +Only in gitdir2: .gitattributes
> > > +Only in gitdir2: .gitignore
> > > +Only in gitdir2/libavcodec: .gitignore
> > > +Only in gitdir2/libavcodec/tests: .gitignore
> > > +Only in gitdir2/libavdevice: .gitignore
> > > +Only in gitdir2/libavdevice/tests: .gitignore
> > > +Only in gitdir2/libavfilter: .gitignore
> > > +Only in gitdir2/libavfilter/opencl: .gitignore
> > > +Only in gitdir2/libavfilter/tests: .gitignore
> > > +Only in gitdir2/libavformat: .gitignore
> > > +Only in gitdir2/libavformat/tests: .gitignore
> > > +Only in gitdir2/libavutil: .gitignore
> > > +Only in gitdir2/libavutil/tests: .gitignore
> > > +Only in gitdir2/libswresample/tests: .gitignore
> > > +Only in gitdir2/libswscale/tests: .gitignore
> > > +Only in gitdir2/tests/api: .gitignore
> > > +Only in gitdir2/tests/checkasm: .gitignore
> > > +Only in gitdir2/tests: .gitignore
> > > +Only in gitdir2/tools: .gitignore
> > > +Only in ffmpeg-5.1.4: VERSION
> > > +
> > > +  
> > > +  
> > > +Verify that the tag in git is signed
> >
> > The tags are signed with your key made for this purpose,
> > DD1EC9E8DE085C629B3E1846B18E8928B3948D64, and not with the tarball one
> > listed above. You should include it here the same way, unless the
> signature
>
> yes but before doing that, do you think this is the best place to put all
> this?
>

Putting this on a web host run by people we've never met before is a
perfect place to put this information.

Kieran
___
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 6/6] fate/image: Fix EXR tests on big endian

2024-03-30 Thread Sean McGovern
Andreas,

On Fri, Mar 29, 2024 at 12:45 PM Andreas Rheinhardt
 wrote:
>
> These tests need a scale filter to convert to the prescribed
> pixel format (the native format is endian-dependent).
>
> Signed-off-by: Andreas Rheinhardt 
> ---
> And now I will deduplicate this mess...
>
>  tests/fate/image.mak | 150 +--
>  1 file changed, 75 insertions(+), 75 deletions(-)
>
> diff --git a/tests/fate/image.mak b/tests/fate/image.mak
> index 7c0e0fec08..753936ec20 100644
> --- a/tests/fate/image.mak
> +++ b/tests/fate/image.mak
> @@ -104,229 +104,229 @@ FATE_IMAGE_PROBE-$(call DEMDEC, IMAGE2, DPX) += 
> fate-dpx-probe
>  fate-dpx-probe: CMD = probeframes -show_entries 
> frame=color_transfer,color_range,color_space,color_primaries,sample_aspect_ratio
>  $(TARGET_SAMPLES)/dpx/cyan.dpx
>
>  FATE_EXR += fate-exr-slice-raw
> -fate-exr-slice-raw: CMD = framecrc -i 
> $(TARGET_SAMPLES)/exr/rgba_slice_raw.exr -pix_fmt gbrapf32le
> +fate-exr-slice-raw: CMD = framecrc -i 
> $(TARGET_SAMPLES)/exr/rgba_slice_raw.exr -vf scale -pix_fmt gbrapf32le
>
>  FATE_EXR += fate-exr-slice-rle
> -fate-exr-slice-rle: CMD = framecrc -i 
> $(TARGET_SAMPLES)/exr/rgba_slice_rle.exr -pix_fmt gbrapf32le
> +fate-exr-slice-rle: CMD = framecrc -i 
> $(TARGET_SAMPLES)/exr/rgba_slice_rle.exr -vf scale -pix_fmt gbrapf32le
>
>  FATE_EXR += fate-exr-slice-zip1
> -fate-exr-slice-zip1: CMD = framecrc -i 
> $(TARGET_SAMPLES)/exr/rgba_slice_zip1.exr -pix_fmt gbrapf32le
> +fate-exr-slice-zip1: CMD = framecrc -i 
> $(TARGET_SAMPLES)/exr/rgba_slice_zip1.exr -vf scale -pix_fmt gbrapf32le
>
>  FATE_EXR += fate-exr-slice-zip16
> -fate-exr-slice-zip16: CMD = framecrc -i 
> $(TARGET_SAMPLES)/exr/rgba_slice_zip16.exr -pix_fmt gbrapf32le
> +fate-exr-slice-zip16: CMD = framecrc -i 
> $(TARGET_SAMPLES)/exr/rgba_slice_zip16.exr -vf scale -pix_fmt gbrapf32le
>
>  FATE_EXR += fate-exr-slice-pxr24
> -fate-exr-slice-pxr24: CMD = framecrc -i 
> $(TARGET_SAMPLES)/exr/rgb_slice_pxr24.exr -pix_fmt gbrpf32le
> +fate-exr-slice-pxr24: CMD = framecrc -i 
> $(TARGET_SAMPLES)/exr/rgb_slice_pxr24.exr -vf scale -pix_fmt gbrpf32le
>
>  FATE_EXR += fate-exr-rgb-scanline-pxr24-float-12x8
> -fate-exr-rgb-scanline-pxr24-float-12x8: CMD = framecrc -i 
> $(TARGET_SAMPLES)/exr/rgb_scanline_pxr24_float_12x8.exr -pix_fmt gbrpf32le
> +fate-exr-rgb-scanline-pxr24-float-12x8: CMD = framecrc -i 
> $(TARGET_SAMPLES)/exr/rgb_scanline_pxr24_float_12x8.exr -vf scale -pix_fmt 
> gbrpf32le
>
>  FATE_EXR += fate-exr-rgba-multiscanline-half-b44
> -fate-exr-rgba-multiscanline-half-b44: CMD = framecrc -i 
> $(TARGET_SAMPLES)/exr/rgba_multiscanline_half_b44.exr -pix_fmt gbrapf32le
> +fate-exr-rgba-multiscanline-half-b44: CMD = framecrc -i 
> $(TARGET_SAMPLES)/exr/rgba_multiscanline_half_b44.exr -vf scale -pix_fmt 
> gbrapf32le
>
>  FATE_EXR += fate-exr-rgb-scanline-float-b44
> -fate-exr-rgb-scanline-float-b44: CMD = framecrc -i 
> $(TARGET_SAMPLES)/exr/rgb_scanline_float_b44.exr -pix_fmt gbrpf32le
> +fate-exr-rgb-scanline-float-b44: CMD = framecrc -i 
> $(TARGET_SAMPLES)/exr/rgb_scanline_float_b44.exr -vf scale -pix_fmt gbrpf32le
>
>  FATE_EXR += fate-exr-rgb-scanline-half-b44-12x8
> -fate-exr-rgb-scanline-half-b44-12x8: CMD = framecrc -i 
> $(TARGET_SAMPLES)/exr/rgb_scanline_half_b44_12x8.exr -pix_fmt gbrpf32le
> +fate-exr-rgb-scanline-half-b44-12x8: CMD = framecrc -i 
> $(TARGET_SAMPLES)/exr/rgb_scanline_half_b44_12x8.exr -vf scale -pix_fmt 
> gbrpf32le
>
>  FATE_EXR += fate-exr-rgb-scanline-half-b44-13x9
> -fate-exr-rgb-scanline-half-b44-13x9: CMD = framecrc -i 
> $(TARGET_SAMPLES)/exr/rgb_scanline_half_b44_13x9.exr -pix_fmt gbrpf32le
> +fate-exr-rgb-scanline-half-b44-13x9: CMD = framecrc -i 
> $(TARGET_SAMPLES)/exr/rgb_scanline_half_b44_13x9.exr -vf scale -pix_fmt 
> gbrpf32le
>
>  FATE_EXR += fate-exr-rgb-tile-float-raw-12x8
> -fate-exr-rgb-tile-float-raw-12x8: CMD = framecrc -i 
> $(TARGET_SAMPLES)/exr/rgb_tile_float_raw_12x8.exr -pix_fmt gbrpf32le
> +fate-exr-rgb-tile-float-raw-12x8: CMD = framecrc -i 
> $(TARGET_SAMPLES)/exr/rgb_tile_float_raw_12x8.exr -vf scale -pix_fmt gbrpf32le
>
>  FATE_EXR += fate-exr-rgb-tile-float-raw-150x130
> -fate-exr-rgb-tile-float-raw-150x130: CMD = framecrc -i 
> $(TARGET_SAMPLES)/exr/rgb_tile_float_raw_150x130.exr -pix_fmt gbrpf32le
> +fate-exr-rgb-tile-float-raw-150x130: CMD = framecrc -i 
> $(TARGET_SAMPLES)/exr/rgb_tile_float_raw_150x130.exr -vf scale -pix_fmt 
> gbrpf32le
>
>  FATE_EXR += fate-exr-rgb-tile-half-raw-12x8
> -fate-exr-rgb-tile-half-raw-12x8: CMD = framecrc -i 
> $(TARGET_SAMPLES)/exr/rgb_tile_half_raw_12x8.exr -pix_fmt gbrpf32le
> +fate-exr-rgb-tile-half-raw-12x8: CMD = framecrc -i 
> $(TARGET_SAMPLES)/exr/rgb_tile_half_raw_12x8.exr -vf scale -pix_fmt gbrpf32le
>
>  FATE_EXR += fate-exr-rgba-scanline-float-half-b44-13x9-l1
> -fate-exr-rgba-scanline-float-half-b44-13x9-l1: CMD = framecrc -i 
> $(TARGET_SAMPLES)/exr/rgba_scanline_float_half_b44_13x9.exr -pix_fmt 
> gbrapf32le
> 

Re: [FFmpeg-devel] [PATCH 1/7 v5] avutil/frame: add helper for adding side data w/ AVBufferRef to array

2024-03-30 Thread James Almer

On 3/28/2024 1:52 PM, James Almer wrote:

Signed-off-by: James Almer 
---
  libavutil/frame.c | 19 +++
  libavutil/frame.h | 24 
  2 files changed, 43 insertions(+)

diff --git a/libavutil/frame.c b/libavutil/frame.c
index ef1613c344..87cc8450c8 100644
--- a/libavutil/frame.c
+++ b/libavutil/frame.c
@@ -812,6 +812,25 @@ AVFrameSideData *av_frame_side_data_new(AVFrameSideData 
***sd, int *nb_sd,
  return ret;
  }
  
+AVFrameSideData *av_frame_side_data_add(AVFrameSideData ***sd, int *nb_sd,

+enum AVFrameSideDataType type,
+AVBufferRef **pbuf, unsigned int flags)
+{
+const AVSideDataDescriptor *desc = av_frame_side_data_desc(type);
+AVFrameSideData *sd_dst  = NULL;
+AVBufferRef *buf = *pbuf;
+
+if (flags & AV_FRAME_SIDE_DATA_FLAG_UNIQUE)
+remove_side_data(sd, nb_sd, type);
+
+sd_dst = add_side_data_from_buf(sd, nb_sd, type, buf);
+if (!sd_dst)
+return NULL;
+
+*pbuf = NULL;
+return sd_dst;
+}
+
  int av_frame_side_data_clone(AVFrameSideData ***sd, int *nb_sd,
   const AVFrameSideData *src, unsigned int flags)
  {
diff --git a/libavutil/frame.h b/libavutil/frame.h
index 3b6d746a16..8d16924432 100644
--- a/libavutil/frame.h
+++ b/libavutil/frame.h
@@ -1062,6 +1062,30 @@ AVFrameSideData *av_frame_side_data_new(AVFrameSideData 
***sd, int *nb_sd,
  enum AVFrameSideDataType type,
  size_t size, unsigned int flags);
  
+/**

+ * Add a new side data entry to an array from an existing AVBufferRef.
+ *
+ * @param sdpointer to array of side data to which to add another entry,
+ *  or to NULL in order to start a new array.
+ * @param nb_sd pointer to an integer containing the number of entries in
+ *  the array.
+ * @param type  type of the added side data
+ * @param buf   Pointer to AVBufferRef to add to the array. On success,
+ *  the function takes ownership of the AVBufferRef and *buf is
+ *  set to NULL, unless AV_FRAME_SIDE_DATA_FLAG_NEW_REF is set
+ *  in which case the ownership will remain with the caller.
+ * @param flags Some combination of AV_FRAME_SIDE_DATA_FLAG_* flags, or 0.
+ *
+ * @return newly added side data on success, NULL on error.
+ * @note In case of AV_FRAME_SIDE_DATA_FLAG_UNIQUE being set, entries of
+ *   matching AVFrameSideDataType will be removed before the addition
+ *   is attempted.
+ *
+ */
+AVFrameSideData *av_frame_side_data_add(AVFrameSideData ***sd, int *nb_sd,
+enum AVFrameSideDataType type,
+AVBufferRef **buf, unsigned int flags);
+
  /**
   * Add a new side data entry to an array based on existing side data, taking
   * a reference towards the contained AVBufferRef.


Ping for the set.
___
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] web/download: Extend the verification procedure to check for difference between git and release tarball

2024-03-30 Thread James Almer

On 3/30/2024 2:30 PM, Michael Niedermayer wrote:

On Sat, Mar 30, 2024 at 11:51:17AM -0300, James Almer wrote:

On 3/30/2024 11:02 AM, Michael Niedermayer wrote:

Iam not 100% sure this is the best place to put this. But we should somewhere
describe what differences are expected

Signed-off-by: Michael Niedermayer 
---
   src/download | 34 ++
   1 file changed, 34 insertions(+)

diff --git a/src/download b/src/download
index 0e6fa7e..34733de 100644
--- a/src/download
+++ b/src/download
@@ -284,6 +284,40 @@ gpg:using RSA key 
FCF986EA15E6E293A5644F10B4322F04D67658D8
   gpg:issuer "ffmpeg-devel@ffmpeg.org"
   gpg: Good signature from "FFmpeg release signing key 
ffmpeg-devel@ffmpeg.org" [full]
 
+  
+Verify that the release tarball matches the git tag: (expected 
differences are missing .git, .gitignore and .gitattributes and an additional 
VERSION file)
+
+$ diff -ru ffmpeg-5.1.4 gitdir2
+Only in gitdir2/doc/doxy: .gitignore
+Only in gitdir2/doc/examples: .gitignore
+Only in gitdir2/doc: .gitignore
+Only in gitdir2/ffbuild: .gitignore
+Only in gitdir2: .git
+Only in gitdir2: .gitattributes
+Only in gitdir2: .gitignore
+Only in gitdir2/libavcodec: .gitignore
+Only in gitdir2/libavcodec/tests: .gitignore
+Only in gitdir2/libavdevice: .gitignore
+Only in gitdir2/libavdevice/tests: .gitignore
+Only in gitdir2/libavfilter: .gitignore
+Only in gitdir2/libavfilter/opencl: .gitignore
+Only in gitdir2/libavfilter/tests: .gitignore
+Only in gitdir2/libavformat: .gitignore
+Only in gitdir2/libavformat/tests: .gitignore
+Only in gitdir2/libavutil: .gitignore
+Only in gitdir2/libavutil/tests: .gitignore
+Only in gitdir2/libswresample/tests: .gitignore
+Only in gitdir2/libswscale/tests: .gitignore
+Only in gitdir2/tests/api: .gitignore
+Only in gitdir2/tests/checkasm: .gitignore
+Only in gitdir2/tests: .gitignore
+Only in gitdir2/tools: .gitignore
+Only in ffmpeg-5.1.4: VERSION
+
+  
+  
+Verify that the tag in git is signed


The tags are signed with your key made for this purpose,
DD1EC9E8DE085C629B3E1846B18E8928B3948D64, and not with the tarball one
listed above. You should include it here the same way, unless the signature


yes but before doing that, do you think this is the best place to put all this?


Sure, why would it not? It's the section where we explain how to verify 
releases.

___
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] web/download: Extend the verification procedure to check for difference between git and release tarball

2024-03-30 Thread Michael Niedermayer
On Sat, Mar 30, 2024 at 11:51:17AM -0300, James Almer wrote:
> On 3/30/2024 11:02 AM, Michael Niedermayer wrote:
> > Iam not 100% sure this is the best place to put this. But we should 
> > somewhere
> > describe what differences are expected
> > 
> > Signed-off-by: Michael Niedermayer 
> > ---
> >   src/download | 34 ++
> >   1 file changed, 34 insertions(+)
> > 
> > diff --git a/src/download b/src/download
> > index 0e6fa7e..34733de 100644
> > --- a/src/download
> > +++ b/src/download
> > @@ -284,6 +284,40 @@ gpg:using RSA key 
> > FCF986EA15E6E293A5644F10B4322F04D67658D8
> >   gpg:issuer "ffmpeg-devel@ffmpeg.org"
> >   gpg: Good signature from "FFmpeg release signing key 
> > ffmpeg-devel@ffmpeg.org" [full]
> > 
> > +  
> > +Verify that the release tarball matches the git tag: (expected 
> > differences are missing .git, .gitignore and .gitattributes and an 
> > additional VERSION file)
> > +
> > +$ diff -ru ffmpeg-5.1.4 gitdir2
> > +Only in gitdir2/doc/doxy: .gitignore
> > +Only in gitdir2/doc/examples: .gitignore
> > +Only in gitdir2/doc: .gitignore
> > +Only in gitdir2/ffbuild: .gitignore
> > +Only in gitdir2: .git
> > +Only in gitdir2: .gitattributes
> > +Only in gitdir2: .gitignore
> > +Only in gitdir2/libavcodec: .gitignore
> > +Only in gitdir2/libavcodec/tests: .gitignore
> > +Only in gitdir2/libavdevice: .gitignore
> > +Only in gitdir2/libavdevice/tests: .gitignore
> > +Only in gitdir2/libavfilter: .gitignore
> > +Only in gitdir2/libavfilter/opencl: .gitignore
> > +Only in gitdir2/libavfilter/tests: .gitignore
> > +Only in gitdir2/libavformat: .gitignore
> > +Only in gitdir2/libavformat/tests: .gitignore
> > +Only in gitdir2/libavutil: .gitignore
> > +Only in gitdir2/libavutil/tests: .gitignore
> > +Only in gitdir2/libswresample/tests: .gitignore
> > +Only in gitdir2/libswscale/tests: .gitignore
> > +Only in gitdir2/tests/api: .gitignore
> > +Only in gitdir2/tests/checkasm: .gitignore
> > +Only in gitdir2/tests: .gitignore
> > +Only in gitdir2/tools: .gitignore
> > +Only in ffmpeg-5.1.4: VERSION
> > +
> > +  
> > +  
> > +Verify that the tag in git is signed
> 
> The tags are signed with your key made for this purpose,
> DD1EC9E8DE085C629B3E1846B18E8928B3948D64, and not with the tarball one
> listed above. You should include it here the same way, unless the signature

yes but before doing that, do you think this is the best place to put all this?

thx

[...]
-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Those who are too smart to engage in politics are punished by being
governed by those who are dumber. -- Plato 


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 v10 2/5] avformat/rcwtdec: add RCWT Closed Captions demuxer

2024-03-30 Thread Marth64
> i think the entry for extensions should be removed (which fixes this)
> having a ".bin" is not a strong indication that its rcwt

> Is this blocking or can it be addressed later? Also, if this needs to
> be modified the muxer should be as well.

I can address both today in a new set. .bin is pretty generic
(although it is what ccextractor uses), so I get it. 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 2/3] lavf/srtdec: Permit streaming input

2024-03-30 Thread Tomas Härdin
lör 2024-03-30 klockan 17:02 +0100 skrev Andreas Rheinhardt:
> > > ASS demuxer sorts its packets because
> > > there is no guarantee the text are sorted in the file
> > 
> > So? I'm making a normative argument.
> > 
> 
> Normative about what? The ASS specification [1] explicitly says:
> 
> "SSA does not care what order events are entered in.
> 
>  They could be entered in complete reverse order, and SSA would
> still play everything correctly in the right order ie. you cannot
> assume
> that each dialogue line is in chronological order in the script
> file."

This describes what SSA does, not what lavf should do. lavf does not
guarantee ordered subtitles in general, as far as I can tell.

> If you force reordering on our users, then this is a breaking change

Hence why we shouldn't put business logic in lavf. It would have been
better to put it in ffmpeg.c. Not putting business logic in lavf is a
point I've been making for years. Here we see an excellent reason why.

We can maintain the current behavior by putting the sorting logic
further up in lavf, assuming API users care. If API users don't care
but CLI users do then we could put it in ffmpeg.c.

If we are to maintain compatibility with an ill-defined set of API
users rather than say specific packages (vlc, mpv, melt etc) then the
only sensible solution is to put the sorting logic further up in lavf,
say demux.c.

/Tomas
___
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 2/3] lavf/srtdec: Permit streaming input

2024-03-30 Thread Andreas Rheinhardt
Tomas Härdin:
> lör 2024-03-30 klockan 15:49 +0100 skrev Nicolas George:
>> Tomas Härdin (12024-03-30):
>>> Players can implement sorting if they wish.
>>
>> API break.
> 
> lavf's API provides no guarantees regarding presentation order
>>
> 
>>> Finally I will note that sorting does not happen when subtitles are
>>> muxed in say mkv or avi, so the behavior is not even consistent
>>> across
>>> demuxers that support subtitles.
>>
>> AVI or MKV demuxer do not sort their packets because the packets are
>> supposed to be already sorted;
> 
> "Supposed to" is doing a lot of work here. IIRC AVI is fundamentally
> incapable of providing out-of-order anything, this is true (B-frames
> being notably haram in AVI). It is however capable of providing poorly
> muxed files. For example it is perfecectly legal in AVI to mux all
> video, then all audio, rather than the typical case where audio and
> video are interleaved (the I in AVI). The same goes for many formats.
> MOV supports basically any ordering via ctts shenanigans if I'm not
> mistaken.
> 

1. AVI does not have a way to signal pts, but you can simply store stuff
with reordering in it (in coding order); you just need something (most
likely a decoder) that can properly reorder the frames for presentation.
2. IIRC our AVI demuxer tries to properly interleave the packets
returned by AVI even if the input file is non-interleaved; the same goes
for mov/mp4 (where the index and not the file position is used).

>> ASS demuxer sorts its packets because
>> there is no guarantee the text are sorted in the file
> 
> So? I'm making a normative argument.
> 

Normative about what? The ASS specification [1] explicitly says:

"SSA does not care what order events are entered in.

 They could be entered in complete reverse order, and SSA would
still play everything correctly in the right order ie. you cannot assume
that each dialogue line is in chronological order in the script file."

If you force reordering on our users, then this is a breaking change and
it would impair the usefulness of libavformat: If users have to
implement workaround for issues of certain file formats (for files which
are not even broken according to the specification of the format in
question!), then what point is there in using libavformat at all?

- Andreas

[1]: www.tcax.org/docs/ass-specs.htm

___
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 2/3] lavf/srtdec: Permit streaming input

2024-03-30 Thread Nicolas George
Tomas Härdin (12024-03-30):
> lavf's API provides no guarantees regarding presentation order

It used to work, you are about to require new code from applications for
it to work. That is an API break, and pretending otherwise like you do
here is just a cop out.

> "Supposed to" is doing a lot of work here. IIRC AVI is fundamentally
> incapable of providing out-of-order anything, this is true (B-frames
> being notably haram in AVI). It is however capable of providing poorly
> muxed files.

And these files are widely considered broken and annoying.

> So? I'm making a normative argument.

I do not know what you try to mean here and I do not want to know. I
hope you realize you have no authority to decide which ASS file is valid
and which is not.

-- 
  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] Revert "avformat/mov: ignore item boxes for animated heif"

2024-03-30 Thread James Almer

On 3/28/2024 9:40 PM, James Almer wrote:

This reverts commit f6b7b473d456a6aa1c063c4261b17277e2c70ac0.
The image in the item boxes and the animation in the trak box are not
necessarely the same, so both should be exported.

Signed-off-by: James Almer 
---
  libavformat/mov.c | 44 
  1 file changed, 4 insertions(+), 40 deletions(-)


Will apply.
___
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 2/3] lavf/srtdec: Permit streaming input

2024-03-30 Thread Tomas Härdin
lör 2024-03-30 klockan 15:49 +0100 skrev Nicolas George:
> Tomas Härdin (12024-03-30):
> > Players can implement sorting if they wish.
> 
> API break.

lavf's API provides no guarantees regarding presentation order
> 

> > Finally I will note that sorting does not happen when subtitles are
> > muxed in say mkv or avi, so the behavior is not even consistent
> > across
> > demuxers that support subtitles.
> 
> AVI or MKV demuxer do not sort their packets because the packets are
> supposed to be already sorted;

"Supposed to" is doing a lot of work here. IIRC AVI is fundamentally
incapable of providing out-of-order anything, this is true (B-frames
being notably haram in AVI). It is however capable of providing poorly
muxed files. For example it is perfecectly legal in AVI to mux all
video, then all audio, rather than the typical case where audio and
video are interleaved (the I in AVI). The same goes for many formats.
MOV supports basically any ordering via ctts shenanigans if I'm not
mistaken.

> ASS demuxer sorts its packets because
> there is no guarantee the text are sorted in the file

So? I'm making a normative argument.

/Tomas
___
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 stub for iamf

2024-03-30 Thread Stefano Sabatini
On date Saturday 2024-03-30 00:52:12 +0100, Michael Niedermayer wrote:
> On Fri, Mar 29, 2024 at 12:47:53PM +0100, Stefano Sabatini wrote:
> > ---
> >  doc/muxers.texi | 16 
> >  1 file changed, 16 insertions(+)
> > 
> > diff --git a/doc/muxers.texi b/doc/muxers.texi
> > index f300f8c45f..23506e2ab7 100644
> > --- a/doc/muxers.texi
> > +++ b/doc/muxers.texi
> > @@ -2515,6 +2515,22 @@ Ignore IO errors during open, write and delete. 
> > Useful for long-duration runs wi
> >  Set custom HTTP headers, can override built in default headers. Applicable 
> > only for HTTP output.
> >  @end table
> >  
> > +@section{iamf}
> > +
> > +Immersive Audio Model and Formats (IAMF) muxer.
> > +
> > +IAMF is used to provide immersive audio content for presentation on a wide 
> > range
> > +of devices in both streaming and offline applications. These applications
> > +include internet audio streaming, multicasting/broadcasting services, file
> > +download, gaming, communication, virtual and augmented reality, and 
> > others. In
> > +these applications, audio may be played back on a wide range of devices, 
> > e.g.,
> > +headphones, mobile phones, tablets, TVs, sound bars, home theater systems, 
> > and
> > +big screens.
> > +
> > +This format was promoted and desgined by Alliance for Open Media.
> > +
> > +For more information about this format, see 
> > @url{https://aomedia.org/iamf/}.
> > +
> 
> this seems to cause

yes this is due to:
@section{iamf}

should be:
@section iamf

will fix and push the pending patches in a few days
___
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 v10 2/5] avformat/rcwtdec: add RCWT Closed Captions demuxer

2024-03-30 Thread Stefano Sabatini
On date Saturday 2024-03-30 01:23:53 +0100, Michael Niedermayer wrote:
> On Thu, Mar 28, 2024 at 03:11:29PM -0500, Marth64 wrote:
> [...]
> 
> > +static int rcwt_probe(const AVProbeData *p)
> > +{
> > +return p->buf_size > RCWT_HEADER_SIZE   &&
> > +   AV_RB16(p->buf) == 0x&&
> > +   AV_RB8(p->buf + 2) == 0xED   &&
> > +   AV_RB16(p->buf + 6) == 0x0001? 50 : 0;
> > +}
> > +
> > +const FFInputFormat ff_rcwt_demuxer = {
> > +.p.name = "rcwt",
> > +.p.long_name= NULL_IF_CONFIG_SMALL("RCWT (Raw Captions With 
> > Time)"),
> > +.p.extensions   = "bin",
> 

> this causes a mp3 i have to be misdetected
> ~/videos/sbQ9.bin
> (this is a actual file i had not a file crafted for this)
> 
> i think the entry for extensions should be removed (which fixes this)
> having a ".bin" is not a strong indication that its rcwt

Is this blocking or can it be addressed later? Also, if this needs to
be modified the muxer should be as well.

___
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] web/download: Extend the verification procedure to check for difference between git and release tarball

2024-03-30 Thread James Almer

On 3/30/2024 11:02 AM, Michael Niedermayer wrote:

Iam not 100% sure this is the best place to put this. But we should somewhere
describe what differences are expected

Signed-off-by: Michael Niedermayer 
---
  src/download | 34 ++
  1 file changed, 34 insertions(+)

diff --git a/src/download b/src/download
index 0e6fa7e..34733de 100644
--- a/src/download
+++ b/src/download
@@ -284,6 +284,40 @@ gpg:using RSA key 
FCF986EA15E6E293A5644F10B4322F04D67658D8
  gpg:issuer "ffmpeg-devel@ffmpeg.org"
  gpg: Good signature from "FFmpeg release signing key 
ffmpeg-devel@ffmpeg.org" [full]

+  
+Verify that the release tarball matches the git tag: (expected 
differences are missing .git, .gitignore and .gitattributes and an additional 
VERSION file)
+
+$ diff -ru ffmpeg-5.1.4 gitdir2
+Only in gitdir2/doc/doxy: .gitignore
+Only in gitdir2/doc/examples: .gitignore
+Only in gitdir2/doc: .gitignore
+Only in gitdir2/ffbuild: .gitignore
+Only in gitdir2: .git
+Only in gitdir2: .gitattributes
+Only in gitdir2: .gitignore
+Only in gitdir2/libavcodec: .gitignore
+Only in gitdir2/libavcodec/tests: .gitignore
+Only in gitdir2/libavdevice: .gitignore
+Only in gitdir2/libavdevice/tests: .gitignore
+Only in gitdir2/libavfilter: .gitignore
+Only in gitdir2/libavfilter/opencl: .gitignore
+Only in gitdir2/libavfilter/tests: .gitignore
+Only in gitdir2/libavformat: .gitignore
+Only in gitdir2/libavformat/tests: .gitignore
+Only in gitdir2/libavutil: .gitignore
+Only in gitdir2/libavutil/tests: .gitignore
+Only in gitdir2/libswresample/tests: .gitignore
+Only in gitdir2/libswscale/tests: .gitignore
+Only in gitdir2/tests/api: .gitignore
+Only in gitdir2/tests/checkasm: .gitignore
+Only in gitdir2/tests: .gitignore
+Only in gitdir2/tools: .gitignore
+Only in ffmpeg-5.1.4: VERSION
+
+  
+  
+Verify that the tag in git is signed


The tags are signed with your key made for this purpose, 
DD1EC9E8DE085C629B3E1846B18E8928B3948D64, and not with the tarball one 
listed above. You should include it here the same way, unless the 
signature check for tags is documented elsewhere? If so, a link to that 
place.



+  
  

  

___
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 2/3] lavf/srtdec: Permit streaming input

2024-03-30 Thread Nicolas George
Tomas Härdin (12024-03-30):
> Players can implement sorting if they wish.

API break.

> One potential solution is to do this style of parsing when the input is
> non-seekable. But then we have the silly situation where streamed and
> non-streamed behavior differs considerably.

Sure, better break both cases than only one.

> Finally I will note that sorting does not happen when subtitles are
> muxed in say mkv or avi, so the behavior is not even consistent across
> demuxers that support subtitles.

AVI or MKV demuxer do not sort their packets because the packets are
supposed to be already sorted; ASS demuxer sorts its packets because
there is no guarantee the text are sorted in the file. [exploding head
emoji]

-- 
  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 2/3] lavf/srtdec: Permit streaming input

2024-03-30 Thread Tomas Härdin
lör 2024-03-30 klockan 12:44 +0100 skrev Nicolas George:
> Tomas Härdin (12024-03-30):
> > More interesting is fate-sub-srt-badsyntax. Despite the name it
> > doesn't
> > really have bad syntax, but its cues are in a random order. I guess
> > it
> > exists to test the cue sorting logic. But should subtitle demuxers
> > really sort subtitles in this way? We don't do that for other
> > formats
> > that can have non-decreasing timestamps. For comparison, the WebVTT
> > spec explicitly disallows decreasing timestamps.
> 
> On the other hand, I remember seeing a lot of ASS files from the
> fansub
> world where titles, signs and karaokes are added at the end after the
> dialogues, relying on sorting by the player.

Players can implement sorting if they wish. Why should we misrepresent
what the file says? These people could also fix their workflows, put
karaoke lyrics in a separate stream etc.. Business logic does not
belong in lavf, and certainly not deep within demuxers.

> (But I guess in the New and Improved FFmpeg, files originating from
> the
> fansub world are not worth our time, it is enough to be able to
> decode
> files for Crunchyroll…)

Snark doesn't help your case.

One potential solution is to do this style of parsing when the input is
non-seekable. But then we have the silly situation where streamed and
non-streamed behavior differs considerably.

Another way could be to move the sorting further up, into demux.c or
so, extending the generic index functionality.

Finally I will note that sorting does not happen when subtitles are
muxed in say mkv or avi, so the behavior is not even consistent across
demuxers that support subtitles. With logic further up, and proper
discarding, sorting could be done there as well.

/Tomas
___
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] web/download: Extend the verification procedure to check for difference between git and release tarball

2024-03-30 Thread Michael Niedermayer
Iam not 100% sure this is the best place to put this. But we should somewhere
describe what differences are expected

Signed-off-by: Michael Niedermayer 
---
 src/download | 34 ++
 1 file changed, 34 insertions(+)

diff --git a/src/download b/src/download
index 0e6fa7e..34733de 100644
--- a/src/download
+++ b/src/download
@@ -284,6 +284,40 @@ gpg:using RSA key 
FCF986EA15E6E293A5644F10B4322F04D67658D8
 gpg:issuer "ffmpeg-devel@ffmpeg.org"
 gpg: Good signature from "FFmpeg release signing key 
ffmpeg-devel@ffmpeg.org" [full]
   
+  
+Verify that the release tarball matches the git tag: (expected 
differences are missing .git, .gitignore and .gitattributes and an additional 
VERSION file)
+
+$ diff -ru ffmpeg-5.1.4 gitdir2
+Only in gitdir2/doc/doxy: .gitignore
+Only in gitdir2/doc/examples: .gitignore
+Only in gitdir2/doc: .gitignore
+Only in gitdir2/ffbuild: .gitignore
+Only in gitdir2: .git
+Only in gitdir2: .gitattributes
+Only in gitdir2: .gitignore
+Only in gitdir2/libavcodec: .gitignore
+Only in gitdir2/libavcodec/tests: .gitignore
+Only in gitdir2/libavdevice: .gitignore
+Only in gitdir2/libavdevice/tests: .gitignore
+Only in gitdir2/libavfilter: .gitignore
+Only in gitdir2/libavfilter/opencl: .gitignore
+Only in gitdir2/libavfilter/tests: .gitignore
+Only in gitdir2/libavformat: .gitignore
+Only in gitdir2/libavformat/tests: .gitignore
+Only in gitdir2/libavutil: .gitignore
+Only in gitdir2/libavutil/tests: .gitignore
+Only in gitdir2/libswresample/tests: .gitignore
+Only in gitdir2/libswscale/tests: .gitignore
+Only in gitdir2/tests/api: .gitignore
+Only in gitdir2/tests/checkasm: .gitignore
+Only in gitdir2/tests: .gitignore
+Only in gitdir2/tools: .gitignore
+Only in ffmpeg-5.1.4: VERSION
+
+  
+  
+Verify that the tag in git is signed
+  
 
   
 
-- 
2.17.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 01/18] avcodec/mips/ac3dsp_mips: Add missing includes

2024-03-30 Thread Andreas Rheinhardt
Andreas Rheinhardt:
> Likely broken in d7a75d21635eab4f4a1efea22945933059c2e36f.
> 
> Signed-off-by: Andreas Rheinhardt 
> ---
>  libavcodec/mips/ac3dsp_mips.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/libavcodec/mips/ac3dsp_mips.c b/libavcodec/mips/ac3dsp_mips.c
> index e97a412922..cc49ba3888 100644
> --- a/libavcodec/mips/ac3dsp_mips.c
> +++ b/libavcodec/mips/ac3dsp_mips.c
> @@ -54,11 +54,13 @@
>   */
>  
>  #include 
> +#include 
>  
>  #include "config.h"
>  #include "libavcodec/ac3dsp.h"
>  #include "libavcodec/ac3.h"
>  #include "libavcodec/ac3tab.h"
> +#include "libavutil/macros.h"
>  #include "libavutil/mips/asmdefs.h"
>  
>  #if HAVE_INLINE_ASM

Will apply the remainder of this patchset tomorrow unless there are
objections.

- Andreas

___
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] lavf/movenc: mark mov/mp4 as supporting VFR

2024-03-30 Thread James Almer

On 3/29/2024 5:35 AM, Anton Khirnov wrote:

---
  libavformat/movenc.c | 12 ++--
  1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/libavformat/movenc.c b/libavformat/movenc.c
index b97c479cc4..30cfbf6e74 100644
--- a/libavformat/movenc.c
+++ b/libavformat/movenc.c
@@ -8230,11 +8230,11 @@ const FFOutputFormat ff_mov_muxer = {
  .write_packet  = mov_write_packet,
  .write_trailer = mov_write_trailer,
  .deinit= mov_free,
+.p.flags   = AVFMT_GLOBALHEADER | AVFMT_TS_NEGATIVE | 
AVFMT_VARIABLE_FPS
  #if FF_API_ALLOW_FLUSH
-.p.flags   = AVFMT_GLOBALHEADER | AVFMT_ALLOW_FLUSH | 
AVFMT_TS_NEGATIVE,
-#else
-.p.flags   = AVFMT_GLOBALHEADER | AVFMT_TS_NEGATIVE,
+   | AVFMT_ALLOW_FLUSH
  #endif
+ ,
  .p.codec_tag   = (const AVCodecTag* const []){
  ff_codec_movvideo_tags, ff_codec_movaudio_tags, 
ff_codec_movsubtitle_tags, 0
  },
@@ -8282,11 +8282,11 @@ const FFOutputFormat ff_mp4_muxer = {
  .write_packet  = mov_write_packet,
  .write_trailer = mov_write_trailer,
  .deinit= mov_free,
+.p.flags   = AVFMT_GLOBALHEADER | AVFMT_TS_NEGATIVE | 
AVFMT_VARIABLE_FPS
  #if FF_API_ALLOW_FLUSH
-.p.flags   = AVFMT_GLOBALHEADER | AVFMT_ALLOW_FLUSH | 
AVFMT_TS_NEGATIVE,
-#else
-.p.flags   = AVFMT_GLOBALHEADER | AVFMT_TS_NEGATIVE,
+   | AVFMT_ALLOW_FLUSH
  #endif
+ ,
  .p.codec_tag   = mp4_codec_tags_list,
  .check_bitstream   = mov_check_bitstream,
  .p.priv_class  = _isobmff_muxer_class,


There's a custom check for these muxers in 
avformat_transfer_internal_stream_timing_info() that would afaict be 
disabled with this change.

___
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 2/2] avformat/lc3: Add file format for LC3/LC3plus transport

2024-03-30 Thread Paul B Mahol
On Fri, Mar 29, 2024 at 6:30 PM Antoine Soulier via ffmpeg-devel <
ffmpeg-devel@ffmpeg.org> wrote:

> A file format is described in Bluetooth SIG LC3 and ETSI TS 103 634, for
> test purpose. This is the format implemented here.
>
> Signed-off-by: Antoine Soulier 
> ---
>  Changelog|   1 +
>  doc/muxers.texi  |   6 ++
>  libavformat/Makefile |   2 +
>  libavformat/allformats.c |   2 +
>  libavformat/lc3dec.c | 164 +++
>  libavformat/lc3enc.c | 100 
>  6 files changed, 275 insertions(+)
>  create mode 100644 libavformat/lc3dec.c
>  create mode 100644 libavformat/lc3enc.c
>
> diff --git a/Changelog b/Changelog
> index 83a4cf7888..08c200a41d 100644
> --- a/Changelog
> +++ b/Changelog
> @@ -2,6 +2,7 @@ Entries are sorted chronologically from oldest to youngest
> within each release,
>  releases are sorted from youngest to oldest.
>
>  version :
> +- LC3/LC3plus demuxer and muxer
>  - LC3/LC3plus decoding/encoding using external library liblc3
>
>
> diff --git a/doc/muxers.texi b/doc/muxers.texi
> index a10a8e216f..9687746c30 100644
> --- a/doc/muxers.texi
> +++ b/doc/muxers.texi
> @@ -2612,6 +2612,12 @@ WebDAV server every second:
>  ffmpeg -f x11grab -framerate 1 -i :0.0 -q:v 6 -update 1 -protocol_opts
> method=PUT http://example.com/desktop.jpg
>  @end example
>
> +@section lc3
> +Bluetooth SIG Low Complexity Communication Codec audio (LC3), or
> +ETSI TS 103 634 Low Complexity Communication Codec plus (LC3plus).
> +
> +This muxer accepts a single @code{lc3} audio stream.
> +
>  @section matroska
>
>  Matroska container muxer.
> diff --git a/libavformat/Makefile b/libavformat/Makefile
> index 44aa485029..4961c42852 100644
> --- a/libavformat/Makefile
> +++ b/libavformat/Makefile
> @@ -332,6 +332,8 @@ OBJS-$(CONFIG_KVAG_DEMUXER)  += kvag.o
>  OBJS-$(CONFIG_KVAG_MUXER)+= kvag.o rawenc.o
>  OBJS-$(CONFIG_LAF_DEMUXER)   += lafdec.o
>  OBJS-$(CONFIG_LATM_MUXER)+= latmenc.o rawenc.o
> +OBJS-$(CONFIG_LC3_DEMUXER)   += lc3dec.o
> +OBJS-$(CONFIG_LC3_MUXER) += lc3enc.o
>  OBJS-$(CONFIG_LMLM4_DEMUXER) += lmlm4.o
>  OBJS-$(CONFIG_LOAS_DEMUXER)  += loasdec.o rawdec.o
>  OBJS-$(CONFIG_LUODAT_DEMUXER)+= luodatdec.o
> diff --git a/libavformat/allformats.c b/libavformat/allformats.c
> index 9df42bb87a..0b36a7c3eb 100644
> --- a/libavformat/allformats.c
> +++ b/libavformat/allformats.c
> @@ -252,6 +252,8 @@ extern const FFInputFormat  ff_kvag_demuxer;
>  extern const FFOutputFormat ff_kvag_muxer;
>  extern const FFInputFormat  ff_laf_demuxer;
>  extern const FFOutputFormat ff_latm_muxer;
> +extern const FFInputFormat  ff_lc3_demuxer;
> +extern const FFOutputFormat ff_lc3_muxer;
>  extern const FFInputFormat  ff_lmlm4_demuxer;
>  extern const FFInputFormat  ff_loas_demuxer;
>  extern const FFInputFormat  ff_luodat_demuxer;
> diff --git a/libavformat/lc3dec.c b/libavformat/lc3dec.c
> new file mode 100644
> index 00..74d6794d00
> --- /dev/null
> +++ b/libavformat/lc3dec.c
> @@ -0,0 +1,164 @@
> +/*
> + * LC3 demuxer
> + * Copyright (C) 2024  Antoine Soulier 
> + *
> + * 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
> + */
> +
> +/**
> + * @file
> + * Based on the file format specified by :
> + *
> + * - Bluetooth SIG - Low Complexity Communication Codec Test Suite
> + *
> https://www.bluetooth.org/docman/handlers/downloaddoc.ashx?doc_id=502301
> + *   3.2.8.2 Reference LC3 Codec Bitstream Format
> + *
> + * - ETSI TI 103 634 V1.4.1 - Low Complexity Communication Codec plus
> + *
> https://www.etsi.org/deliver/etsi_ts/103600_103699/103634/01.04.01_60/ts_103634v010401p.pdf
> + *   LC3plus conformance script package
> + */
> +
> +#include "libavcodec/packet.h"
> +#include "libavutil/intreadwrite.h"
> +
> +#include "avformat.h"
> +#include "avio.h"
> +#include "demux.h"
> +#include "internal.h"
> +
> +typedef struct LC3DemuxContext {
> +int dt, delay;
> +int64_t timestamp;
> +int64_t length;
> +} LC3DemuxContext;
> +
> +static int lc3_read_header(AVFormatContext *s)
> +{
> +LC3DemuxContext *lc3 = s->priv_data;
> +AVStream *st = NULL;
> +uint16_t tag, 

Re: [FFmpeg-devel] [PATCH 2/3] lavf/srtdec: Permit streaming input

2024-03-30 Thread Nicolas George
Tomas Härdin (12024-03-30):
> More interesting is fate-sub-srt-badsyntax. Despite the name it doesn't
> really have bad syntax, but its cues are in a random order. I guess it
> exists to test the cue sorting logic. But should subtitle demuxers
> really sort subtitles in this way? We don't do that for other formats
> that can have non-decreasing timestamps. For comparison, the WebVTT
> spec explicitly disallows decreasing timestamps.

On the other hand, I remember seeing a lot of ASS files from the fansub
world where titles, signs and karaokes are added at the end after the
dialogues, relying on sorting by the player.

(But I guess in the New and Improved FFmpeg, files originating from the
fansub world are not worth our time, it is enough to be able to decode
files for Crunchyroll…)

-- 
  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 2/3] lavf/srtdec: Permit streaming input

2024-03-30 Thread Paul B Mahol
On Sat, Mar 30, 2024 at 9:31 AM Tomas Härdin  wrote:

> lör 2024-03-30 klockan 00:35 +0100 skrev Michael Niedermayer:
> > breaks fate here:
> >
> > --- ./tests/ref/fate/sub-srt-madness-timeshift  2024-03-29
> > 20:43:34.617419731 +0100
> > +++ tests/data/fate/sub-srt-madness-timeshift   2024-03-30
>
> Sorry but this file is utter crap and shouldn't be part of FATE. Look
> at this:
>
> > 53
> > 00:00:01,111 --> 00:00:02,222
> > okay, let's make things easy
> >
> > 21 lol jk
> > 00:00:03,333 --> 00:00:04,444
> > hello
> > 5
> >
> >
> > don't forget me.
> > 3
> >
> >
> > 00:00:05,555 --> 00:00:06,666
> >
> >
> > no.
> > let's add some fun
> > 44 yes we can
> > 00:00:07,777 --> 00:00:06,666
> > let's do it in reverse bc wtf not
> >
>
> This file is crafted to test srtdec as it is, rather than following
> what passes for an SRT spec (that doom9 forum post[1] and the videolan
> wiki[2]). We should remove it, or keep it as a sample that should fail
> parsing.
>
> More interesting is fate-sub-srt-badsyntax. Despite the name it doesn't
> really have bad syntax, but its cues are in a random order. I guess it
> exists to test the cue sorting logic. But should subtitle demuxers
> really sort subtitles in this way? We don't do that for other formats
> that can have non-decreasing timestamps. For comparison, the WebVTT
> spec explicitly disallows decreasing timestamps. I also wonder how this
> file was created. My guess is "via a text editor" since it seems to
> consist of bits from different SRT files. There's little reason to
> support such deliberately broken files, at least having a bunch of
> sorting logic just for it. There's no reason we couldn't output packets
> in stored order.
>
> The rest of the subtitle test cases pass.
>

I agree, current subtitles not being handled in streamed way is bad
practice.
If some subtitle have wrong order of items, than new generic subtitle
filter could be implemented
which would fix that by either using queue or seeking around in subtitle
stream.


>
> /Tomas
>
> [1] https://forum.doom9.org/showthread.php?p=470941#post470941
> [2] https://wiki.videolan.org/SubRip/
> ___
> 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 3/3] avformat/mxfdec: Check first case of offset_temp computation for overflow

2024-03-30 Thread Tomas Härdin
fre 2024-03-29 klockan 20:32 +0100 skrev Michael Niedermayer:
> This is kind of ugly
> Fixes: signed integer overflow: 255 * 1157565362826411919 cannot be
> represented in type 'long'
> Fixes: 67313/clusterfuzz-testcase-minimized-ffmpeg_dem_MXF_fuzzer-
> 6250434245230592
> 
> Found-by: continuous fuzzing process
> https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
> Signed-off-by: Michael Niedermayer 
> ---
>  libavformat/mxfdec.c | 9 +++--
>  1 file changed, 7 insertions(+), 2 deletions(-)
> 
> diff --git a/libavformat/mxfdec.c b/libavformat/mxfdec.c
> index c9af4628555..fe86f516630 100644
> --- a/libavformat/mxfdec.c
> +++ b/libavformat/mxfdec.c
> @@ -1891,9 +1891,14 @@ static int
> mxf_edit_unit_absolute_offset(MXFContext *mxf, MXFIndexTable *index_t
>  if (edit_unit < s->index_start_position + s->index_duration)
> {
>  int64_t index = edit_unit - s->index_start_position;
>  
> -    if (s->edit_unit_byte_count)
> +    if (s->edit_unit_byte_count) {
> +    if (s->edit_unit_byte_count * (uint64_t)index / s-
> >edit_unit_byte_count != index ||

Don't we already have a function for testing these kinds of overflows
for av_calloc()? Or do it manually less uglily like so:

  index > INT64_MAX / s->edit_unit_byte_count

> +    s->edit_unit_byte_count * index > INT64_MAX -
> offset_temp
> +    )

Nit: looks a bit weird to have the ) there rather than at the end of
the previous line


/Tomas
___
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] avcodec/jpeg2000htdec: Check magp before using it in a shift

2024-03-30 Thread Tomas Härdin
fre 2024-03-29 klockan 20:32 +0100 skrev Michael Niedermayer:
> Fixes: shift exponent -1 is negative
> Fixes: 65378/clusterfuzz-testcase-minimized-
> ffmpeg_AV_CODEC_ID_JPEG2000_fuzzer-5457678193197056
> 
> Found-by: continuous fuzzing process
> https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
> Signed-off-by: Michael Niedermayer 
> ---
>  libavcodec/jpeg2000dec.c | 7 +--
>  1 file changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/libavcodec/jpeg2000dec.c b/libavcodec/jpeg2000dec.c
> index 1afc6b1e2dd..fe2afb05057 100644
> --- a/libavcodec/jpeg2000dec.c
> +++ b/libavcodec/jpeg2000dec.c
> @@ -1910,6 +1910,8 @@ static inline void tile_codeblocks(const
> Jpeg2000DecoderContext *s, Jpeg2000Tile
>  int nb_precincts, precno;
>  Jpeg2000Band *band = rlevel->band + bandno;
>  int cblkno = 0, bandpos;
> +    /* See Rec. ITU-T T.800, Equation E-2 */
> +    int magp = quantsty->expn[subbandno] + quantsty-
> >nguardbits - 1;
>  
>  bandpos = bandno + (reslevelno > 0);
>  
> @@ -1917,6 +1919,9 @@ static inline void tile_codeblocks(const
> Jpeg2000DecoderContext *s, Jpeg2000Tile
>  band->coord[1][0] == band->coord[1][1])
>  continue;
>  
> +    if ((codsty->cblk_style & JPEG2000_CTSY_HTJ2K_F) &&
> magp >= 31)
> +    return;

Please also print an error message and return AVERROR_PATCHWELCOME

/Tomas
___
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 2/3] lavf/srtdec: Permit streaming input

2024-03-30 Thread Tomas Härdin
lör 2024-03-30 klockan 00:35 +0100 skrev Michael Niedermayer:
> breaks fate here:
> 
> --- ./tests/ref/fate/sub-srt-madness-timeshift  2024-03-29
> 20:43:34.617419731 +0100
> +++ tests/data/fate/sub-srt-madness-timeshift   2024-03-30

Sorry but this file is utter crap and shouldn't be part of FATE. Look
at this:

> 53
> 00:00:01,111 --> 00:00:02,222
> okay, let's make things easy
> 
> 21 lol jk
> 00:00:03,333 --> 00:00:04,444
> hello
> 5
> 
> 
> don't forget me.
> 3
> 
> 
> 00:00:05,555 --> 00:00:06,666
> 
> 
> no.
> let's add some fun
> 44 yes we can
> 00:00:07,777 --> 00:00:06,666
> let's do it in reverse bc wtf not
> 

This file is crafted to test srtdec as it is, rather than following
what passes for an SRT spec (that doom9 forum post[1] and the videolan
wiki[2]). We should remove it, or keep it as a sample that should fail
parsing.

More interesting is fate-sub-srt-badsyntax. Despite the name it doesn't
really have bad syntax, but its cues are in a random order. I guess it
exists to test the cue sorting logic. But should subtitle demuxers
really sort subtitles in this way? We don't do that for other formats
that can have non-decreasing timestamps. For comparison, the WebVTT
spec explicitly disallows decreasing timestamps. I also wonder how this
file was created. My guess is "via a text editor" since it seems to
consist of bits from different SRT files. There's little reason to
support such deliberately broken files, at least having a bunch of
sorting logic just for it. There's no reason we couldn't output packets
in stored order.

The rest of the subtitle test cases pass.

/Tomas

[1] https://forum.doom9.org/showthread.php?p=470941#post470941
[2] https://wiki.videolan.org/SubRip/
___
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".