diff options
author | Vignesh Venkatasubramanian <vigneshv@google.com> | 2014-03-26 15:13:32 -0700 |
---|---|---|
committer | Vignesh Venkatasubramanian <vigneshv@google.com> | 2014-03-26 15:13:32 -0700 |
commit | 2ec72e65689c948e92b826ae1e867bf369e72f13 (patch) | |
tree | 09d08252ba727c6c2e090222ea15ccc3b143301a /libvpx/vp9/encoder/vp9_block.h | |
parent | 9b35249446b07f40ac5fcc3205f2c048616efacc (diff) | |
download | android_external_libvpx-2ec72e65689c948e92b826ae1e867bf369e72f13.tar.gz android_external_libvpx-2ec72e65689c948e92b826ae1e867bf369e72f13.tar.bz2 android_external_libvpx-2ec72e65689c948e92b826ae1e867bf369e72f13.zip |
libvpx: Roll latest libvpx
Pulling changes related to fixing a rare bitstream issue on video upscaling.
Also enables VP9 encoder. This is exactly the same as the roll that is
already in master.
Upstream Hash: 8e9c9f118cda45013f14cce7961dcc8df78ffebf
Change-Id: Iba9bb1c1804462014deab20fa6f4c5e4c55a778e
Diffstat (limited to 'libvpx/vp9/encoder/vp9_block.h')
-rw-r--r-- | libvpx/vp9/encoder/vp9_block.h | 53 |
1 files changed, 18 insertions, 35 deletions
diff --git a/libvpx/vp9/encoder/vp9_block.h b/libvpx/vp9/encoder/vp9_block.h index 4445970..888984c 100644 --- a/libvpx/vp9/encoder/vp9_block.h +++ b/libvpx/vp9/encoder/vp9_block.h @@ -11,12 +11,15 @@ #ifndef VP9_ENCODER_VP9_BLOCK_H_ #define VP9_ENCODER_VP9_BLOCK_H_ -#include "vp9/common/vp9_onyx.h" #include "vp9/common/vp9_entropymv.h" #include "vp9/common/vp9_entropy.h" #include "vpx_ports/mem.h" #include "vp9/common/vp9_onyxc_int.h" +#ifdef __cplusplus +extern "C" { +#endif + // motion search site typedef struct { MV mv; @@ -41,12 +44,10 @@ typedef struct { int is_coded; int num_4x4_blk; int skip; - int_mv best_ref_mv; - int_mv second_best_ref_mv; + int_mv best_ref_mv[2]; int_mv ref_mvs[MAX_REF_FRAMES][MAX_MV_REF_CANDIDATES]; int rate; int distortion; - int64_t intra_error; int best_mode_index; int rddiv; int rdmult; @@ -59,17 +60,14 @@ typedef struct { // motion vector cache for adaptive motion search control in partition // search loop int_mv pred_mv[MAX_REF_FRAMES]; - - // Bit flag for each mode whether it has high error in comparison to others. - unsigned int modes_with_high_error; - - // Bit flag for each ref frame whether it has high error compared to others. - unsigned int frames_with_high_error; + INTERP_FILTER pred_interp_filter; } PICK_MODE_CONTEXT; struct macroblock_plane { DECLARE_ALIGNED(16, int16_t, src_diff[64 * 64]); + int16_t *qcoeff; int16_t *coeff; + uint16_t *eobs; struct buf_2d src; // Quantizer setings @@ -84,8 +82,8 @@ struct macroblock_plane { /* The [2] dimension is for whether we skip the EOB node (i.e. if previous * coefficient in this block was zero) or not. */ -typedef unsigned int vp9_coeff_cost[BLOCK_TYPES][REF_TYPES][COEF_BANDS][2] - [PREV_COEF_CONTEXTS][MAX_ENTROPY_TOKENS]; +typedef unsigned int vp9_coeff_cost[PLANE_TYPES][REF_TYPES][COEF_BANDS][2] + [COEFF_CONTEXTS][ENTROPY_TOKENS]; typedef struct macroblock MACROBLOCK; struct macroblock { @@ -115,6 +113,8 @@ struct macroblock { int mv_best_ref_index[MAX_REF_FRAMES]; unsigned int max_mv_context[MAX_REF_FRAMES]; unsigned int source_variance; + unsigned int pred_sse[MAX_REF_FRAMES]; + int pred_mv_sad[MAX_REF_FRAMES]; int nmvjointcost[MV_JOINTS]; int nmvcosts[2][MV_VALS]; @@ -130,9 +130,9 @@ struct macroblock { int *nmvsadcost_hp[2]; int **mvsadcost; - int mbmode_cost[MB_MODE_COUNT]; + int mbmode_cost[INTRA_MODES]; unsigned inter_mode_cost[INTER_MODE_CONTEXTS][INTER_MODES]; - int intra_uv_mode_cost[2][MB_MODE_COUNT]; + int intra_uv_mode_cost[FRAME_TYPES][INTRA_MODES]; int y_mode_costs[INTRA_MODES][INTRA_MODES][INTRA_MODES]; int switchable_interp_costs[SWITCHABLE_FILTER_CONTEXTS][SWITCHABLE_FILTERS]; @@ -153,7 +153,7 @@ struct macroblock { int encode_breakout; - unsigned char *active_ptr; + int in_active_map; // note that token_costs is the cost when eob node is skipped vp9_coeff_cost token_costs[TX_SIZES]; @@ -166,9 +166,7 @@ struct macroblock { int skip_encode; // Used to store sub partition's choices. - int fast_ms; int_mv pred_mv[MAX_REF_FRAMES]; - int subblock_ref; // TODO(jingning): Need to refactor the structure arrays that buffers the // coding mode decisions of each partition type. @@ -233,23 +231,8 @@ static PICK_MODE_CONTEXT *get_block_context(MACROBLOCK *x, BLOCK_SIZE bsize) { } } -struct rdcost_block_args { - MACROBLOCK *x; - ENTROPY_CONTEXT t_above[16]; - ENTROPY_CONTEXT t_left[16]; - TX_SIZE tx_size; - int bw; - int bh; - int rate; - int64_t dist; - int64_t sse; - int this_rate; - int64_t this_dist; - int64_t this_sse; - int64_t this_rd; - int64_t best_rd; - int skip; - const int16_t *scan, *nb; -}; +#ifdef __cplusplus +} // extern "C" +#endif #endif // VP9_ENCODER_VP9_BLOCK_H_ |