Commit 9a8204d6 authored by Paul Wilkins's avatar Paul Wilkins
Browse files

Simplification of experimental code base.

Removed ~CONFIG_REALTIME_ONLY code.

Change-Id: I5fafff29a08acd8928699f9ddce8744787024d8c
parent af8f1928
......@@ -35,7 +35,6 @@ Advanced options:
${toggle_mem_tracker} track memory usage
${toggle_postproc} postprocessing
${toggle_spatial_resampling} spatial sampling (scaling) support
${toggle_realtime_only} enable this option while building for real-time encoding
${toggle_error_concealment} enable this option to get a decoder which is able to conceal losses
${toggle_runtime_cpu_detect} runtime cpu detection
${toggle_shared} shared library support
......@@ -263,7 +262,6 @@ CONFIG_LIST="
decoders
static_msvcrt
spatial_resampling
realtime_only
error_concealment
shared
static
......@@ -307,7 +305,6 @@ CMDLINE_SELECT="
static_msvcrt
mem_tracker
spatial_resampling
realtime_only
error_concealment
shared
static
......
......@@ -101,9 +101,7 @@ void vp8_cmachine_specific_config(VP8_COMP *cpi)
cpi->rtcd.search.full_search = vp8_full_search_sad;
cpi->rtcd.search.refining_search = vp8_refining_search_sad;
cpi->rtcd.search.diamond_search = vp8_diamond_search_sad;
#if !(CONFIG_REALTIME_ONLY)
cpi->rtcd.temporal.apply = vp8_temporal_filter_apply_c;
#endif
#if CONFIG_INTERNAL_STATS
cpi->rtcd.variance.ssimpf_8x8 = vp8_ssim_parms_8x8_c;
cpi->rtcd.variance.ssimpf_16x16 = vp8_ssim_parms_16x16_c;
......
......@@ -13,7 +13,7 @@
#include "lookahead.h"
#include "vp8/common/extend.h"
#define MAX_LAG_BUFFERS (CONFIG_REALTIME_ONLY? 1 : 25)
#define MAX_LAG_BUFFERS 25
struct lookahead_ctx
{
......
......@@ -359,7 +359,6 @@ static void dealloc_compressor_data(VP8_COMP *cpi)
vpx_free(cpi->mb.pip);
cpi->mb.pip = 0;
#if !(CONFIG_REALTIME_ONLY)
vpx_free(cpi->twopass.total_stats);
cpi->twopass.total_stats = 0;
......@@ -368,7 +367,6 @@ static void dealloc_compressor_data(VP8_COMP *cpi)
vpx_free(cpi->twopass.this_frame_stats);
cpi->twopass.this_frame_stats = 0;
#endif
}
static void segmentation_test_function(VP8_PTR ptr)
......@@ -828,7 +826,6 @@ void vp8_set_speed_features(VP8_COMP *cpi)
switch (Mode)
{
#if !(CONFIG_REALTIME_ONLY)
case 0: // best quality mode
sf->thresh_mult[THR_ZEROMV ] = 0;
sf->thresh_mult[THR_ZEROG ] = 0;
......@@ -1137,7 +1134,6 @@ void vp8_set_speed_features(VP8_COMP *cpi)
}
break;
#endif
case 2:
sf->optimize_coefficients = 0;
sf->recode_loop = 0;
......@@ -1767,7 +1763,6 @@ void vp8_alloc_compressor_data(VP8_COMP *cpi)
vpx_calloc(sizeof(unsigned int),
cm->mb_rows * cm->mb_cols));
#if !(CONFIG_REALTIME_ONLY)
vpx_free(cpi->twopass.total_stats);
cpi->twopass.total_stats = vpx_calloc(1, sizeof(FIRSTPASS_STATS));
......@@ -1784,7 +1779,6 @@ void vp8_alloc_compressor_data(VP8_COMP *cpi)
!cpi->twopass.this_frame_stats)
vpx_internal_error(&cpi->common.error, VPX_CODEC_MEM_ERROR,
"Failed to allocate firstpass stats");
#endif
vpx_free(cpi->tplist);
......@@ -2443,8 +2437,6 @@ VP8_PTR vp8_create_compressor(VP8_CONFIG *oxcf)
cpi->output_pkt_list = oxcf->output_pkt_list;
#if !(CONFIG_REALTIME_ONLY)
if (cpi->pass == 1)
{
vp8_init_first_pass(cpi);
......@@ -2461,8 +2453,6 @@ VP8_PTR vp8_create_compressor(VP8_CONFIG *oxcf)
vp8_init_second_pass(cpi);
}
#endif
if (cpi->compressor_speed == 2)
{
cpi->cpu_freq = 0; //vp8_get_processor_freq();
......@@ -2575,15 +2565,11 @@ void vp8_remove_compressor(VP8_PTR *ptr)
if (cpi && (cpi->common.current_video_frame > 0))
{
#if !(CONFIG_REALTIME_ONLY)
if (cpi->pass == 2)
{
vp8_end_second_pass(cpi);
}
#endif
#ifdef ENTROPY_STATS
print_context_counters();
print_tree_update_probs();
......@@ -3413,7 +3399,6 @@ int find_fp_qindex()
return i;
}
#if !(CONFIG_REALTIME_ONLY)
static void Pass1Encode(VP8_COMP *cpi, unsigned long *size, unsigned char *dest, unsigned int *frame_flags)
{
(void) size;
......@@ -3426,7 +3411,7 @@ static void Pass1Encode(VP8_COMP *cpi, unsigned long *size, unsigned char *dest,
scale_and_extend_source(cpi->un_scaled_source, cpi);
vp8_first_pass(cpi);
}
#endif
//#define WRITE_RECON_BUFFER 1
#if WRITE_RECON_BUFFER
void write_cx_frame_to_file(YV12_BUFFER_CONFIG *frame, int this_frame)
......@@ -3788,7 +3773,6 @@ 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 (cpi->pass == 2)
{
if (cpi->common.refresh_alt_ref_frame)
......@@ -3798,7 +3782,6 @@ static void encode_frame_to_data_rate
}
}
else
#endif
cpi->per_frame_bandwidth = (int)(cpi->target_bandwidth / cpi->output_frame_rate);
// Default turn off buffer to buffer copying
......@@ -4195,7 +4178,7 @@ static void encode_frame_to_data_rate
scale_and_extend_source(cpi->un_scaled_source, cpi);
#if !(CONFIG_REALTIME_ONLY) && CONFIG_POSTPROC
#if CONFIG_POSTPROC
if (cpi->oxcf.noise_sensitivity > 0)
{
......@@ -4435,7 +4418,6 @@ static void encode_frame_to_data_rate
else
active_worst_qchanged = FALSE;
#if !(CONFIG_REALTIME_ONLY)
// Special case handling for forced key frames
if ( (cm->frame_type == KEY_FRAME) && cpi->this_key_frame_forced )
{
......@@ -4603,7 +4585,6 @@ static void encode_frame_to_data_rate
last_zbin_oq = cpi->zbin_over_quant;
}
else
#endif
Loop = FALSE;
if (cpi->is_src_frame_alt_ref)
......@@ -5164,7 +5145,6 @@ static void check_gf_quality(VP8_COMP *cpi)
#endif
}
#if !(CONFIG_REALTIME_ONLY)
static void Pass2Encode(VP8_COMP *cpi, unsigned long *size, unsigned char *dest, unsigned int *frame_flags)
{
......@@ -5181,7 +5161,6 @@ static void Pass2Encode(VP8_COMP *cpi, unsigned long *size, unsigned char *dest,
cpi->twopass.bits_left += (int64_t)(two_pass_min_rate / cpi->oxcf.frame_rate);
}
}
#endif
//For ARM NEON, d8-d15 are callee-saved registers, and need to be saved by us.
#if HAVE_ARMV7
......@@ -5272,7 +5251,6 @@ int vp8_get_compressed_data(VP8_PTR ptr, unsigned int *frame_flags, unsigned lon
cpi->source = NULL;
#if !(CONFIG_REALTIME_ONLY)
// Should we code an alternate reference frame
if (cpi->oxcf.error_resilient_mode == 0 &&
cpi->oxcf.play_alternate &&
......@@ -5297,7 +5275,6 @@ int vp8_get_compressed_data(VP8_PTR ptr, unsigned int *frame_flags, unsigned lon
cpi->is_src_frame_alt_ref = 0;
}
}
#endif
if (!cpi->source)
{
......@@ -5324,16 +5301,12 @@ int vp8_get_compressed_data(VP8_PTR ptr, unsigned int *frame_flags, unsigned lon
else
{
*size = 0;
#if !(CONFIG_REALTIME_ONLY)
if (flush && cpi->pass == 1 && !cpi->twopass.first_pass_done)
{
vp8_end_first_pass(cpi); /* get last stats packet */
cpi->twopass.first_pass_done = 1;
}
#endif
#if HAVE_ARMV7
#if CONFIG_RUNTIME_CPU_DETECT
if (cm->rtcd.flags & HAS_NEON)
......@@ -5447,8 +5420,6 @@ int vp8_get_compressed_data(VP8_PTR ptr, unsigned int *frame_flags, unsigned lon
assert(i < NUM_YV12_BUFFERS );
}
#if !(CONFIG_REALTIME_ONLY)
if (cpi->pass == 1)
{
Pass1Encode(cpi, size, dest, frame_flags);
......@@ -5458,8 +5429,7 @@ int vp8_get_compressed_data(VP8_PTR ptr, unsigned int *frame_flags, unsigned lon
Pass2Encode(cpi, size, dest, frame_flags);
}
else
#endif
encode_frame_to_data_rate(cpi, size, dest, frame_flags);
encode_frame_to_data_rate(cpi, size, dest, frame_flags);
if (cpi->compressor_speed == 2)
{
......
......@@ -36,7 +36,7 @@
#define KEY_FRAME_CONTEXT 5
#define MAX_LAG_BUFFERS (CONFIG_REALTIME_ONLY? 1 : 25)
#define MAX_LAG_BUFFERS 25
#define AF_THRESH 25
#define AF_THRESH2 100
......@@ -51,9 +51,7 @@
#define MV_ZBIN_BOOST 4
#define ZBIN_OQ_MAX 192
#if !(CONFIG_REALTIME_ONLY)
#define VP8_TEMPORAL_ALT_REF 1
#endif
typedef struct
{
......
......@@ -218,10 +218,7 @@ void vp8_arch_x86_encoder_init(VP8_COMP *cpi)
cpi->rtcd.encodemb.submbuv = vp8_subtract_mbuv_sse2;
cpi->rtcd.quantize.fastquantb = vp8_fast_quantize_b_sse2;
#if !(CONFIG_REALTIME_ONLY)
cpi->rtcd.temporal.apply = vp8_temporal_filter_apply_sse2;
#endif
#if CONFIG_INTERNAL_STATS
#if ARCH_X86_64
......
......@@ -56,13 +56,8 @@ static const struct extraconfig_map extracfg_map[] =
0,
{
NULL,
#if !(CONFIG_REALTIME_ONLY)
VP8_BEST_QUALITY_ENCODING, /* Encoding Mode */
0, /* cpu_used */
#else
VP8_REAL_TIME_ENCODING, /* Encoding Mode */
4, /* cpu_used */
#endif
0, /* enable_auto_alt_ref */
0, /* noise_sensitivity */
0, /* Sharpness */
......@@ -149,11 +144,7 @@ static vpx_codec_err_t validate_config(vpx_codec_alg_priv_t *ctx,
RANGE_CHECK_HI(cfg, rc_max_quantizer, 63);
RANGE_CHECK_HI(cfg, rc_min_quantizer, cfg->rc_max_quantizer);
RANGE_CHECK_HI(cfg, g_threads, 64);
#if !(CONFIG_REALTIME_ONLY)
RANGE_CHECK_HI(cfg, g_lag_in_frames, 25);
#else
RANGE_CHECK_HI(cfg, g_lag_in_frames, 0);
#endif
RANGE_CHECK(cfg, rc_end_usage, VPX_VBR, VPX_CQ);
RANGE_CHECK_HI(cfg, rc_undershoot_pct, 1000);
RANGE_CHECK_HI(cfg, rc_overshoot_pct, 1000);
......@@ -164,11 +155,7 @@ static vpx_codec_err_t validate_config(vpx_codec_alg_priv_t *ctx,
RANGE_CHECK_HI(cfg, rc_dropframe_thresh, 100);
RANGE_CHECK_HI(cfg, rc_resize_up_thresh, 100);
RANGE_CHECK_HI(cfg, rc_resize_down_thresh, 100);
#if !(CONFIG_REALTIME_ONLY)
RANGE_CHECK(cfg, g_pass, VPX_RC_ONE_PASS, VPX_RC_LAST_PASS);
#else
RANGE_CHECK(cfg, g_pass, VPX_RC_ONE_PASS, VPX_RC_ONE_PASS);
#endif
/* VP8 does not support a lower bound on the keyframe interval in
* automatic keyframe placement mode.
......@@ -181,13 +168,8 @@ static vpx_codec_err_t validate_config(vpx_codec_alg_priv_t *ctx,
RANGE_CHECK_BOOL(vp8_cfg, enable_auto_alt_ref);
RANGE_CHECK(vp8_cfg, cpu_used, -16, 16);
#if !(CONFIG_REALTIME_ONLY)
RANGE_CHECK(vp8_cfg, encoding_mode, VP8_BEST_QUALITY_ENCODING, VP8_REAL_TIME_ENCODING);
RANGE_CHECK_HI(vp8_cfg, noise_sensitivity, 6);
#else
RANGE_CHECK(vp8_cfg, encoding_mode, VP8_REAL_TIME_ENCODING, VP8_REAL_TIME_ENCODING);
RANGE_CHECK(vp8_cfg, noise_sensitivity, 0, 0);
#endif
RANGE_CHECK(vp8_cfg, token_partitions, VP8_ONE_TOKENPARTITION, VP8_EIGHT_TOKENPARTITION);
RANGE_CHECK_HI(vp8_cfg, Sharpness, 7);
......@@ -196,7 +178,6 @@ static vpx_codec_err_t validate_config(vpx_codec_alg_priv_t *ctx,
RANGE_CHECK(vp8_cfg, arnr_type, 1, 3);
RANGE_CHECK(vp8_cfg, cq_level, 0, 63);
#if !(CONFIG_REALTIME_ONLY)
if (cfg->g_pass == VPX_RC_LAST_PASS)
{
size_t packet_sz = sizeof(FIRSTPASS_STATS);
......@@ -218,7 +199,6 @@ static vpx_codec_err_t validate_config(vpx_codec_alg_priv_t *ctx,
if ((int)(stats->count + 0.5) != n_packets - 1)
ERROR("rc_twopass_stats_in missing EOS stats packet");
}
#endif
return VPX_CODEC_OK;
}
......@@ -618,7 +598,6 @@ static void pick_quickcompress_mode(vpx_codec_alg_priv_t *ctx,
{
unsigned int new_qc;
#if !(CONFIG_REALTIME_ONLY)
/* Use best quality mode if no deadline is given. */
new_qc = MODE_BESTQUALITY;
......@@ -637,10 +616,6 @@ static void pick_quickcompress_mode(vpx_codec_alg_priv_t *ctx,
new_qc = (deadline > duration_us) ? MODE_GOODQUALITY : MODE_REALTIME;
}
#else
new_qc = MODE_REALTIME;
#endif
switch (ctx->deprecated_mode)
{
case VP8_BEST_QUALITY_ENCODING:
......
......@@ -91,11 +91,6 @@ VP8_CX_SRCS-yes += encoder/mbgraph.c
VP8_CX_SRCS-yes += encoder/mbgraph.h
ifeq ($(CONFIG_REALTIME_ONLY),yes)
VP8_CX_SRCS_REMOVE-yes += encoder/firstpass.c
VP8_CX_SRCS_REMOVE-yes += encoder/temporal_filter.c
endif
VP8_CX_SRCS-$(ARCH_X86)$(ARCH_X86_64) += encoder/x86/encodemb_x86.h
VP8_CX_SRCS-$(ARCH_X86)$(ARCH_X86_64) += encoder/x86/dct_x86.h
VP8_CX_SRCS-$(ARCH_X86)$(ARCH_X86_64) += encoder/x86/mcomp_x86.h
......@@ -127,9 +122,5 @@ VP8_CX_SRCS-$(ARCH_X86)$(ARCH_X86_64) += encoder/x86/quantize_mmx.asm
VP8_CX_SRCS-$(ARCH_X86)$(ARCH_X86_64) += encoder/x86/encodeopt.asm
VP8_CX_SRCS-$(ARCH_X86_64) += encoder/x86/ssim_opt.asm
ifeq ($(CONFIG_REALTIME_ONLY),yes)
VP8_CX_SRCS_REMOVE-$(HAVE_SSE2) += encoder/x86/temporal_filter_apply_sse2.asm
endif
VP8_CX_SRCS-yes := $(filter-out $(VP8_CX_SRCS_REMOVE-yes),$(VP8_CX_SRCS-yes))
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