Commit 5ebe94f9 authored by John Koleszar's avatar John Koleszar
Browse files

Build fixes to merge vp9-preview into master

Various fixups to resolve issues when building vp9-preview under the more stringent
checks placed on the experimental branch.

Change-Id: I21749de83552e1e75c799003f849e6a0f1a35b07
parent 6ee08f3c
......@@ -11,7 +11,7 @@
#ifndef VP9_DECODER_VP9_ONYXD_INT_H_
#define VP9_DECODER_VP9_ONYXD_INT_H_
#include "vpx_ports/config.h"
#include "./vpx_config.h"
#include "vp9/common/vp9_onyxd.h"
#include "vp9/decoder/vp9_treereader.h"
#include "vp9/common/vp9_onyxc_int.h"
......
......@@ -8,7 +8,7 @@
* be found in the AUTHORS file in the root of the source tree.
*/
#include "vpx_ports/config.h"
#include "./vpx_config.h"
#include "vp9/common/vp9_blockd.h"
#include "vp9/decoder/vp9_dequantize.h"
#include "vp9/decoder/x86/vp9_idct_mmx.h"
......
......@@ -8,7 +8,7 @@
* be found in the AUTHORS file in the root of the source tree.
*/
#include "vpx_ports/config.h"
#include "./vpx_config.h"
#include "vp9/common/vp9_blockd.h"
#include "vp9/decoder/vp9_dequantize.h"
......
......@@ -8,7 +8,7 @@
* be found in the AUTHORS file in the root of the source tree.
*/
#include "vpx_ports/config.h"
#include "./vpx_config.h"
#include "vpx_ports/x86.h"
#include "vp9/decoder/vp9_onyxd_int.h"
......
......@@ -834,7 +834,6 @@ static void pack_inter_mode_mvs(VP9_COMP *const cpi, vp9_writer *const bc) {
for (i = 0; i < 4; i++) {
MB_MODE_INFO *mi;
MV_REFERENCE_FRAME rf;
MV_REFERENCE_FRAME sec_ref_frame;
MB_PREDICTION_MODE mode;
int segment_id, skip_coeff;
......@@ -854,7 +853,6 @@ static void pack_inter_mode_mvs(VP9_COMP *const cpi, vp9_writer *const bc) {
mi = &m->mbmi;
rf = mi->ref_frame;
sec_ref_frame = mi->second_ref_frame;
mode = mi->mode;
segment_id = mi->segment_id;
......@@ -1101,7 +1099,7 @@ static void pack_inter_mode_mvs(VP9_COMP *const cpi, vp9_writer *const bc) {
if (mi->second_ref_frame > 0) {
#if CONFIG_NEW_MVREF
unsigned int best_index;
sec_ref_frame = mi->second_ref_frame;
MV_REFERENCE_FRAME sec_ref_frame = mi->second_ref_frame;
/*
best_index =
......
......@@ -11,7 +11,7 @@
#include <assert.h>
#include <math.h>
#include "vpx_ports/config.h"
#include "./vpx_config.h"
#include "vp9/common/vp9_systemdependent.h"
#include "vp9/common/vp9_blockd.h"
......
......@@ -9,7 +9,7 @@
*/
#include "vpx_ports/config.h"
#include "./vpx_config.h"
#include "vp9/encoder/vp9_encodeframe.h"
#include "vp9/encoder/vp9_encodemb.h"
#include "vp9/encoder/vp9_encodemv.h"
......@@ -2031,8 +2031,6 @@ static void encode_macroblock(VP9_COMP *cpi, MACROBLOCK *x,
VP9_COMMON *cm = &cpi->common;
MACROBLOCKD *const xd = &x->e_mbd;
MB_MODE_INFO * mbmi = &xd->mode_info_context->mbmi;
unsigned char *segment_id = &mbmi->segment_id;
int seg_ref_active;
unsigned char ref_pred_flag;
x->skip = 0;
......@@ -2079,8 +2077,6 @@ static void encode_macroblock(VP9_COMP *cpi, MACROBLOCK *x,
vp9_update_zbin_extra(cpi, x);
seg_ref_active = vp9_segfeature_active(xd, *segment_id, SEG_LVL_REF_FRAME);
// SET VARIOUS PREDICTION FLAGS
// Did the chosen reference frame match its predicted value.
......
......@@ -8,7 +8,7 @@
* be found in the AUTHORS file in the root of the source tree.
*/
#include "vpx_ports/config.h"
#include "./vpx_config.h"
#include "vp9_rtcd.h"
#include "vp9/encoder/vp9_quantize.h"
#include "vp9/common/vp9_reconintra.h"
......
......@@ -8,7 +8,7 @@
* be found in the AUTHORS file in the root of the source tree.
*/
#include "vpx_ports/config.h"
#include "./vpx_config.h"
#include "vp9/encoder/vp9_encodemb.h"
#include "vp9/common/vp9_reconinter.h"
#include "vp9/encoder/vp9_quantize.h"
......
......@@ -12,7 +12,7 @@
#ifndef VP9_ENCODER_VP9_ENCODEMB_H_
#define VP9_ENCODER_VP9_ENCODEMB_H_
#include "vpx_ports/config.h"
#include "./vpx_config.h"
#include "vp9/encoder/vp9_block.h"
typedef struct {
......
......@@ -801,6 +801,7 @@ static double bitcost(double prob) {
static long long estimate_modemvcost(VP9_COMP *cpi,
FIRSTPASS_STATS *fpstats) {
#if 0
int mv_cost;
int mode_cost;
......@@ -829,6 +830,7 @@ static long long estimate_modemvcost(VP9_COMP *cpi,
// return mv_cost + mode_cost;
// TODO PGW Fix overhead costs for extended Q range
#endif
return 0;
}
......@@ -1951,12 +1953,9 @@ void vp9_second_pass(VP9_COMP *cpi) {
FIRSTPASS_STATS this_frame;
FIRSTPASS_STATS this_frame_copy;
double this_frame_error;
double this_frame_intra_error;
double this_frame_coded_error;
FIRSTPASS_STATS *start_pos;
int overhead_bits;
if (!cpi->twopass.stats_in) {
......@@ -1970,12 +1969,9 @@ void vp9_second_pass(VP9_COMP *cpi) {
if (EOF == input_stats(cpi, &this_frame))
return;
this_frame_error = this_frame.ssim_weighted_pred_err;
this_frame_intra_error = this_frame.intra_error;
this_frame_coded_error = this_frame.coded_error;
start_pos = cpi->twopass.stats_in;
// keyframe and section processing !
if (cpi->twopass.frames_to_key == 0) {
// Define next KF group and assign bits to it
......
......@@ -27,7 +27,7 @@ static unsigned int do_16x16_motion_iteration(VP9_COMP *cpi,
BLOCKD *d = &xd->block[0];
vp9_variance_fn_ptr_t v_fn_ptr = cpi->fn_ptr[BLOCK_16X16];
unsigned int best_err;
int step_param, further_steps;
int step_param;
int tmp_col_min = x->mv_col_min;
int tmp_col_max = x->mv_col_max;
......@@ -38,10 +38,8 @@ static unsigned int do_16x16_motion_iteration(VP9_COMP *cpi,
// Further step/diamond searches as necessary
if (cpi->Speed < 8) {
step_param = cpi->sf.first_step + ((cpi->Speed > 5) ? 1 : 0);
further_steps = (cpi->sf.max_step_search_steps - 1) - step_param;
} else {
step_param = cpi->sf.first_step + 2;
further_steps = 0;
}
vp9_clamp_mv_min_max(x, ref_mv);
......
......@@ -12,7 +12,7 @@
#include "vp9/encoder/vp9_onyx_int.h"
#include "vp9/encoder/vp9_mcomp.h"
#include "vpx_mem/vpx_mem.h"
#include "vpx_ports/config.h"
#include "./vpx_config.h"
#include <stdio.h>
#include <limits.h>
#include <math.h>
......
......@@ -148,7 +148,6 @@ static int calculate_minq_index(double maxq,
double x3, double x2, double x, double c) {
int i;
double minqtarget;
double thisq;
minqtarget = ((x3 * maxq * maxq * maxq) +
(x2 * maxq * maxq) +
......@@ -159,7 +158,6 @@ static int calculate_minq_index(double maxq,
minqtarget = maxq;
for (i = 0; i < QINDEX_RANGE; i++) {
thisq = vp9_convert_qindex_to_q(i);
if (minqtarget <= vp9_convert_qindex_to_q(i))
return i;
}
......@@ -2933,8 +2931,6 @@ static void encode_frame_to_data_rate
int Loop = FALSE;
int loop_count;
int this_q;
int last_zbin_oq;
int q_low;
int q_high;
......@@ -2948,8 +2944,6 @@ static void encode_frame_to_data_rate
int overshoot_seen = FALSE;
int undershoot_seen = FALSE;
int loop_size_estimate = 0;
SPEED_FEATURES *sf = &cpi->sf;
#if RESET_FOREACH_FILTER
int q_low0;
......@@ -2957,6 +2951,7 @@ static void encode_frame_to_data_rate
int zbin_oq_high0;
int zbin_oq_low0 = 0;
int Q0;
int last_zbin_oq;
int last_zbin_oq0;
int active_best_quality0;
int active_worst_quality0;
......@@ -3176,7 +3171,9 @@ static void encode_frame_to_data_rate
// Determine initial Q to try
Q = vp9_regulate_q(cpi, cpi->this_frame_target);
}
#if RESET_FOREACH_FILTER
last_zbin_oq = cpi->zbin_over_quant;
#endif
// Set highest allowed value for Zbin over quant
if (cm->frame_type == KEY_FRAME)
......@@ -3280,7 +3277,6 @@ static void encode_frame_to_data_rate
vp9_clear_system_state(); // __asm emms;
vp9_set_quantizer(cpi, Q);
this_q = Q;
if (loop_count == 0) {
......@@ -3516,7 +3512,9 @@ static void encode_frame_to_data_rate
// Loop = ((Q != last_q) || (last_zbin_oq != cpi->zbin_over_quant)) ? TRUE : FALSE;
Loop = ((Q != last_q)) ? TRUE : FALSE;
#if RESET_FOREACH_FILTER
last_zbin_oq = cpi->zbin_over_quant;
#endif
} else
Loop = FALSE;
......@@ -3730,9 +3728,6 @@ static void encode_frame_to_data_rate
* needed in motion search besides loopfilter */
cm->last_frame_type = cm->frame_type;
// Keep a copy of the size estimate used in the loop
loop_size_estimate = cpi->projected_frame_size;
// Update rate control heuristics
cpi->total_byte_count += (*size);
cpi->projected_frame_size = (*size) << 3;
......@@ -3846,7 +3841,7 @@ static void encode_frame_to_data_rate
"%6d %5d %5d %5d %8d %8.2f %10d %10.3f"
"%10.3f %8d %10d %10d %10d\n",
cpi->common.current_video_frame, cpi->this_frame_target,
cpi->projected_frame_size, loop_size_estimate,
cpi->projected_frame_size, 0, //loop_size_estimate,
(cpi->projected_frame_size - cpi->this_frame_target),
(int)cpi->total_target_vs_actual,
(cpi->oxcf.starting_buffer_level - cpi->bits_off_target),
......@@ -3876,7 +3871,7 @@ static void encode_frame_to_data_rate
"%8d %10d %10d %10d\n",
cpi->common.current_video_frame,
cpi->this_frame_target, cpi->projected_frame_size,
loop_size_estimate,
0, //loop_size_estimate,
(cpi->projected_frame_size - cpi->this_frame_target),
(int)cpi->total_target_vs_actual,
(cpi->oxcf.starting_buffer_level - cpi->bits_off_target),
......
......@@ -13,7 +13,7 @@
#define VP9_ENCODER_VP9_ONYX_INT_H_
#include <stdio.h>
#include "vpx_ports/config.h"
#include "./vpx_config.h"
#include "vp9/common/vp9_onyx.h"
#include "vp9/encoder/vp9_treewriter.h"
#include "vp9/encoder/vp9_tokenize.h"
......
......@@ -24,11 +24,9 @@ void vp9_yv12_copy_partial_frame_c(YV12_BUFFER_CONFIG *src_ybc,
unsigned char *src_y, *dst_y;
int yheight;
int ystride;
int border;
int yoffset;
int linestocopy;
border = src_ybc->border;
yheight = src_ybc->y_height;
ystride = src_ybc->y_stride;
......
......@@ -1268,7 +1268,7 @@ static int64_t rd_pick_intra16x16mby_mode(VP9_COMP *cpi,
int *skippable,
int64_t txfm_cache[NB_TXFM_MODES]) {
MB_PREDICTION_MODE mode;
TX_SIZE txfm_size;
TX_SIZE txfm_size = 0;
MB_PREDICTION_MODE UNINITIALIZED_IS_SAFE(mode_selected);
#if CONFIG_COMP_INTRA_PRED
MB_PREDICTION_MODE mode2;
......@@ -4189,7 +4189,7 @@ void vp9_rd_pick_intra_mode(VP9_COMP *cpi, MACROBLOCK *x,
int mode16x16;
int mode8x8[2][4];
int dist;
int modeuv, modeuv8x8, uv_intra_skippable, uv_intra_skippable_8x8;
int modeuv, uv_intra_skippable, uv_intra_skippable_8x8;
int y_intra16x16_skippable = 0;
int64_t txfm_cache[NB_TXFM_MODES];
TX_SIZE txfm_size_16x16;
......@@ -4202,13 +4202,11 @@ void vp9_rd_pick_intra_mode(VP9_COMP *cpi, MACROBLOCK *x,
if (cpi->common.txfm_mode != ONLY_4X4) {
rd_pick_intra_mbuv_mode_8x8(cpi, x, &rateuv8x8, &rateuv8x8_tokenonly,
&distuv8x8, &uv_intra_skippable_8x8);
modeuv8x8 = mbmi->uv_mode;
} else {
uv_intra_skippable_8x8 = uv_intra_skippable;
rateuv8x8 = rateuv;
distuv8x8 = distuv;
rateuv8x8_tokenonly = rateuv_tokenonly;
modeuv8x8 = modeuv;
}
// current macroblock under rate-distortion optimization test loop
......
......@@ -11,7 +11,7 @@
#include <stdlib.h>
#include "vp9/common/vp9_sadmxn.h"
#include "vpx_ports/config.h"
#include "./vpx_config.h"
#include "vpx/vpx_integer.h"
unsigned int vp9_sad32x32_c(const unsigned char *src_ptr,
......
......@@ -139,7 +139,6 @@ static int temporal_filter_find_matching_mb_c
) {
MACROBLOCK *x = &cpi->mb;
int step_param;
int further_steps;
int sadpb = x->sadperbit16;
int bestsme = INT_MAX;
......@@ -173,11 +172,8 @@ static int temporal_filter_find_matching_mb_c
if (cpi->Speed < 8) {
step_param = cpi->sf.first_step +
((cpi->Speed > 5) ? 1 : 0);
further_steps =
(cpi->sf.max_step_search_steps - 1) - step_param;
} else {
step_param = cpi->sf.first_step + 2;
further_steps = 0;
}
/*cpi->sf.search_method == HEX*/
......
......@@ -9,7 +9,7 @@
*/
#include "vpx_ports/config.h"
#include "./vpx_config.h"
#include "vpx_ports/x86.h"
#include "vp9/encoder/vp9_variance.h"
#include "vp9/encoder/vp9_onyx_int.h"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment