From 4bb1070c154e49d35805fbcdac9c9e92f702ef96 Mon Sep 17 00:00:00 2001 From: Vittorio Giovara Date: Sun, 15 Nov 2015 23:26:07 +0100 Subject: ffv1: Explicitly name the coder type FFv1 uses two types of coders, golomb and range with two different tables. This is exposed this in a rather convoluted way, for example mentioning to set coder type 1 while initializing the variable 'ac' to 2, because encoder does not use range coder with default table. Appropriate internal coder type values have been added and used in any check rather than using raw numbers. Initialization of avctx.coder_type in ffv1dec is removed because this field is encoder only. An unneeded validation check in the encoder is dropped too. Signed-off-by: Vittorio Giovara --- libavcodec/ffv1.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'libavcodec/ffv1.h') diff --git a/libavcodec/ffv1.h b/libavcodec/ffv1.h index 6e8c798b6a..b44253e94c 100644 --- a/libavcodec/ffv1.h +++ b/libavcodec/ffv1.h @@ -36,6 +36,10 @@ #define MAX_QUANT_TABLES 8 #define MAX_CONTEXT_INPUTS 5 +#define AC_GOLOMB_RICE 0 +#define AC_RANGE_DEFAULT_TAB 1 +#define AC_RANGE_CUSTOM_TAB 2 + extern const uint8_t ff_log2_run[41]; extern const int8_t ffv1_quant5_10bit[256]; -- cgit v1.2.3