aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/encode.h
diff options
context:
space:
mode:
authorMarton Balint <cus@passwd.hu>2025-01-07 00:02:47 +0100
committerMarton Balint <cus@passwd.hu>2025-01-25 20:10:41 +0100
commit7d9f373984c39fd87a22025efbe2f195e79f9acf (patch)
tree4081dbf4452054f7b9ea0eea0467a74c5684a3b6 /libavcodec/encode.h
parenta0a89efd0778a8021c2d7077f82531d4f955f459 (diff)
downloadffmpeg-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.h9
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 */