---
libavcodec/cabac.h | 38 --------------------------------------
libavcodec/h264_cabac.c | 35 +++++++++++++++++++++++++++++++++++
2 files changed, 35 insertions(+), 38 deletions(-)
diff --git a/libavcodec/cabac.h b/libavcodec/cabac.h
index c858682..5f0bf4f 100644
--- a/libavcodec/cabac.h
+++ b/libavcodec/cabac.h
@@ -53,10 +53,6 @@ extern uint8_t ff_h264_mps_state[2*64]; ///< transIdxMPS
extern uint8_t ff_h264_lps_state[2*64]; ///< transIdxLPS
extern const uint8_t ff_h264_norm_shift[512];
-#if ARCH_X86
-# include "x86/cabac.h"
-#endif
-
void ff_init_cabac_encoder(CABACContext *c, uint8_t *buf, int buf_size);
void ff_init_cabac_decoder(CABACContext *c, const uint8_t *buf, int buf_size);
void ff_init_cabac_states(CABACContext *c);
@@ -80,40 +76,6 @@ static inline void renorm_cabac_decoder_once(CABACContext
*c){
refill(c);
}
-static int av_unused get_cabac_bypass(CABACContext *c){
- int range;
- c->low += c->low;
-
- if(!(c->low & CABAC_MASK))
- refill(c);
-
- range= c->range<<(CABAC_BITS+1);
- if(c->low < range){
- return 0;
- }else{
- c->low -= range;
- return 1;
- }
-}
-
-
-#ifndef get_cabac_bypass_sign
-static av_always_inline int get_cabac_bypass_sign(CABACContext *c, int val){
- int range, mask;
- c->low += c->low;
-
- if(!(c->low & CABAC_MASK))
- refill(c);
-
- range= c->range<<(CABAC_BITS+1);
- c->low -= range;
- mask= c->low >> 31;
- range &= mask;
- c->low += range;
- return (val^mask)-mask;
-}
-#endif
-
/**
*
* @return the number of bytes read or 0 if no end
diff --git a/libavcodec/h264_cabac.c b/libavcodec/h264_cabac.c
index f464e78..0123f6f 100644
--- a/libavcodec/h264_cabac.c
+++ b/libavcodec/h264_cabac.c
@@ -37,6 +37,7 @@
#include "cabac.h"
#if ARCH_X86
+#include "x86/cabac.h"
#include "x86/h264_i386.h"
#endif
@@ -1329,6 +1330,40 @@ static int av_noinline av_unused
get_cabac_noinline(CABACContext *c, uint8_t * c
return get_cabac_inline(c,state);
}
+static int av_unused get_cabac_bypass(CABACContext *c){
+ int range;
+ c->low += c->low;
+
+ if(!(c->low & CABAC_MASK))
+ refill(c);
+
+ range= c->range<<(CABAC_BITS+1);
+ if(c->low < range){
+ return 0;
+ }else{
+ c->low -= range;
+ return 1;
+ }
+}
+
+
+#ifndef get_cabac_bypass_sign
+static av_always_inline int get_cabac_bypass_sign(CABACContext *c, int val){
+ int range, mask;
+ c->low += c->low;
+
+ if(!(c->low & CABAC_MASK))
+ refill(c);
+
+ range= c->range<<(CABAC_BITS+1);
+ c->low -= range;
+ mask= c->low >> 31;
+ range &= mask;
+ c->low += range;
+ return (val^mask)-mask;
+}
+#endif
+
static int decode_cabac_field_decoding_flag(H264Context *h) {
MpegEncContext * const s = &h->s;
const long mbb_xy = h->mb_xy - 2L*s->mb_stride;
--
1.7.1
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel