Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoland Scheidegger <rscheidegger_lists@hispeed.ch>2012-04-28 00:12:19 +0400
committerMichael Niedermayer <michaelni@gmx.at>2012-04-28 22:02:27 +0400
commit7f668cd2b5f13afa0de9f593948ce2f703ab5aaa (patch)
tree4755bc3a5668cf24d7c83db139ebab1baa529e64 /libavcodec/cabac.h
parente52b96187b5451d44ec9bbbb4b6151aebac8b559 (diff)
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: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/cabac.h')
-rw-r--r--libavcodec/cabac.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/libavcodec/cabac.h b/libavcodec/cabac.h
index 667489ede8..29535d08aa 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<<CABAC_BITS)-1)