[FFmpeg-devel] [PATCH v2] avfilter: fix data type for {Tile, Untile}Context's image size
Andrew Sayers
ffmpeg-devel at pileofstuff.org
Fri Jul 19 16:54:09 EEST 2024
These are accessed as AV_OPT_TYPE_IMAGE_SIZE AVOptions,
so must be implemented as (signed) int's
---
doc/APIchanges | 6 ++++++
libavfilter/version_major.h | 1 +
libavfilter/vf_tile.c | 4 ++++
libavfilter/vf_untile.c | 4 ++++
4 files changed, 15 insertions(+)
diff --git a/doc/APIchanges b/doc/APIchanges
index 5751216b24..e839d1b674 100644
--- a/doc/APIchanges
+++ b/doc/APIchanges
@@ -2,6 +2,12 @@ The last version increases of all libraries were on 2024-03-07
API changes, most recent first:
+2024-07-19 - xxxxxxxxxx - lavfi 10 - vf_tile.c
+ Convert TileContext::w and TileContext::h from unsigned to int
+
+2024-07-19 - xxxxxxxxxx - lavfi 10 - vf_untile.c
+ Convert UntileContext::w and UntileContext::h from unsigned to int
+
2024-07-xx - xxxxxxxxxx - lavf 61 - avformat.h
Deprecate avformat_transfer_internal_stream_timing_info()
and av_stream_get_codec_timebase() without replacement.
diff --git a/libavfilter/version_major.h b/libavfilter/version_major.h
index c5e660eeda..a8dc790c0a 100644
--- a/libavfilter/version_major.h
+++ b/libavfilter/version_major.h
@@ -36,5 +36,6 @@
*/
#define FF_API_LINK_PUBLIC (LIBAVFILTER_VERSION_MAJOR < 11)
+#define FF_API_TILE_SIZE_TYPE (LIBAVFILTER_VERSION_MAJOR < 11)
#endif /* AVFILTER_VERSION_MAJOR_H */
diff --git a/libavfilter/vf_tile.c b/libavfilter/vf_tile.c
index b45e739bb6..0076657c92 100644
--- a/libavfilter/vf_tile.c
+++ b/libavfilter/vf_tile.c
@@ -34,7 +34,11 @@
typedef struct TileContext {
const AVClass *class;
+#if FF_API_TILE_SIZE_TYPE
unsigned w, h;
+#else
+ int w, h;
+#endif
unsigned margin;
unsigned padding;
unsigned overlap;
diff --git a/libavfilter/vf_untile.c b/libavfilter/vf_untile.c
index f32f3e186b..5164e2efb0 100644
--- a/libavfilter/vf_untile.c
+++ b/libavfilter/vf_untile.c
@@ -28,7 +28,11 @@
typedef struct UntileContext {
const AVClass *class;
+#if FF_API_TILE_SIZE_TYPE
unsigned w, h;
+#else
+ int w, h;
+#endif
unsigned current;
unsigned nb_frames;
AVFrame *frame;
--
2.45.2
More information about the ffmpeg-devel
mailing list