Commit f8406ab4 authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec: add max_samples

Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent 402dbd46
......@@ -15,6 +15,9 @@ libavutil: 2017-10-21
API changes, most recent first:
2019-09-25 - xxxxxxxxxx - lavc 58.59.100 - avcodec.h
Add max_samples
2019-09-04 - 2a9d461abc - lavu 56.35.100 - hwcontext_videotoolbox.h
Add av_map_videotoolbox_format_from_pixfmt2() for full range pixfmt
......
......@@ -3373,6 +3373,14 @@ typedef struct AVCodecContext {
* - encoding: unused
*/
int discard_damaged_percentage;
/**
* The number of samples per frame to maximally accept.
*
* - decoding: set by user
* - encoding: set by user
*/
int64_t max_samples;
} AVCodecContext;
#if FF_API_CODEC_GET_SET
......
......@@ -476,6 +476,7 @@ static const AVOption avcodec_options[] = {
{"pixel_format", "set pixel format", OFFSET(pix_fmt), AV_OPT_TYPE_PIXEL_FMT, {.i64=AV_PIX_FMT_NONE}, -1, INT_MAX, 0 },
{"video_size", "set video size", OFFSET(width), AV_OPT_TYPE_IMAGE_SIZE, {.str=NULL}, 0, INT_MAX, 0 },
{"max_pixels", "Maximum number of pixels", OFFSET(max_pixels), AV_OPT_TYPE_INT64, {.i64 = INT_MAX }, 0, INT_MAX, A|V|S|D|E },
{"max_samples", "Maximum number of samples", OFFSET(max_samples), AV_OPT_TYPE_INT64, {.i64 = INT_MAX }, 0, INT_MAX, A|D|E },
{"hwaccel_flags", NULL, OFFSET(hwaccel_flags), AV_OPT_TYPE_FLAGS, {.i64 = AV_HWACCEL_FLAG_IGNORE_LEVEL }, 0, UINT_MAX, V|D, "hwaccel_flags"},
{"ignore_level", "ignore level even if the codec level used is unknown or higher than the maximum supported level reported by the hardware driver", 0, AV_OPT_TYPE_CONST, { .i64 = AV_HWACCEL_FLAG_IGNORE_LEVEL }, INT_MIN, INT_MAX, V | D, "hwaccel_flags" },
{"allow_high_depth", "allow to output YUV pixel formats with a different chroma sampling than 4:2:0 and/or other than 8 bits per component", 0, AV_OPT_TYPE_CONST, {.i64 = AV_HWACCEL_FLAG_ALLOW_HIGH_DEPTH }, INT_MIN, INT_MAX, V | D, "hwaccel_flags"},
......
......@@ -28,8 +28,8 @@
#include "libavutil/version.h"
#define LIBAVCODEC_VERSION_MAJOR 58
#define LIBAVCODEC_VERSION_MINOR 58
#define LIBAVCODEC_VERSION_MICRO 101
#define LIBAVCODEC_VERSION_MINOR 59
#define LIBAVCODEC_VERSION_MICRO 100
#define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
LIBAVCODEC_VERSION_MINOR, \
......
......@@ -136,6 +136,7 @@ stream=0, decode=0
pixel_format=yuvj422p
video_size=400x225
max_pixels=2147483647
max_samples=2147483647
hwaccel_flags=0x00000001
extra_hw_frames=-1
discard_damaged_percentage=95
......@@ -277,6 +278,7 @@ stream=0, decode=1
pixel_format=yuvj422p
video_size=400x225
max_pixels=2147483647
max_samples=2147483647
hwaccel_flags=0x00000001
extra_hw_frames=-1
discard_damaged_percentage=95
......@@ -136,6 +136,7 @@ stream=0, decode=0
pixel_format=rgba
video_size=128x128
max_pixels=2147483647
max_samples=2147483647
hwaccel_flags=0x00000001
extra_hw_frames=-1
discard_damaged_percentage=95
......@@ -277,6 +278,7 @@ stream=0, decode=1
pixel_format=rgba
video_size=128x128
max_pixels=2147483647
max_samples=2147483647
hwaccel_flags=0x00000001
extra_hw_frames=-1
discard_damaged_percentage=95
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment