The branch, master has been updated
via 775b102182aef3cbdb29a7de47f250574b5b79d9 (commit)
via 191f7e486957782606da737a728ccf59f12d0cab (commit)
via 06b3a20761fa3bb3f423f8fc2e7ebe1872f6b782 (commit)
via 30d66be21ac70efae7463d1ccf0835502f9d1c6b (commit)
from 43abd1ced9424d7f9ff340d1fe01b3a43411b849 (commit)
- Log -----------------------------------------------------------------
commit 775b102182aef3cbdb29a7de47f250574b5b79d9
Author: Andreas Rheinhardt <[email protected]>
AuthorDate: Fri Nov 21 15:52:46 2025 +0100
Commit: James Almer <[email protected]>
CommitDate: Fri Nov 21 18:41:15 2025 +0000
avformat/oggenc: Schedule pagesize option for removal
Deprecated in 59220d559b5077c15fa6434e42df95f3b92f0199.
Signed-off-by: Andreas Rheinhardt <[email protected]>
diff --git a/libavformat/oggenc.c b/libavformat/oggenc.c
index e1bb7dd972..9a548a8d29 100644
--- a/libavformat/oggenc.c
+++ b/libavformat/oggenc.c
@@ -76,7 +76,9 @@ typedef struct OGGPageList {
typedef struct OGGContext {
const AVClass *class;
OGGPageList *page_list;
+#if LIBAVFORMAT_VERSION_MAJOR < 63
int pref_size; ///< preferred page size (0 => fill all segments)
+#endif
int64_t pref_duration; ///< preferred page duration (0 => fill all
segments)
int serial_offset;
} OGGContext;
@@ -87,10 +89,12 @@ typedef struct OGGContext {
static const AVOption options[] = {
{ "serial_offset", "serial number offset",
OFFSET(serial_offset), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, INT_MAX,
PARAM },
+#if LIBAVFORMAT_VERSION_MAJOR < 63
{ "oggpagesize", "Set preferred Ogg page size.",
- OFFSET(pref_size), AV_OPT_TYPE_INT, {.i64 = 0}, 0, MAX_PAGE_SIZE, PARAM},
- { "pagesize", "preferred page size in bytes (deprecated)",
- OFFSET(pref_size), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, MAX_PAGE_SIZE,
PARAM },
+ OFFSET(pref_size), AV_OPT_TYPE_INT, {.i64 = 0}, 0, MAX_PAGE_SIZE, PARAM
| AV_OPT_FLAG_DEPRECATED },
+ { "pagesize", "preferred page size in bytes",
+ OFFSET(pref_size), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, MAX_PAGE_SIZE,
PARAM | AV_OPT_FLAG_DEPRECATED },
+#endif
{ "page_duration", "preferred page duration, in microseconds",
OFFSET(pref_duration), AV_OPT_TYPE_INT64, { .i64 = 1000000 }, 0,
INT64_MAX, PARAM },
{ NULL },
@@ -262,8 +266,12 @@ static int ogg_buffer_data(AVFormatContext *s, AVStream
*st,
if (page->segments_count == 255) {
ogg_buffer_page(s, oggstream);
} else if (!header) {
+#if LIBAVFORMAT_VERSION_MAJOR < 63
if ((ogg->pref_size > 0 && page->size >= ogg->pref_size)
||
(ogg->pref_duration > 0 && next - start >=
ogg->pref_duration)) {
+#else
+ if (ogg->pref_duration > 0 && next - start >=
ogg->pref_duration) {
+#endif
ogg_buffer_page(s, oggstream);
}
}
@@ -477,9 +485,6 @@ static int ogg_init(AVFormatContext *s)
OGGStreamContext *oggstream = NULL;
int i, j;
- if (ogg->pref_size)
- av_log(s, AV_LOG_WARNING, "The pagesize option is deprecated\n");
-
for (i = 0; i < s->nb_streams; i++) {
AVStream *st = s->streams[i];
unsigned serial_num = i + ogg->serial_offset;
commit 191f7e486957782606da737a728ccf59f12d0cab
Author: James Almer <[email protected]>
AuthorDate: Thu Nov 20 23:50:44 2025 -0300
Commit: James Almer <[email protected]>
CommitDate: Fri Nov 21 18:40:58 2025 +0000
tests/checkasm/sw_ops: fix signed integer related UB when shifting values
Fixes:
src/tests/checkasm/sw_ops.c:441:34: runtime error: shift exponent 32 is too
large for 32-bit type 'int'
src/tests/checkasm/sw_ops.c:591:37: runtime error: shift exponent 32 is too
large for 32-bit type 'int'
Signed-off-by: James Almer <[email protected]>
diff --git a/tests/checkasm/sw_ops.c b/tests/checkasm/sw_ops.c
index 20b697bf25..aea25bbbbc 100644
--- a/tests/checkasm/sw_ops.c
+++ b/tests/checkasm/sw_ops.c
@@ -438,7 +438,7 @@ static AVRational rndq(SwsPixelType t)
{
const unsigned num = rnd();
if (ff_sws_pixel_type_is_int(t)) {
- const unsigned mask = (1 << (ff_sws_pixel_type_size(t) * 8)) - 1;
+ const unsigned mask = UINT_MAX >> (32 - ff_sws_pixel_type_size(t) * 8);
return (AVRational) { num & mask, 1 };
} else {
const unsigned den = rnd();
@@ -588,7 +588,7 @@ static void check_convert(void)
.convert.to = o,
});
} else if (isize > osize || !ff_sws_pixel_type_is_int(i)) {
- uint32_t range = (1 << osize * 8) - 1;
+ uint32_t range = UINT32_MAX >> (32 - osize * 8);
CHECK_COMMON_RANGE(name, range, i, o, {
.op = SWS_OP_CONVERT,
.type = i,
commit 06b3a20761fa3bb3f423f8fc2e7ebe1872f6b782
Author: James Almer <[email protected]>
AuthorDate: Thu Nov 20 23:49:07 2025 -0300
Commit: James Almer <[email protected]>
CommitDate: Fri Nov 21 18:40:58 2025 +0000
swscale/ops_tmpl_int: fix signed integer related UB when shifting values
Fixes:
src/libswscale/ops_tmpl_int.c:292:23: runtime error: left shift of 188 by
24 places cannot be represented in type 'int'
src/libswscale/ops_tmpl_int.c:290:23: runtime error: left shift of 158 by
24 places cannot be represented in type 'int'
src/libswscale/ops_tmpl_int.c:293:23: runtime error: left shift of 136 by
24 places cannot be represented in type 'int'
src/libswscale/ops_tmpl_int.c:291:23: runtime error: left shift of 160 by
24 places cannot be represented in type 'int'
Signed-off-by: James Almer <[email protected]>
diff --git a/libswscale/ops_tmpl_int.c b/libswscale/ops_tmpl_int.c
index 857031ada9..da24c1985f 100644
--- a/libswscale/ops_tmpl_int.c
+++ b/libswscale/ops_tmpl_int.c
@@ -287,10 +287,10 @@ DECL_PATTERN(expand32)
SWS_LOOP
for (int i = 0; i < SWS_BLOCK_SIZE; i++) {
- x32[i] = x[i] << 24 | x[i] << 16 | x[i] << 8 | x[i];
- y32[i] = y[i] << 24 | y[i] << 16 | y[i] << 8 | y[i];
- z32[i] = z[i] << 24 | z[i] << 16 | z[i] << 8 | z[i];
- w32[i] = w[i] << 24 | w[i] << 16 | w[i] << 8 | w[i];
+ x32[i] = (uint32_t)x[i] << 24 | x[i] << 16 | x[i] << 8 | x[i];
+ y32[i] = (uint32_t)y[i] << 24 | y[i] << 16 | y[i] << 8 | y[i];
+ z32[i] = (uint32_t)z[i] << 24 | z[i] << 16 | z[i] << 8 | z[i];
+ w32[i] = (uint32_t)w[i] << 24 | w[i] << 16 | w[i] << 8 | w[i];
}
CONTINUE(u32block_t, x32, y32, z32, w32);
commit 30d66be21ac70efae7463d1ccf0835502f9d1c6b
Author: James Almer <[email protected]>
AuthorDate: Thu Nov 20 18:15:23 2025 -0300
Commit: James Almer <[email protected]>
CommitDate: Fri Nov 21 18:40:58 2025 +0000
swscale/x86/ops: fix signed integer related UB in normalize_clear()
Signed-off-by: James Almer <[email protected]>
diff --git a/libswscale/x86/ops.c b/libswscale/x86/ops.c
index 26f49582ae..97bee93f5b 100644
--- a/libswscale/x86/ops.c
+++ b/libswscale/x86/ops.c
@@ -616,8 +616,8 @@ static void normalize_clear(SwsOp *op)
if (!op->c.q4[i].den)
continue;
switch (ff_sws_pixel_type_size(op->type)) {
- case 1: c.u32 = 0x1010101 * priv.u8[i]; break;
- case 2: c.u32 = priv.u16[i] << 16 | priv.u16[i]; break;
+ case 1: c.u32 = 0x1010101U * priv.u8[i]; break;
+ case 2: c.u32 = (uint32_t)priv.u16[i] << 16 | priv.u16[i]; break;
case 4: c.u32 = priv.u32[i]; break;
}
-----------------------------------------------------------------------
Summary of changes:
libavformat/oggenc.c | 17 +++++++++++------
libswscale/ops_tmpl_int.c | 8 ++++----
libswscale/x86/ops.c | 4 ++--
tests/checkasm/sw_ops.c | 4 ++--
4 files changed, 19 insertions(+), 14 deletions(-)
hooks/post-receive
--
_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]