aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFei Wang <fei.w.wang@intel.com>2023-09-11 15:52:25 +0800
committerHaihao Xiang <haihao.xiang@intel.com>2023-09-22 13:15:00 +0800
commit6c3a5d625f917631d1c8bab31ed65ebe26d14f47 (patch)
tree024dc3d385dc6c7e83a9739d45aa3ade59a83ea9
parent95b5c8172968e942704cb4eaceddf8730d9e501c (diff)
downloadffmpeg-6c3a5d625f917631d1c8bab31ed65ebe26d14f47.tar.gz
avcodec/cbs_av1: Add tx mode enum values
Signed-off-by: Fei Wang <fei.w.wang@intel.com> Reviewed-by: Neal Gompa <ngompa13@gmail.com>
-rw-r--r--libavcodec/av1.h7
-rw-r--r--libavcodec/cbs_av1_syntax_template.c4
2 files changed, 9 insertions, 2 deletions
diff --git a/libavcodec/av1.h b/libavcodec/av1.h
index 384f7cddc7..8704bc41c1 100644
--- a/libavcodec/av1.h
+++ b/libavcodec/av1.h
@@ -175,6 +175,13 @@ enum {
AV1_RESTORE_SWITCHABLE = 3,
};
+// TX mode (section 6.8.21)
+enum {
+ AV1_ONLY_4X4 = 0,
+ AV1_TX_MODE_LARGEST = 1,
+ AV1_TX_MODE_SELECT = 2,
+};
+
// Sequence Headers are actually unbounded because one can use
// an arbitrary number of leading zeroes when encoding via uvlc.
// The following estimate is based around using the lowest number
diff --git a/libavcodec/cbs_av1_syntax_template.c b/libavcodec/cbs_av1_syntax_template.c
index 6f09c4e410..3be1f2d30f 100644
--- a/libavcodec/cbs_av1_syntax_template.c
+++ b/libavcodec/cbs_av1_syntax_template.c
@@ -1028,9 +1028,9 @@ static int FUNC(read_tx_mode)(CodedBitstreamContext *ctx, RWContext *rw,
int err;
if (priv->coded_lossless)
- infer(tx_mode, 0);
+ infer(tx_mode, AV1_ONLY_4X4);
else
- increment(tx_mode, 1, 2);
+ increment(tx_mode, AV1_TX_MODE_LARGEST, AV1_TX_MODE_SELECT);
return 0;
}