From 14e9ffc1e41424a530c83310611979c0d246417b Mon Sep 17 00:00:00 2001 From: Roland Scheidegger Date: Fri, 27 Apr 2012 22:19:38 +0200 Subject: h264: use one table instead of several for cabac functions The reason is this is easier for PIC code (in particular on darwin...). Keep the old names as pointers (static in cabac_functions.h so gcc knows these are just immediate offsets) so the c code can nicely stay the same (alternatively could use offsets directly in the functions needing the tables). This should produce the same code as before with non-pic and better code (confirmed) with pic. The assembly uses the new table but still won't work for PIC case. Signed-off-by: Ronald S. Bultje --- libavcodec/cabac.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'libavcodec/cabac.h') diff --git a/libavcodec/cabac.h b/libavcodec/cabac.h index 5a99f0b2fe..1f1c943262 100644 --- a/libavcodec/cabac.h +++ b/libavcodec/cabac.h @@ -31,6 +31,11 @@ #include "put_bits.h" +#define H264_NORM_SHIFT_OFFSET 0 +#define H264_LPS_RANGE_OFFSET 512 +#define H264_MLPS_STATE_OFFSET 1024 +#define H264_LAST_COEFF_FLAG_OFFSET_8x8_OFFSET 1280 + #define CABAC_BITS 16 #define CABAC_MASK ((1<