Merge remote branch 'internal/upstream-experimental' into HEAD

This commit is contained in:
John Koleszar 2011-01-13 11:35:00 -05:00
commit 05be098748
11 changed files with 42 additions and 24 deletions

View File

@ -680,7 +680,6 @@ static void constrain_line (int x0, int *x1, int y0, int *y1, int width, int hei
int vp8_post_proc_frame(VP8_COMMON *oci, YV12_BUFFER_CONFIG *dest, vp8_ppflags_t *ppflags)
{
char message[512];
int q = oci->filter_level * 10 / 6;
int flags = ppflags->post_proc_flag;
int deblock_level = ppflags->deblocking_level;
@ -744,6 +743,7 @@ int vp8_post_proc_frame(VP8_COMMON *oci, YV12_BUFFER_CONFIG *dest, vp8_ppflags_t
#if CONFIG_POSTPROC_VISUALIZER
if (flags & VP8D_DEBUG_TXT_FRAME_INFO)
{
char message[512];
sprintf(message, "F%1dG%1dQ%3dF%3dP%d_s%dx%d",
(oci->frame_type == KEY_FRAME),
oci->refresh_golden_frame,
@ -823,6 +823,7 @@ int vp8_post_proc_frame(VP8_COMMON *oci, YV12_BUFFER_CONFIG *dest, vp8_ppflags_t
if (flags & VP8D_DEBUG_TXT_RATE_INFO)
{
char message[512];
sprintf(message, "Bitrate: %10.2f frame_rate: %10.2f ", oci->bitrate, oci->framerate);
vp8_blit_text(message, oci->post_proc_buffer.y_buffer, oci->post_proc_buffer.y_stride);
}

View File

@ -485,7 +485,6 @@ static void setup_token_decoder(VP8D_COMP *pbi,
static void stop_token_decoder(VP8D_COMP *pbi)
{
int i;
VP8_COMMON *pc = &pbi->common;
if (pc->multi_token_partition != ONE_PARTITION)

View File

@ -451,7 +451,6 @@ void vp8_decoder_create_threads(VP8D_COMP *pbi)
#if CONFIG_MULTITHREAD
int core_count = 0;
int ithread;
int i;
pbi->b_multithreaded_rd = 0;
pbi->allocated_decoding_thread_count = 0;
@ -721,7 +720,6 @@ void vp8mt_lpf_init( VP8D_COMP *pbi, int default_filt_lvl)
/*int mb_row;
int mb_col;
int baseline_filter_level[MAX_MB_SEGMENTS];*/
int filter_level;
int alt_flt_enabled = mbd->segmentation_enabled;
int i;
@ -769,7 +767,7 @@ void vp8mt_decode_mb_rows( VP8D_COMP *pbi, MACROBLOCKD *xd)
int ibc = 0;
int num_part = 1 << pbi->common.multi_token_partition;
int i, j;
int i;
volatile int *last_row_current_mb_col = NULL;
int nsync = pbi->sync_range;
@ -809,7 +807,6 @@ void vp8mt_decode_mb_rows( VP8D_COMP *pbi, MACROBLOCKD *xd)
for (mb_row = 0; mb_row < pc->mb_rows; mb_row += (pbi->decoding_thread_count + 1))
{
int i;
xd->current_bc = &pbi->mbc[mb_row%num_part];

View File

@ -416,7 +416,6 @@ unsigned int vp8_activity_masking(VP8_COMP *cpi, MACROBLOCK *x)
int sum;
unsigned int a;
unsigned int b;
unsigned int d;
/* TODO: This could also be done over smaller areas (8x8), but that would
* require extensive changes elsewhere, as lambda is assumed to be fixed
* over an entire MB in most of the code.
@ -674,7 +673,6 @@ void vp8_encode_frame(VP8_COMP *cpi)
VP8_COMMON *const cm = & cpi->common;
MACROBLOCKD *const xd = & x->e_mbd;
int i;
TOKENEXTRA *tp = cpi->tok;
#if CONFIG_SEGMENTATION
int segment_counts[MAX_MB_SEGMENTS + SEEK_SEGID];

View File

@ -273,7 +273,6 @@ void vp8_optimize_b(MACROBLOCK *mb, int ib, int type,
int x;
int sz;
int next;
int path;
int rdmult;
int rddiv;
int final_eob;

View File

@ -262,7 +262,6 @@ extern size_t vp8_firstpass_stats_sz(unsigned int mb_count)
* macroblock.
*/
size_t stats_sz;
FIRSTPASS_STATS stats;
stats_sz = sizeof(FIRSTPASS_STATS) + mb_count;
stats_sz = (stats_sz + 7) & ~7;
@ -389,8 +388,6 @@ unsigned char *vp8_fpmm_get_pos(VP8_COMP *cpi)
}
void vp8_fpmm_reset_pos(VP8_COMP *cpi, unsigned char *target_pos)
{
int Offset;
cpi->fp_motion_map_stats = target_pos;
}
@ -983,10 +980,10 @@ static int estimate_max_q(VP8_COMP *cpi, double section_err, int section_target_
// Restriction on active max q for constrained quality mode.
if ( (cpi->oxcf.end_usage == USAGE_CONSTRAINED_QUALITY) &&
(Q < cpi->cq_target_quality) )
//(Q < cpi->oxcf.cq_target_quality) )
//(Q < cpi->oxcf.cq_level;) )
{
Q = cpi->cq_target_quality;
//Q = cpi->oxcf.cq_target_quality;
//Q = cpi->oxcf.cq_level;
}
// Adjust maxq_min_limit and maxq_max_limit limits based on
@ -2289,6 +2286,9 @@ void vp8_find_next_key_frame(VP8_COMP *cpi, FIRSTPASS_STATS *this_frame)
cpi->common.frame_type = KEY_FRAME;
// is this a forced key frame by interval
cpi->this_key_frame_forced = cpi->next_key_frame_forced;
// Clear the alt ref active flag as this can never be active on a key frame
cpi->source_alt_ref_active = FALSE;
@ -2351,7 +2351,11 @@ void vp8_find_next_key_frame(VP8_COMP *cpi, FIRSTPASS_STATS *this_frame)
kf_group_err /= 2.0;
kf_group_intra_err /= 2.0;
kf_group_coded_err /= 2.0;
cpi->next_key_frame_forced = TRUE;
}
else
cpi->next_key_frame_forced = FALSE;
// Special case for the last frame of the file
if (cpi->stats_in >= cpi->stats_in_end)

View File

@ -589,6 +589,7 @@ void vp8_set_speed_features(VP8_COMP *cpi)
sf->iterative_sub_pixel = 1;
sf->optimize_coefficients = 1;
sf->use_fastquant_for_pick = 0;
sf->no_skip_block4x4_search = 1;
sf->first_step = 0;
sf->max_step_search_steps = MAX_MVSEARCH_STEPS;
@ -791,6 +792,7 @@ void vp8_set_speed_features(VP8_COMP *cpi)
sf->first_step = 1;
sf->max_step_search_steps = MAX_MVSEARCH_STEPS;
sf->no_skip_block4x4_search = 0;
}
if (Speed > 1)
@ -2266,6 +2268,8 @@ VP8_PTR vp8_create_compressor(VP8_CONFIG *oxcf)
cpi->frames_since_key = 8; // Give a sensible default for the first frame.
cpi->key_frame_frequency = cpi->oxcf.key_freq;
cpi->this_key_frame_forced = FALSE;
cpi->next_key_frame_forced = FALSE;
cpi->source_alt_ref_pending = FALSE;
cpi->source_alt_ref_active = FALSE;
@ -3792,8 +3796,6 @@ static void encode_frame_to_data_rate
if (cpi->pass == 2 || (cm->current_video_frame > 150))
{
int Q;
int i;
int bpm_target;
//int tmp;
vp8_clear_system_state();
@ -3817,10 +3819,22 @@ static void encode_frame_to_data_rate
// KEY FRAMES
else
{
if (cpi->gfu_boost > 600)
cpi->active_best_quality = kf_low_motion_minq[Q];
else
cpi->active_best_quality = kf_high_motion_minq[Q];
// Special case for key frames forced because we have reached
// the maximum key frame interval. Here force the Q to a range
// close to but just below the ambient Q to reduce the risk
// of popping
if ( cpi->this_key_frame_forced )
{
cpi->active_worst_quality = cpi->avg_frame_qindex * 7/8;
cpi->active_best_quality = cpi->avg_frame_qindex * 2/3;
}
else
{
if (cpi->gfu_boost > 600)
cpi->active_best_quality = kf_low_motion_minq[Q];
else
cpi->active_best_quality = kf_high_motion_minq[Q];
}
}
}
else
@ -4827,7 +4841,9 @@ extern void vp8_pop_neon(INT64 *store);
#endif
int vp8_receive_raw_frame(VP8_PTR ptr, unsigned int frame_flags, YV12_BUFFER_CONFIG *sd, INT64 time_stamp, INT64 end_time)
{
#if HAVE_ARMV7
INT64 store_reg[8];
#endif
VP8_COMP *cpi = (VP8_COMP *) ptr;
VP8_COMMON *cm = &cpi->common;
struct vpx_usec_timer timer;
@ -4930,7 +4946,9 @@ int vp8_receive_raw_frame(VP8_PTR ptr, unsigned int frame_flags, YV12_BUFFER_CON
}
int vp8_get_compressed_data(VP8_PTR ptr, unsigned int *frame_flags, unsigned long *size, unsigned char *dest, INT64 *time_stamp, INT64 *time_end, int flush)
{
#if HAVE_ARMV7
INT64 store_reg[8];
#endif
VP8_COMP *cpi = (VP8_COMP *) ptr;
VP8_COMMON *cm = &cpi->common;
struct vpx_usec_timer tsctimer;

View File

@ -183,6 +183,7 @@ typedef struct
int optimize_coefficients;
int use_fastquant_for_pick;
int no_skip_block4x4_search;
} SPEED_FEATURES;
@ -320,7 +321,8 @@ typedef struct
unsigned int frames_since_key;
unsigned int key_frame_frequency;
unsigned int next_key;
unsigned int this_key_frame_forced;
unsigned int next_key_frame_forced;
unsigned int mode_check_freq[MAX_MODES];
unsigned int mode_test_hit_counts[MAX_MODES];

View File

@ -70,7 +70,6 @@ void vp8_fast_quantize_b_c(BLOCK *b, BLOCKD *d)
void vp8_fast_quantize_b_c(BLOCK *b, BLOCKD *d)
{
int i, rc, eob;
int zbin;
int x, y, z, sz;
short *coeff_ptr = b->coeff;
short *round_ptr = b->round;

View File

@ -1375,7 +1375,8 @@ static int vp8_rd_pick_best_mbsegmentation(VP8_COMP *cpi, MACROBLOCK *x,
}
/* If 8x8 is better than 16x8/8x16, then do 4x4 search */
if (bsi.segment_num == BLOCK_8X8) /* || (sv_segment_rd8x8-bsi.segment_rd) < sv_segment_rd8x8>>5) */
/* Not skip 4x4 if speed=0 (good quality) */
if (cpi->sf.no_skip_block4x4_search || bsi.segment_num == BLOCK_8X8) /* || (sv_segment_rd8x8-bsi.segment_rd) < sv_segment_rd8x8>>5) */
{
bsi.mvp = &bsi.sv_mvp[0];
vp8_rd_check_segment(cpi, x, &bsi, BLOCK_4X4);

View File

@ -84,7 +84,7 @@ temporal_filter_apply_load_8:
jmp temporal_filter_apply_load_finished
temporal_filter_apply_load_16:
movdqa xmm0, [rsi] ; src (frame1)
movdqu xmm0, [rsi] ; src (frame1)
lea rsi, [rsi + rbp] ; += stride
movdqa xmm1, xmm0
punpcklbw xmm0, xmm7 ; src[ 0- 7]