Commit 5c245a46 authored by Johann Koenig's avatar Johann Koenig Committed by Gerrit Code Review

Merge changes I53b5bdc5,Ib81168a7,Ie0113945

* changes:
  Only build ssse3 filter functions on 64 bit
  Clean up unused function warnings in vp8 encoder
  Clean up unused function warnings in vp8 onyx_if.c
parents 0ae1c832 f5507b51
......@@ -516,41 +516,6 @@ static void set_segment_data(VP8_COMP *cpi, signed char *feature_data, unsigned
}
static void segmentation_test_function(VP8_COMP *cpi)
{
unsigned char *seg_map;
signed char feature_data[MB_LVL_MAX][MAX_MB_SEGMENTS];
// Create a temporary map for segmentation data.
CHECK_MEM_ERROR(seg_map, vpx_calloc(cpi->common.mb_rows * cpi->common.mb_cols, 1));
// Set the segmentation Map
set_segmentation_map(cpi, seg_map);
// Activate segmentation.
enable_segmentation(cpi);
// Set up the quant segment data
feature_data[MB_LVL_ALT_Q][0] = 0;
feature_data[MB_LVL_ALT_Q][1] = 4;
feature_data[MB_LVL_ALT_Q][2] = 0;
feature_data[MB_LVL_ALT_Q][3] = 0;
// Set up the loop segment data
feature_data[MB_LVL_ALT_LF][0] = 0;
feature_data[MB_LVL_ALT_LF][1] = 0;
feature_data[MB_LVL_ALT_LF][2] = 0;
feature_data[MB_LVL_ALT_LF][3] = 0;
// Initialise the feature data structure
// SEGMENT_DELTADATA 0, SEGMENT_ABSDATA 1
set_segment_data(cpi, &feature_data[0][0], SEGMENT_DELTADATA);
// Delete sementation map
vpx_free(seg_map);
seg_map = 0;
}
/* A simple function to cyclically refresh the background at a lower Q */
static void cyclic_background_refresh(VP8_COMP *cpi, int Q, int lf_adjustment)
{
......@@ -913,7 +878,7 @@ void vp8_set_speed_features(VP8_COMP *cpi)
Speed = cpi->Speed;
switch (Mode)
{
#if !(CONFIG_REALTIME_ONLY)
#if !CONFIG_REALTIME_ONLY
case 0: /* best quality mode */
sf->first_step = 0;
sf->max_step_search_steps = MAX_MVSEARCH_STEPS;
......@@ -2065,7 +2030,7 @@ struct VP8_COMP* vp8_create_compressor(VP8_CONFIG *oxcf)
cpi->output_pkt_list = oxcf->output_pkt_list;
#if !(CONFIG_REALTIME_ONLY)
#if !CONFIG_REALTIME_ONLY
if (cpi->pass == 1)
{
......@@ -2227,7 +2192,7 @@ void vp8_remove_compressor(VP8_COMP **ptr)
if (cpi && (cpi->common.current_video_frame > 0))
{
#if !(CONFIG_REALTIME_ONLY)
#if !CONFIG_REALTIME_ONLY
if (cpi->pass == 2)
{
......@@ -3018,6 +2983,7 @@ static void update_rd_ref_frame_probs(VP8_COMP *cpi)
}
#if !CONFIG_REALTIME_ONLY
/* 1 = key, 0 = inter */
static int decide_key_frame(VP8_COMP *cpi)
{
......@@ -3085,7 +3051,6 @@ static int decide_key_frame(VP8_COMP *cpi)
}
#if !(CONFIG_REALTIME_ONLY)
static void Pass1Encode(VP8_COMP *cpi, unsigned long *size, unsigned char *dest, unsigned int *frame_flags)
{
(void) size;
......@@ -3131,6 +3096,7 @@ void write_cx_frame_to_file(YV12_BUFFER_CONFIG *frame, int this_frame)
#endif
/* return of 0 means drop frame */
#if !CONFIG_REALTIME_ONLY
/* Function to test for conditions that indeicate we should loop
* back and recode a frame.
*/
......@@ -3180,6 +3146,7 @@ static int recode_loop_test( VP8_COMP *cpi,
return force_recode;
}
#endif // !CONFIG_REALTIME_ONLY
static void update_reference_frames(VP8_COMP *cpi)
{
......@@ -3601,7 +3568,7 @@ static void encode_frame_to_data_rate
VP8_COMMON *cm = &cpi->common;
int active_worst_qchanged = 0;
#if !(CONFIG_REALTIME_ONLY)
#if !CONFIG_REALTIME_ONLY
int q_low;
int q_high;
int zbin_oq_high;
......@@ -3640,7 +3607,7 @@ static void encode_frame_to_data_rate
/* For an alt ref frame in 2 pass we skip the call to the second pass
* function that sets the target bandwidth
*/
#if !(CONFIG_REALTIME_ONLY)
#if !CONFIG_REALTIME_ONLY
if (cpi->pass == 2)
{
......@@ -4149,7 +4116,7 @@ static void encode_frame_to_data_rate
/* Determine initial Q to try */
Q = vp8_regulate_q(cpi, cpi->this_frame_target);
#if !(CONFIG_REALTIME_ONLY)
#if !CONFIG_REALTIME_ONLY
/* Set highest allowed value for Zbin over quant */
if (cm->frame_type == KEY_FRAME)
......@@ -4179,7 +4146,7 @@ static void encode_frame_to_data_rate
vp8_compute_frame_size_bounds(cpi, &frame_under_shoot_limit, &frame_over_shoot_limit);
#if !(CONFIG_REALTIME_ONLY)
#if !CONFIG_REALTIME_ONLY
/* Limit Q range for the adaptive loop. */
bottom_index = cpi->active_best_quality;
top_index = cpi->active_worst_quality;
......@@ -4410,7 +4377,7 @@ static void encode_frame_to_data_rate
if (cpi->pass != 2 && cpi->oxcf.auto_key && cm->frame_type != KEY_FRAME
&& cpi->compressor_speed != 2)
{
#if !(CONFIG_REALTIME_ONLY)
#if !CONFIG_REALTIME_ONLY
if (decide_key_frame(cpi))
{
/* Reset all our sizing numbers and recode */
......@@ -4466,9 +4433,9 @@ static void encode_frame_to_data_rate
/* Assume 1 qstep = about 4% on frame size. */
over_size_percent = (int)(over_size_percent * 0.96);
}
#if !(CONFIG_REALTIME_ONLY)
#if !CONFIG_REALTIME_ONLY
top_index = cpi->active_worst_quality;
#endif
#endif // !CONFIG_REALTIME_ONLY
/* If we have updated the active max Q do not call
* vp8_update_rate_correction_factors() this loop.
*/
......@@ -4477,7 +4444,7 @@ static void encode_frame_to_data_rate
else
active_worst_qchanged = 0;
#if !(CONFIG_REALTIME_ONLY)
#if !CONFIG_REALTIME_ONLY
/* Special case handling for forced key frames */
if ( (cm->frame_type == KEY_FRAME) && cpi->this_key_frame_forced )
{
......@@ -5215,7 +5182,7 @@ static void encode_frame_to_data_rate
}
#if !(CONFIG_REALTIME_ONLY)
#if !CONFIG_REALTIME_ONLY
static void Pass2Encode(VP8_COMP *cpi, unsigned long *size, unsigned char *dest, unsigned char * dest_end, unsigned int *frame_flags)
{
......@@ -5299,7 +5266,7 @@ int vp8_get_compressed_data(VP8_COMP *cpi, unsigned int *frame_flags, unsigned l
cpi->source = NULL;
#if !(CONFIG_REALTIME_ONLY)
#if !CONFIG_REALTIME_ONLY
/* Should we code an alternate reference frame */
if (cpi->oxcf.error_resilient_mode == 0 &&
cpi->oxcf.play_alternate &&
......@@ -5367,7 +5334,7 @@ int vp8_get_compressed_data(VP8_COMP *cpi, unsigned int *frame_flags, unsigned l
else
{
*size = 0;
#if !(CONFIG_REALTIME_ONLY)
#if !CONFIG_REALTIME_ONLY
if (flush && cpi->pass == 1 && !cpi->twopass.first_pass_done)
{
......@@ -5560,7 +5527,7 @@ int vp8_get_compressed_data(VP8_COMP *cpi, unsigned int *frame_flags, unsigned l
assert(i < NUM_YV12_BUFFERS );
}
#if !(CONFIG_REALTIME_ONLY)
#if !CONFIG_REALTIME_ONLY
if (cpi->pass == 1)
{
......
......@@ -12,13 +12,15 @@
#ifndef VP8_ENCODER_RDOPT_H_
#define VP8_ENCODER_RDOPT_H_
#include "./vpx_config.h"
#ifdef __cplusplus
extern "C" {
#endif
#define RDCOST(RM,DM,R,D) ( ((128+(R)*(RM)) >> 8) + (DM)*(D) )
static void insertsortmv(int arr[], int len)
static INLINE void insertsortmv(int arr[], int len)
{
int i, j, k;
......@@ -41,7 +43,7 @@ static void insertsortmv(int arr[], int len)
}
}
static void insertsortsad(int arr[],int idx[], int len)
static INLINE void insertsortsad(int arr[],int idx[], int len)
{
int i, j, k;
......@@ -77,10 +79,10 @@ extern void vp8_rd_pick_inter_mode(VP8_COMP *cpi, MACROBLOCK *x,
extern void vp8_rd_pick_intra_mode(MACROBLOCK *x, int *rate);
static void get_plane_pointers(const YV12_BUFFER_CONFIG *fb,
unsigned char *plane[3],
unsigned int recon_yoffset,
unsigned int recon_uvoffset)
static INLINE void get_plane_pointers(const YV12_BUFFER_CONFIG *fb,
unsigned char *plane[3],
unsigned int recon_yoffset,
unsigned int recon_uvoffset)
{
plane[0] = fb->y_buffer + recon_yoffset;
plane[1] = fb->u_buffer + recon_uvoffset;
......@@ -88,10 +90,10 @@ static void get_plane_pointers(const YV12_BUFFER_CONFIG *fb,
}
static void get_predictor_pointers(const VP8_COMP *cpi,
unsigned char *plane[4][3],
unsigned int recon_yoffset,
unsigned int recon_uvoffset)
static INLINE void get_predictor_pointers(const VP8_COMP *cpi,
unsigned char *plane[4][3],
unsigned int recon_yoffset,
unsigned int recon_uvoffset)
{
if (cpi->ref_frame_flags & VP8_LAST_FRAME)
get_plane_pointers(&cpi->common.yv12_fb[cpi->common.lst_fb_idx],
......@@ -107,8 +109,8 @@ static void get_predictor_pointers(const VP8_COMP *cpi,
}
static void get_reference_search_order(const VP8_COMP *cpi,
int ref_frame_map[4])
static INLINE void get_reference_search_order(const VP8_COMP *cpi,
int ref_frame_map[4])
{
int i=0;
......
......@@ -15,6 +15,7 @@
/* Trees map alphabets into huffman-like codes suitable for an arithmetic
bit coder. Timothy S Murphy 11 October 2004 */
#include "./vpx_config.h"
#include "vp8/common/treecoder.h"
#include "boolhuff.h" /* for now */
......@@ -46,7 +47,7 @@ typedef BOOL_CODER vp8_writer;
/* Both of these return bits, not scaled bits. */
static unsigned int vp8_cost_branch(const unsigned int ct[2], vp8_prob p)
static INLINE unsigned int vp8_cost_branch(const unsigned int ct[2], vp8_prob p)
{
/* Imitate existing calculation */
......@@ -76,7 +77,7 @@ static void vp8_treed_write
}
while (n);
}
static void vp8_write_token
static INLINE void vp8_write_token
(
vp8_writer *const w,
vp8_tree t,
......@@ -107,7 +108,7 @@ static int vp8_treed_cost(
return c;
}
static int vp8_cost_token
static INLINE int vp8_cost_token
(
vp8_tree t,
const vp8_prob *const p,
......
......@@ -203,6 +203,7 @@ void vpx_filter_block1d8_h8_intrin_ssse3(const uint8_t *src_ptr,
}
}
#if ARCH_X86_64
static void vpx_filter_block1d16_h8_intrin_ssse3(const uint8_t *src_ptr,
ptrdiff_t src_pixels_per_line,
uint8_t *output_ptr,
......@@ -319,6 +320,7 @@ static void vpx_filter_block1d16_h8_intrin_ssse3(const uint8_t *src_ptr,
output_ptr+=output_pitch;
}
}
#endif // ARCH_X86_64
void vpx_filter_block1d8_v8_intrin_ssse3(const uint8_t *src_ptr,
ptrdiff_t src_pitch,
......@@ -408,6 +410,7 @@ void vpx_filter_block1d8_v8_intrin_ssse3(const uint8_t *src_ptr,
}
}
#if ARCH_X86_64
static void vpx_filter_block1d16_v8_intrin_ssse3(const uint8_t *src_ptr,
ptrdiff_t src_pitch,
uint8_t *output_ptr,
......@@ -522,6 +525,7 @@ static void vpx_filter_block1d16_v8_intrin_ssse3(const uint8_t *src_ptr,
output_ptr+=out_pitch;
}
}
#endif // ARCH_X86_64
#if ARCH_X86_64
filter8_1dfunction vpx_filter_block1d16_v8_intrin_ssse3;
......
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