check_add_cflags -Wpointer-arith
check_add_cflags -Wtype-limits
check_add_cflags -Wcast-qual
+ check_add_cflags -Wimplicit-function-declaration
+ check_add_cflags -Wuninitialized
+ check_add_cflags -Wunused-variable
+ check_add_cflags -Wunused-but-set-variable
enabled extra_warnings || check_add_cflags -Wno-unused-function
fi
#if HAVE_NEON
+extern unsigned int vp8_sub_pixel_variance16x16_neon_func
+(
+ const unsigned char *src_ptr,
+ int src_pixels_per_line,
+ int xoffset,
+ int yoffset,
+ const unsigned char *dst_ptr,
+ int dst_pixels_per_line,
+ unsigned int *sse
+);
+
unsigned int vp8_sub_pixel_variance16x16_neon
(
const unsigned char *src_ptr,
#include "blockd.h"
-typedef enum
-{
- PRED = 0,
- DEST = 1
-} BLOCKSET;
-
-static void setup_macroblock(MACROBLOCKD *x, BLOCKSET bs)
-{
- int block;
-
- unsigned char **y, **u, **v;
-
- if (bs == DEST)
- {
- y = &x->dst.y_buffer;
- u = &x->dst.u_buffer;
- v = &x->dst.v_buffer;
- }
- else
- {
- y = &x->pre.y_buffer;
- u = &x->pre.u_buffer;
- v = &x->pre.v_buffer;
- }
-
- for (block = 0; block < 16; block++) /* y blocks */
- {
- x->block[block].offset =
- (block >> 2) * 4 * x->dst.y_stride + (block & 3) * 4;
- }
-
- for (block = 16; block < 20; block++) /* U and V blocks */
- {
- x->block[block+4].offset =
- x->block[block].offset =
- ((block - 16) >> 1) * 4 * x->dst.uv_stride + (block & 1) * 4;
- }
-}
-
void vp8_setup_block_dptrs(MACROBLOCKD *x)
{
int r, c;
void vp8_build_block_doffsets(MACROBLOCKD *x)
{
+ int block;
- /* handle the destination pitch features */
- setup_macroblock(x, DEST);
- setup_macroblock(x, PRED);
+ for (block = 0; block < 16; block++) /* y blocks */
+ {
+ x->block[block].offset =
+ (block >> 2) * 4 * x->dst.y_stride + (block & 3) * 4;
+ }
+
+ for (block = 16; block < 20; block++) /* U and V blocks */
+ {
+ x->block[block+4].offset =
+ x->block[block].offset =
+ ((block - 16) >> 1) * 4 * x->dst.uv_stride + (block & 1) * 4;
+ }
}
#define USE_SSD
static void multiframe_quality_enhance_block
(
- int blksize, /* Currently only values supported are 16, 8, 4 */
+ int blksize, /* Currently only values supported are 16, 8 */
int qcurr,
int qprev,
unsigned char *y,
int uvblksize = blksize >> 1;
int qdiff = qcurr - qprev;
- int i, j;
- unsigned char *yp;
- unsigned char *ydp;
+ int i;
unsigned char *up;
unsigned char *udp;
unsigned char *vp;
vsad = (vp8_sad8x8(v, uv_stride, vd, uvd_stride, INT_MAX)+32)>>6;
#endif
}
- else if (blksize == 8)
+ else /* if (blksize == 8) */
{
actd = (vp8_variance8x8(yd, yd_stride, VP8_ZEROS, 0, &sse)+32)>>6;
act = (vp8_variance8x8(y, y_stride, VP8_ZEROS, 0, &sse)+32)>>6;
prototype void vp8_build_intra_predictors_mbuv_s "struct macroblockd *x, unsigned char * uabove_row, unsigned char * vabove_row, unsigned char *uleft, unsigned char *vleft, int left_stride, unsigned char * upred_ptr, unsigned char * vpred_ptr, int pred_stride"
specialize vp8_build_intra_predictors_mbuv_s sse2 ssse3
+prototype void vp8_intra4x4_predict_d "unsigned char *above, unsigned char *left, int left_stride, int b_mode, unsigned char *dst, int dst_stride, unsigned char top_left"
prototype void vp8_intra4x4_predict "unsigned char *src, int src_stride, int b_mode, unsigned char *dst, int dst_stride"
specialize vp8_intra4x4_predict media
vp8_intra4x4_predict_media=vp8_intra4x4_predict_armv6
{
VP8_COMMON* pc = &pbi->common;
const unsigned char *partition_size_ptr = token_part_sizes + i * 3;
- unsigned int partition_size;
+ unsigned int partition_size = 0;
ptrdiff_t bytes_left = fragment_end - fragment_start;
/* Calculate the length of this partition. The last partition
* size is implicit. If the partition size can't be read, then
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;
const MV_CONTEXT *mvc = pc->fc.mvc;
- MODE_INFO *m = pc->mi, *ms;
+ MODE_INFO *m = pc->mi;
const int mis = pc->mode_info_stride;
int mb_row = -1;
int prob_skip_false = 0;
- ms = pc->mi - 1;
cpi->mb.partition_info = cpi->mb.pi;
FIRSTPASS_STATS this_frame = {0};
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)
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)
{
static void alloc_raw_frame_buffers(VP8_COMP *cpi)
{
+#if VP8_TEMPORAL_ALT_REF
int width = (cpi->oxcf.Width + 15) & ~15;
int height = (cpi->oxcf.Height + 15) & ~15;
+#endif
cpi->lookahead = vp8_lookahead_init(cpi->oxcf.Width, cpi->oxcf.Height,
cpi->oxcf.lag_in_frames);
int Loop = 0;
int loop_count;
- int this_q;
- int last_zbin_oq;
+ VP8_COMMON *cm = &cpi->common;
+ int active_worst_qchanged = 0;
+
+#if !(CONFIG_REALTIME_ONLY)
int q_low;
int q_high;
int zbin_oq_high;
int zbin_oq_low = 0;
int top_index;
int bottom_index;
- VP8_COMMON *cm = &cpi->common;
- int active_worst_qchanged = 0;
-
int overshoot_seen = 0;
int undershoot_seen = 0;
+#endif
+
int drop_mark = cpi->oxcf.drop_frames_water_mark * cpi->oxcf.optimal_buffer_level / 100;
int drop_mark75 = drop_mark * 2 / 3;
int drop_mark50 = drop_mark / 4;
{
cpi->decimation_factor = 1;
}
-
//vpx_log("Encoder: Decimation Factor: %d \n",cpi->decimation_factor);
}
// Determine initial Q to try
Q = vp8_regulate_q(cpi, cpi->this_frame_target);
- last_zbin_oq = cpi->zbin_over_quant;
+
+#if !(CONFIG_REALTIME_ONLY)
// Set highest allowed value for Zbin over quant
if (cm->frame_type == KEY_FRAME)
}
else
zbin_oq_high = ZBIN_OQ_MAX;
+#endif
// Setup background Q adjustment for error resilient mode.
// For multi-layer encodes only enable this for the base layer.
vp8_compute_frame_size_bounds(cpi, &frame_under_shoot_limit, &frame_over_shoot_limit);
+#if !(CONFIG_REALTIME_ONLY)
// Limit Q range for the adaptive loop.
bottom_index = cpi->active_best_quality;
top_index = cpi->active_worst_quality;
q_low = cpi->active_best_quality;
q_high = cpi->active_worst_quality;
+#endif
vp8_save_coding_context(cpi);
loop_count = 0;
-
scale_and_extend_source(cpi->un_scaled_source, cpi);
+
#if !(CONFIG_REALTIME_ONLY) && CONFIG_POSTPROC && !(CONFIG_TEMPORAL_DENOISING)
if (cpi->oxcf.noise_sensitivity > 0)
*/
vp8_set_quantizer(cpi, Q);
- this_q = Q;
// setup skip prob for costing in mode/mv decision
if (cpi->common.mb_no_coeff_skip)
if (cpi->compressor_speed == 2)
{
/* we don't do re-encoding in realtime mode
- * if key frame is decided than we force it on next frame */
+ * if key frame is decided then we force it on next frame */
cpi->force_next_frame_intra = key_frame_decision;
}
+#if !(CONFIG_REALTIME_ONLY)
else if (key_frame_decision)
{
// Reset all our sizing numbers and recode
continue;
}
+#endif
}
vp8_clear_system_state();
while ((cpi->active_worst_quality < cpi->worst_quality) && (over_size_percent > 0))
{
cpi->active_worst_quality++;
- top_index = cpi->active_worst_quality;
+
over_size_percent = (int)(over_size_percent * 0.96); // Assume 1 qstep = about 4% on frame size.
}
-
+#if !(CONFIG_REALTIME_ONLY)
+ top_index = cpi->active_worst_quality;
+#endif
// If we have updated the active max Q do not call vp8_update_rate_correction_factors() this loop.
active_worst_qchanged = 1;
}
// Clamp cpi->zbin_over_quant
cpi->zbin_over_quant = (cpi->zbin_over_quant < zbin_oq_low) ? zbin_oq_low : (cpi->zbin_over_quant > zbin_oq_high) ? zbin_oq_high : cpi->zbin_over_quant;
- //Loop = (Q != last_q) || (last_zbin_oq != cpi->zbin_over_quant);
Loop = Q != last_q;
- last_zbin_oq = cpi->zbin_over_quant;
}
else
#endif
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;
{
MACROBLOCK *x = &cpi->mb;
int step_param;
- int further_steps;
int sadpb = x->sadperbit16;
int bestsme = INT_MAX;
// Further step/diamond searches as necessary
if (cpi->Speed < 8)
{
- step_param = cpi->sf.first_step +
- (cpi->Speed > 5);
- further_steps =
- (cpi->sf.max_step_search_steps - 1)-step_param;
+ step_param = cpi->sf.first_step + (cpi->Speed > 5);
}
else
{
step_param = cpi->sf.first_step + 2;
- further_steps = 0;
}
/*cpi->sf.search_method == HEX*/
}
case 8:
+ default:
{
// 3-layers
int ids[4] = {0,2,1,2};
VP8_EFLAG_NO_UPD_ENTROPY;
break;
}
- default:
- break;
}
// Open input file
#define VPX_ENCODER_H
#include "vpx_codec.h"
+/*! Temporal Scalability: Maximum length of the sequence defining frame
+ * layer membership
+ */
#define MAX_PERIODICITY 16
+
+/*! Temporal Scalability: Maximum number of coding layers */
#define MAX_LAYERS 5
/*!\brief Current ABI version number