diff options
Diffstat (limited to 'vp8/common')
-rw-r--r-- | vp8/common/entropy.h | 2 | ||||
-rw-r--r-- | vp8/common/pred_common.c | 22 | ||||
-rw-r--r-- | vp8/common/pred_common.h | 20 | ||||
-rw-r--r-- | vp8/common/seg_common.c | 6 | ||||
-rw-r--r-- | vp8/common/seg_common.h | 6 |
5 files changed, 28 insertions, 28 deletions
diff --git a/vp8/common/entropy.h b/vp8/common/entropy.h index 4af3ecf15..b9dfb344f 100644 --- a/vp8/common/entropy.h +++ b/vp8/common/entropy.h @@ -37,9 +37,9 @@ extern const int vp8_i8x8_block[4]; #define DCT_VAL_CATEGORY5 9 /* 35-66 Extra Bits 5+1 */ #define DCT_VAL_CATEGORY6 10 /* 67+ Extra Bits 13+1 */ #define DCT_EOB_TOKEN 11 /* EOB Extra Bits 0+0 */ - #define MAX_ENTROPY_TOKENS 12 #define ENTROPY_NODES 11 +#define EOSB_TOKEN 127 /* Not signalled, encoder only */ extern const vp8_tree_index vp8_coef_tree[]; diff --git a/vp8/common/pred_common.c b/vp8/common/pred_common.c index cb80a0f7e..a32389433 100644 --- a/vp8/common/pred_common.c +++ b/vp8/common/pred_common.c @@ -15,8 +15,8 @@ // TBD prediction functions for various bitstream signals // Returns a context number for the given MB prediction signal -unsigned char get_pred_context(VP8_COMMON *const cm, - MACROBLOCKD *const xd, +unsigned char get_pred_context(const VP8_COMMON *const cm, + const MACROBLOCKD *const xd, PRED_ID pred_id) { int pred_context; MODE_INFO *m = xd->mode_info_context; @@ -106,8 +106,8 @@ unsigned char get_pred_context(VP8_COMMON *const cm, // This function returns a context probability for coding a given // prediction signal -vp8_prob get_pred_prob(VP8_COMMON *const cm, - MACROBLOCKD *const xd, +vp8_prob get_pred_prob(const VP8_COMMON *const cm, + const MACROBLOCKD *const xd, PRED_ID pred_id) { vp8_prob pred_probability; int pred_context; @@ -146,10 +146,10 @@ vp8_prob get_pred_prob(VP8_COMMON *const cm, // This function returns a context probability ptr for coding a given // prediction signal -vp8_prob *get_pred_probs(VP8_COMMON *const cm, - MACROBLOCKD *const xd, +const vp8_prob *get_pred_probs(const VP8_COMMON *const cm, + const MACROBLOCKD *const xd, PRED_ID pred_id) { - vp8_prob *pred_probability; + const vp8_prob *pred_probability; int pred_context; // Get the appropriate prediction context @@ -191,7 +191,7 @@ vp8_prob *get_pred_probs(VP8_COMMON *const cm, // This function returns the status of the given prediction signal. // I.e. is the predicted value for the given signal correct. -unsigned char get_pred_flag(MACROBLOCKD *const xd, +unsigned char get_pred_flag(const MACROBLOCKD *const xd, PRED_ID pred_id) { unsigned char pred_flag = 0; @@ -260,14 +260,14 @@ void set_pred_flag(MACROBLOCKD *const xd, // peredict various bitstream signals. // Macroblock segment id prediction function -unsigned char get_pred_mb_segid(VP8_COMMON *const cm, int MbIndex) { +unsigned char get_pred_mb_segid(const VP8_COMMON *const cm, int MbIndex) { // Currently the prediction for the macroblock segment ID is // the value stored for this macroblock in the previous frame. return cm->last_frame_seg_map[MbIndex]; } -MV_REFERENCE_FRAME get_pred_ref(VP8_COMMON *const cm, - MACROBLOCKD *const xd) { +MV_REFERENCE_FRAME get_pred_ref(const VP8_COMMON *const cm, + const MACROBLOCKD *const xd) { MODE_INFO *m = xd->mode_info_context; MV_REFERENCE_FRAME left; diff --git a/vp8/common/pred_common.h b/vp8/common/pred_common.h index f4992f555..402e0235f 100644 --- a/vp8/common/pred_common.h +++ b/vp8/common/pred_common.h @@ -28,19 +28,19 @@ typedef enum { } PRED_ID; -extern unsigned char get_pred_context(VP8_COMMON *const cm, - MACROBLOCKD *const xd, +extern unsigned char get_pred_context(const VP8_COMMON *const cm, + const MACROBLOCKD *const xd, PRED_ID pred_id); -extern vp8_prob get_pred_prob(VP8_COMMON *const cm, - MACROBLOCKD *const xd, +extern vp8_prob get_pred_prob(const VP8_COMMON *const cm, + const MACROBLOCKD *const xd, PRED_ID pred_id); -extern vp8_prob *get_pred_probs(VP8_COMMON *const cm, - MACROBLOCKD *const xd, +extern const vp8_prob *get_pred_probs(const VP8_COMMON *const cm, + const MACROBLOCKD *const xd, PRED_ID pred_id); -extern unsigned char get_pred_flag(MACROBLOCKD *const xd, +extern unsigned char get_pred_flag(const MACROBLOCKD *const xd, PRED_ID pred_id); extern void set_pred_flag(MACROBLOCKD *const xd, @@ -48,10 +48,10 @@ extern void set_pred_flag(MACROBLOCKD *const xd, unsigned char pred_flag); -extern unsigned char get_pred_mb_segid(VP8_COMMON *const cm, int MbIndex); +extern unsigned char get_pred_mb_segid(const VP8_COMMON *const cm, int MbIndex); -extern MV_REFERENCE_FRAME get_pred_ref(VP8_COMMON *const cm, - MACROBLOCKD *const xd); +extern MV_REFERENCE_FRAME get_pred_ref(const VP8_COMMON *const cm, + const MACROBLOCKD *const xd); extern void compute_mod_refprobs(VP8_COMMON *const cm); #endif /* __INC_PRED_COMMON_H__ */ diff --git a/vp8/common/seg_common.c b/vp8/common/seg_common.c index b616391ba..a11fe87e9 100644 --- a/vp8/common/seg_common.c +++ b/vp8/common/seg_common.c @@ -19,7 +19,7 @@ const int vp8_seg_feature_data_bits[SEG_LVL_MAX] = // the coding mechanism is still subject to change so these provide a // convenient single point of change. -int segfeature_active(MACROBLOCKD *xd, +int segfeature_active(const MACROBLOCKD *xd, int segment_id, SEG_LVL_FEATURES feature_id) { // Return true if mask bit set and segmentation enabled. @@ -66,7 +66,7 @@ void set_segdata(MACROBLOCKD *xd, xd->segment_feature_data[segment_id][feature_id] = seg_data; } -int get_segdata(MACROBLOCKD *xd, +int get_segdata(const MACROBLOCKD *xd, int segment_id, SEG_LVL_FEATURES feature_id) { return xd->segment_feature_data[segment_id][feature_id]; @@ -126,7 +126,7 @@ void set_segref(MACROBLOCKD *xd, (1 << ref_frame); } -int check_segref(MACROBLOCKD *xd, +int check_segref(const MACROBLOCKD *xd, int segment_id, MV_REFERENCE_FRAME ref_frame) { return (xd->segment_feature_data[segment_id][SEG_LVL_REF_FRAME] & diff --git a/vp8/common/seg_common.h b/vp8/common/seg_common.h index 74131926f..59f40d112 100644 --- a/vp8/common/seg_common.h +++ b/vp8/common/seg_common.h @@ -15,7 +15,7 @@ #ifndef __INC_SEG_COMMON_H__ #define __INC_SEG_COMMON_H__ 1 -int segfeature_active(MACROBLOCKD *xd, +int segfeature_active(const MACROBLOCKD *xd, int segment_id, SEG_LVL_FEATURES feature_id); @@ -42,7 +42,7 @@ void set_segdata(MACROBLOCKD *xd, SEG_LVL_FEATURES feature_id, int seg_data); -int get_segdata(MACROBLOCKD *xd, +int get_segdata(const MACROBLOCKD *xd, int segment_id, SEG_LVL_FEATURES feature_id); @@ -73,7 +73,7 @@ void set_segref(MACROBLOCKD *xd, int segment_id, MV_REFERENCE_FRAME ref_frame); -int check_segref(MACROBLOCKD *xd, +int check_segref(const MACROBLOCKD *xd, int segment_id, MV_REFERENCE_FRAME ref_frame); |