diff options
author | Marton Balint <cus@passwd.hu> | 2025-01-07 00:02:47 +0100 |
---|---|---|
committer | Marton Balint <cus@passwd.hu> | 2025-01-25 20:10:41 +0100 |
commit | 7d9f373984c39fd87a22025efbe2f195e79f9acf (patch) | |
tree | 4081dbf4452054f7b9ea0eea0467a74c5684a3b6 /libavcodec/encode.h | |
parent | a0a89efd0778a8021c2d7077f82531d4f955f459 (diff) | |
download | ffmpeg-7d9f373984c39fd87a22025efbe2f195e79f9acf.tar.gz |
avcodec/mpegvideo_enc: add checks for custom inter/intra/chroma matrices
Make the checker functions available for all codecs.
Signed-off-by: Marton Balint <cus@passwd.hu>
Diffstat (limited to 'libavcodec/encode.h')
-rw-r--r-- | libavcodec/encode.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/libavcodec/encode.h b/libavcodec/encode.h index 85331e04b7..656da135d2 100644 --- a/libavcodec/encode.h +++ b/libavcodec/encode.h @@ -96,4 +96,13 @@ static av_always_inline int64_t ff_samples_to_time_base(const AVCodecContext *av avctx->time_base); } +/** + * Check if the elements of codec context matrices (intra_matrix, inter_matrix or + * chroma_intra_matrix) are within the specified range. + */ +#define FF_MATRIX_TYPE_INTRA (1U << 0) +#define FF_MATRIX_TYPE_INTER (1U << 1) +#define FF_MATRIX_TYPE_CHROMA_INTRA (1U << 2) +int ff_check_codec_matrices(AVCodecContext *avctx, unsigned types, uint16_t min, uint16_t max); + #endif /* AVCODEC_ENCODE_H */ |