diff options
author | Yaowu Xu <yaowu@google.com> | 2011-07-20 14:21:24 -0700 |
---|---|---|
committer | Yaowu Xu <yaowu@google.com> | 2011-07-21 09:01:53 -0700 |
commit | 8c31484ea1fbac128e31a951a004f6f91bc1ef2f (patch) | |
tree | b99e86871914df1d57717d07b694eb7837d29ae3 /vp8/common | |
parent | 1c24eb2b7b3a61893ea19e9e544c24a233f89921 (diff) | |
download | libvpx-8c31484ea1fbac128e31a951a004f6f91bc1ef2f.tar libvpx-8c31484ea1fbac128e31a951a004f6f91bc1ef2f.tar.gz libvpx-8c31484ea1fbac128e31a951a004f6f91bc1ef2f.tar.bz2 libvpx-8c31484ea1fbac128e31a951a004f6f91bc1ef2f.zip |
fix more merge issues
With this fix, the experimental branch now builds and encodes correctly
with the following two configure options respectively:
--enable-experimental --enable-t8x8
--enable-experimental
Change-Id: I3147c33c503fe713a85fd371e4f1a974805778bf
Diffstat (limited to 'vp8/common')
-rw-r--r-- | vp8/common/blockd.h | 16 | ||||
-rw-r--r-- | vp8/common/coefupdateprobs.h | 8 | ||||
-rw-r--r-- | vp8/common/defaultcoefcounts.c | 2 | ||||
-rw-r--r-- | vp8/common/entropy.c | 17 | ||||
-rw-r--r-- | vp8/common/entropy.h | 7 | ||||
-rw-r--r-- | vp8/common/idct.h | 1 | ||||
-rw-r--r-- | vp8/common/idctllm.c | 5 | ||||
-rw-r--r-- | vp8/common/onyx.h | 1 | ||||
-rw-r--r-- | vp8/common/recon.c | 5 | ||||
-rw-r--r-- | vp8/common/reconinter.c | 4 |
10 files changed, 46 insertions, 20 deletions
diff --git a/vp8/common/blockd.h b/vp8/common/blockd.h index 6482b2a89..d2ef84256 100644 --- a/vp8/common/blockd.h +++ b/vp8/common/blockd.h @@ -94,14 +94,14 @@ typedef enum MB_MODE_COUNT } MB_PREDICTION_MODE; -// Macroblock level features +/* Macroblock level features */ typedef enum { - MB_LVL_ALT_Q = 0, // Use alternate Quantizer .... - MB_LVL_ALT_LF = 1, // Use alternate loop filter value... - MB_LVL_MAX = 2, // Number of MB level features supported -} MB_LVL_FEATURES; + MB_LVL_ALT_Q = 0, /* Use alternate Quantizer .... */ + MB_LVL_ALT_LF = 1, /* Use alternate loop filter value... */ + MB_LVL_MAX = 2 /* Number of MB level features supported */ +} MB_LVL_FEATURES; /* Segment Feature Masks */ #define SEGMENT_ALTQ 0x01 @@ -163,8 +163,9 @@ typedef struct MB_PREDICTION_MODE mode, uv_mode; MV_REFERENCE_FRAME ref_frame; int_mv mv; +#if CONFIG_SEGMENTATION unsigned char segment_flag; - +#endif unsigned char partitioning; unsigned char mb_skip_coeff; /* does this mb has coefficients at all, 1=no coefficients, 0=need decode tokens */ unsigned char need_to_clamp_mvs; @@ -237,11 +238,11 @@ typedef struct /* 0 (do not update) 1 (update) the macroblock segmentation feature data. */ unsigned char mb_segement_abs_delta; - unsigned char temporal_update; /* Per frame flags that define which MB level features (such as quantizer or loop filter level) */ /* are enabled and when enabled the proabilities used to decode the per MB flags in MB_MODE_INFO */ #if CONFIG_SEGMENTATION vp8_prob mb_segment_tree_probs[MB_FEATURE_TREE_PROBS + 3]; // Probability Tree used to code Segment number + unsigned char temporal_update; #else vp8_prob mb_segment_tree_probs[MB_FEATURE_TREE_PROBS]; #endif @@ -275,7 +276,6 @@ typedef struct void *current_bc; - int corrupted; #if CONFIG_RUNTIME_CPU_DETECT diff --git a/vp8/common/coefupdateprobs.h b/vp8/common/coefupdateprobs.h index 029941440..6fe5fcc6f 100644 --- a/vp8/common/coefupdateprobs.h +++ b/vp8/common/coefupdateprobs.h @@ -183,8 +183,11 @@ const vp8_prob vp8_coef_update_probs [BLOCK_TYPES] [COEF_BANDS] [PREV_COEF_CONTE }, }, }; - -const vp8_prob vp8_coef_update_probs_8x8 [BLOCK_TYPES] [COEF_BANDS] [PREV_COEF_CONTEXTS] [ENTROPY_NODES] = +#if CONFIG_T8X8 +const vp8_prob vp8_coef_update_probs_8x8 [BLOCK_TYPES] + [COEF_BANDS] + [PREV_COEF_CONTEXTS] + [ENTROPY_NODES] = { { { @@ -356,3 +359,4 @@ const vp8_prob vp8_coef_update_probs_8x8 [BLOCK_TYPES] [COEF_BANDS] [PREV_COEF_C }, }; +#endif
\ No newline at end of file diff --git a/vp8/common/defaultcoefcounts.c b/vp8/common/defaultcoefcounts.c index a0258bd03..34d1fb1d5 100644 --- a/vp8/common/defaultcoefcounts.c +++ b/vp8/common/defaultcoefcounts.c @@ -225,6 +225,7 @@ const unsigned int vp8_default_coef_counts[BLOCK_TYPES] }; +#if CONFIG_T8X8 const unsigned int vp8_default_coef_counts_8x8[BLOCK_TYPES] [COEF_BANDS] [PREV_COEF_CONTEXTS] @@ -400,3 +401,4 @@ const unsigned int vp8_default_coef_counts_8x8[BLOCK_TYPES] } } }; +#endif
\ No newline at end of file diff --git a/vp8/common/entropy.c b/vp8/common/entropy.c index 58328ceb5..ca37aab22 100644 --- a/vp8/common/entropy.c +++ b/vp8/common/entropy.c @@ -120,14 +120,21 @@ static const Prob Pcat2[] = { 165, 145}; static const Prob Pcat3[] = { 173, 148, 140}; static const Prob Pcat4[] = { 176, 155, 140, 135}; static const Prob Pcat5[] = { 180, 157, 141, 134, 130}; +#if CONFIG_EXTEND_QRANGE static const Prob Pcat6[] = { 254, 254, 252, 249, 243, 230, 196, 177, 153, 140, 133, 130, 129}; +#else +static const Prob Pcat6[] = +{ 254, 254, 243, 230, 196, 177, 153, 140, 133, 130, 129}; + +#endif static vp8_tree_index cat1[2], cat2[4], cat3[6], cat4[8], cat5[10], cat6[22]; void vp8_init_scan_order_mask() { int i; + for (i = 0; i < 16; i++) { vp8_default_zig_zag_mask[vp8_default_zig_zag1d[i]] = 1 << i; @@ -160,7 +167,11 @@ static void init_bit_trees() init_bit_tree(cat3, 3); init_bit_tree(cat4, 4); init_bit_tree(cat5, 5); +#if CONFIG_EXTEND_QRANGE init_bit_tree(cat6, 13); +#else + init_bit_tree(cat6, 11); +#endif } vp8_extra_bit_struct vp8_extra_bits[12] = @@ -175,7 +186,11 @@ vp8_extra_bit_struct vp8_extra_bits[12] = { cat3, Pcat3, 3, 11}, { cat4, Pcat4, 4, 19}, { cat5, Pcat5, 5, 35}, +#if CONFIG_EXTEND_QRANGE { cat6, Pcat6, 13, 67}, +#else + { cat6, Pcat6, 11, 67}, +#endif { 0, 0, 0, 0} }; #include "defaultcoefcounts.h" @@ -183,6 +198,7 @@ vp8_extra_bit_struct vp8_extra_bits[12] = void vp8_default_coef_probs(VP8_COMMON *pc) { int h = 0; + do { int i = 0; @@ -234,6 +250,7 @@ void vp8_default_coef_probs(VP8_COMMON *pc) #endif } + void vp8_coef_tree_initialize() { init_bit_trees(); diff --git a/vp8/common/entropy.h b/vp8/common/entropy.h index 786452712..d3e841c3e 100644 --- a/vp8/common/entropy.h +++ b/vp8/common/entropy.h @@ -50,8 +50,11 @@ extern vp8_extra_bit_struct vp8_extra_bits[12]; /* indexed by token value */ #define PROB_UPDATE_BASELINE_COST 7 #define MAX_PROB 255 +#if CONFIG_EXTEND_QRANGE #define DCT_MAX_VALUE 8192 - +#else +#define DCT_MAX_VALUE 2048 +#endif /* Coefficients are predicted via a 3-dimensional probability table. */ @@ -104,6 +107,6 @@ extern DECLARE_ALIGNED(64, const int, vp8_default_zig_zag1d_8x8[64]); extern short vp8_default_zig_zag_mask_8x8[64];//int64_t #endif extern const int vp8_mb_feature_data_bits[MB_LVL_MAX]; -void vp8_coef_tree_initialize(void); +void vp8_coef_tree_initialize(void); #endif diff --git a/vp8/common/idct.h b/vp8/common/idct.h index aa1fb5e42..d1890b9e5 100644 --- a/vp8/common/idct.h +++ b/vp8/common/idct.h @@ -74,6 +74,7 @@ extern prototype_idct(vp8_idct_idct16); #endif extern prototype_idct_scalar_add(vp8_idct_idct1_scalar_add); + #ifndef vp8_idct_iwalsh1 #define vp8_idct_iwalsh1 vp8_short_inv_walsh4x4_1_c #endif diff --git a/vp8/common/idctllm.c b/vp8/common/idctllm.c index 9d3e30413..4f3a01b1b 100644 --- a/vp8/common/idctllm.c +++ b/vp8/common/idctllm.c @@ -203,7 +203,6 @@ void vp8_short_inv_walsh4x4_c(short *input, short *output) ip += 4; op += 4; } - //printf("here2\n"); } void vp8_short_inv_walsh4x4_1_c(short *input, short *output) @@ -213,9 +212,9 @@ void vp8_short_inv_walsh4x4_1_c(short *input, short *output) short *op = output; #if !CONFIG_EXTEND_QRANGE - a1 = ((input[0] + 3) >> 3); + a1 = (input[0] + 3 )>> 3; #else - a1 = ((input[0] + 1) >> 2); + a1 = (input[0] + 1 )>> 2; #endif for (i = 0; i < 4; i++) diff --git a/vp8/common/onyx.h b/vp8/common/onyx.h index b9ef26576..545798ac7 100644 --- a/vp8/common/onyx.h +++ b/vp8/common/onyx.h @@ -126,7 +126,6 @@ extern "C" //(5)=Two Pass - Second Pass Best. The encoder uses the statistics that were generated in the first // encoding pass to create the compressed output using the highest possible quality, and taking a // longer amount of time to encode.. ( speed setting ignored ) - int Mode; // // Key Framing Operations diff --git a/vp8/common/recon.c b/vp8/common/recon.c index c82639645..d72d6e410 100644 --- a/vp8/common/recon.c +++ b/vp8/common/recon.c @@ -12,7 +12,7 @@ #include "vpx_ports/config.h" #include "recon.h" #include "blockd.h" -#include <stdio.h> + void vp8_recon_b_c ( unsigned char *pred_ptr, @@ -133,7 +133,6 @@ void vp8_recon_mby_c(const vp8_recon_rtcd_vtable_t *rtcd, MACROBLOCKD *x) RECON_INVOKE(rtcd, recon4)(b->predictor, b->diff, *(b->base_dst) + b->dst, b->dst_stride); } #endif - } void vp8_recon_mb_c(const vp8_recon_rtcd_vtable_t *rtcd, MACROBLOCKD *x) @@ -172,7 +171,6 @@ void vp8_recon_mb_c(const vp8_recon_rtcd_vtable_t *rtcd, MACROBLOCKD *x) RECON_INVOKE(rtcd, recon4)(b->predictor, b->diff, *(b->base_dst) + b->dst, b->dst_stride); } - for (i = 16; i < 24; i += 2) { BLOCKD *b = &x->block[i]; @@ -180,5 +178,4 @@ void vp8_recon_mb_c(const vp8_recon_rtcd_vtable_t *rtcd, MACROBLOCKD *x) RECON_INVOKE(rtcd, recon2)(b->predictor, b->diff, *(b->base_dst) + b->dst, b->dst_stride); } #endif - } diff --git a/vp8/common/reconinter.c b/vp8/common/reconinter.c index fb1e90939..3b0405ca1 100644 --- a/vp8/common/reconinter.c +++ b/vp8/common/reconinter.c @@ -464,3 +464,7 @@ void vp8_build_uvmvs(MACROBLOCKD *x, int fullpixel) } } } + + + + |