avutil: Remove FF_API_OPT_INT_LIST

Deprecated on 2024-09-30.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
Andreas Rheinhardt
2026-03-09 06:41:36 +01:00
parent 38990c59d7
commit c32a719cb2
24 changed files with 45 additions and 86 deletions

View File

@@ -18,19 +18,21 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <inttypes.h>
#include <limits.h>
#include <math.h>
#include <stdarg.h>
#include <stdint.h>
#include <stdio.h>
#include <string.h>
#include "libavutil/mem.h"
#include "libavutil/avassert.h"
#include "libavutil/avutil.h"
#include "libavutil/base64.h"
#include "libavutil/bprint.h"
#include "libavutil/common.h"
#include "libavutil/error.h"
#include "libavutil/hash.h"
#include "libavutil/intreadwrite.h"
#include "libavutil/macros.h"
#include "libavutil/opt.h"
#include "avtextformat.h"

View File

@@ -18,13 +18,13 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <inttypes.h>
#include <limits.h>
#include <stdarg.h>
#include <stdint.h>
#include <stdio.h>
#include <string.h>
#include "avtextformat.h"
#include "libavutil/avutil.h"
#include "libavutil/bprint.h"
#include "libavutil/error.h"
#include "libavutil/opt.h"

View File

@@ -18,13 +18,14 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <inttypes.h>
#include <limits.h>
#include <stdarg.h>
#include <stdint.h>
#include <stdio.h>
#include <string.h>
#include "avtextformat.h"
#include "libavutil/avutil.h"
#include "libavutil/bprint.h"
#include "libavutil/opt.h"
#include "tf_internal.h"

View File

@@ -18,10 +18,9 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <inttypes.h>
#include <limits.h>
#include <stdarg.h>
#include <stdint.h>
#include <stdio.h>
#include <string.h>
#include "avtextformat.h"

View File

@@ -18,11 +18,9 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <inttypes.h>
#include <limits.h>
#include <stdarg.h>
#include <stdint.h>
#include <stdio.h>
#include <string.h>
#include "avtextformat.h"

View File

@@ -18,10 +18,9 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <inttypes.h>
#include <limits.h>
#include <stdarg.h>
#include <stdint.h>
#include <stdio.h>
#include <string.h>
#include "avtextformat.h"

View File

@@ -18,10 +18,9 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <inttypes.h>
#include <limits.h>
#include <stdarg.h>
#include <stdint.h>
#include <stdio.h>
#include <string.h>
#include "avtextformat.h"

View File

@@ -18,8 +18,8 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <stdint.h>
#include <string.h>
#include <inttypes.h>
#include <stddef.h>
#include "avtextformat.h"
#include "libavutil/bprint.h"

View File

@@ -19,6 +19,9 @@
#ifndef AVCODEC_AVDCT_H
#define AVCODEC_AVDCT_H
#include <stddef.h>
#include <stdint.h>
#include "libavutil/opt.h"
/**

View File

@@ -19,9 +19,8 @@
#ifndef AVCODEC_V210ENC_H
#define AVCODEC_V210ENC_H
#include "libavutil/log.h"
#include "libavutil/opt.h"
#include "libavutil/pixfmt.h"
#include <stddef.h>
#include <stdint.h>
typedef struct V210EncContext {
void (*pack_line_8)(const uint8_t *y, const uint8_t *u,

View File

@@ -27,6 +27,9 @@
* support work with concatdec, hls
*/
#include <inttypes.h>
#include <string.h>
#include "libavutil/avassert.h"
#include "libavutil/avstring.h"
#include "libavutil/error.h"
@@ -35,7 +38,6 @@
#include "libavutil/opt.h"
#include "libavutil/thread.h"
#include "url.h"
#include <stdint.h>
#if HAVE_UNISTD_H
#include <unistd.h>

View File

@@ -23,6 +23,7 @@
#include <libbluray/bluray.h>
#include "libavutil/avstring.h"
#include "libavutil/error.h"
#include "libavformat/url.h"
#include "libavutil/opt.h"

View File

@@ -27,8 +27,11 @@
* support filling with a background thread
*/
#include <inttypes.h>
#include "libavutil/avassert.h"
#include "libavutil/avstring.h"
#include "libavutil/error.h"
#include "libavutil/file_open.h"
#include "libavutil/mem.h"
#include "libavutil/opt.h"
@@ -42,7 +45,6 @@
#include <unistd.h>
#endif
#include <sys/stat.h>
#include <stdlib.h>
#include "os_support.h"
#include "url.h"

View File

@@ -19,8 +19,12 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <inttypes.h>
#include <string.h>
#include "libavutil/aes.h"
#include "libavutil/avstring.h"
#include "libavutil/error.h"
#include "libavutil/mem.h"
#include "libavutil/opt.h"
#include "url.h"

View File

@@ -19,9 +19,12 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <string.h>
#include "config_components.h"
#include "libavutil/avstring.h"
#include "libavutil/error.h"
#include "libavutil/file_open.h"
#include "libavutil/internal.h"
#include "libavutil/mem.h"

View File

@@ -19,7 +19,10 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <string.h>
#include "libavutil/avstring.h"
#include "libavutil/error.h"
#include "libavutil/file_open.h"
#include "libavutil/getenv_utf8.h"
#include "libavutil/mem.h"

View File

@@ -19,7 +19,9 @@
*/
#include <libsmbclient.h>
#include <string.h>
#include "libavutil/avstring.h"
#include "libavutil/error.h"
#include "libavutil/mem.h"
#include "libavutil/opt.h"
#include "url.h"

View File

@@ -18,6 +18,8 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <string.h>
#include "config.h"
#include "config_components.h"
#include "libavutil/attributes.h"

View File

@@ -25,6 +25,7 @@
#include "libavutil/avassert.h"
#include "libavutil/avstring.h"
#include "libavutil/crc.h"
#include "libavutil/error.h"
#include "libavutil/hash.h"
#include "libavutil/file_open.h"
#include "libavutil/mem.h"
@@ -35,7 +36,9 @@
#include <errno.h>
#include <fcntl.h>
#include <inttypes.h>
#include <stdatomic.h>
#include <string.h>
#include <sys/file.h>
#include <sys/mman.h>
#include <sys/stat.h>

View File

@@ -20,6 +20,8 @@
#include "libavutil/avassert.h"
#include "libavutil/avstring.h"
#include "libavutil/common.h"
#include "libavutil/error.h"
#include "libavutil/opt.h"
#include "url.h"

View File

@@ -313,30 +313,6 @@ static inline void *av_x_if_null(const void *p, const void *x)
return (void *)(intptr_t)(p ? p : x);
}
#if FF_API_OPT_INT_LIST
/**
* Compute the length of an integer list.
*
* @param elsize size in bytes of each list element (only 1, 2, 4 or 8)
* @param term list terminator (usually 0 or -1)
* @param list pointer to the list
* @return length of the list, in elements, not counting the terminator
*/
attribute_deprecated
unsigned av_int_list_length_for_size(unsigned elsize,
const void *list, uint64_t term) av_pure;
/**
* Compute the length of an integer list.
*
* @param term list terminator (usually 0 or -1)
* @param list pointer to the list
* @return length of the list, in elements, not counting the terminator
*/
#define av_int_list_length(list, term) \
av_int_list_length_for_size(sizeof(*(list)), list, term)
#endif
/**
* Return the fractional representation of the internal time base.
*/

View File

@@ -28,7 +28,6 @@
*/
#include "rational.h"
#include "avutil.h"
#include "channel_layout.h"
#include "dict.h"
#include "log.h"
@@ -886,24 +885,6 @@ int av_opt_set_chlayout(void *obj, const char *name, const AVChannelLayout *layo
*/
int av_opt_set_dict_val(void *obj, const char *name, const AVDictionary *val, int search_flags);
#if FF_API_OPT_INT_LIST
/**
* Set a binary option to an integer list.
*
* @param obj AVClass object to set options on
* @param name name of the binary option
* @param val pointer to an integer list (must have the correct type with
* regard to the contents of the list)
* @param term list terminator (usually 0 or -1)
* @param flags search flags
*/
#define av_opt_set_int_list(obj, name, val, term, flags) \
(av_int_list_length(val, term) > INT_MAX / sizeof(*(val)) ? \
AVERROR(EINVAL) : \
av_opt_set_bin(obj, name, (const uint8_t *)(val), \
av_int_list_length(val, term) * sizeof(*(val)), flags))
#endif
/**
* Add, replace, or remove elements for an array option. Which of these
* operations is performed depends on the values of val and search_flags.

View File

@@ -51,27 +51,6 @@ char av_get_picture_type_char(enum AVPictureType pict_type)
}
}
#if FF_API_OPT_INT_LIST
unsigned av_int_list_length_for_size(unsigned elsize,
const void *list, uint64_t term)
{
unsigned i;
if (!list)
return 0;
#define LIST_LENGTH(type) \
{ type t = term, *l = (type *)list; for (i = 0; l[i] != t; i++); }
switch (elsize) {
case 1: LIST_LENGTH(uint8_t); break;
case 2: LIST_LENGTH(uint16_t); break;
case 4: LIST_LENGTH(uint32_t); break;
case 8: LIST_LENGTH(uint64_t); break;
default: av_assert0(!"valid element size");
}
return i;
}
#endif
char *av_fourcc_make_string(char *buf, uint32_t fourcc)
{
int i;

View File

@@ -105,7 +105,6 @@
* @{
*/
#define FF_API_OPT_INT_LIST (LIBAVUTIL_VERSION_MAJOR < 61)
#define FF_API_OPT_PTR (LIBAVUTIL_VERSION_MAJOR < 61)
#define FF_API_CPU_FLAG_FORCE (LIBAVUTIL_VERSION_MAJOR < 61)
#define FF_API_DOVI_L11_INVALID_PROPS (LIBAVUTIL_VERSION_MAJOR < 61)