summaryrefslogtreecommitdiff
path: root/vp8/encoder/onyx_if.c
diff options
context:
space:
mode:
authorJohn Koleszar <jkoleszar@google.com>2011-03-03 09:01:10 -0500
committerJohn Koleszar <jkoleszar@google.com>2011-03-03 09:01:10 -0500
commit2c5638334ecb4fafc1ea9790ddf493d8d083ee4a (patch)
tree16552b3980b0a27ddb7a763e9dc538b75cf9cd68 /vp8/encoder/onyx_if.c
parent1a7ce50a6c91af97291aa727483030a14a58859f (diff)
parent6f5189c044cf52171822f6df1ad6ae4a3bcaf2c4 (diff)
downloadlibvpx-2c5638334ecb4fafc1ea9790ddf493d8d083ee4a.tar
libvpx-2c5638334ecb4fafc1ea9790ddf493d8d083ee4a.tar.gz
libvpx-2c5638334ecb4fafc1ea9790ddf493d8d083ee4a.tar.bz2
libvpx-2c5638334ecb4fafc1ea9790ddf493d8d083ee4a.zip
Merge remote branch 'origin/master' into experimental
Conflicts: vp8/vp8_cx_iface.c Change-Id: Ib30d0cfbdaeb605ee4b846f683d204cd07e0c028
Diffstat (limited to 'vp8/encoder/onyx_if.c')
-rw-r--r--vp8/encoder/onyx_if.c75
1 files changed, 29 insertions, 46 deletions
diff --git a/vp8/encoder/onyx_if.c b/vp8/encoder/onyx_if.c
index 65296886f..0a4a9a099 100644
--- a/vp8/encoder/onyx_if.c
+++ b/vp8/encoder/onyx_if.c
@@ -330,35 +330,31 @@ static void setup_features(VP8_COMP *cpi)
void vp8_dealloc_compressor_data(VP8_COMP *cpi)
{
- vpx_free(cpi->tplist);
+ vpx_free(cpi->tplist);
cpi->tplist = NULL;
// Delete last frame MV storage buffers
- vpx_free(cpi->lfmv);
-
+ vpx_free(cpi->lfmv);
cpi->lfmv = 0;
- vpx_free(cpi->lf_ref_frame_sign_bias);
-
+ vpx_free(cpi->lf_ref_frame_sign_bias);
cpi->lf_ref_frame_sign_bias = 0;
- vpx_free(cpi->lf_ref_frame);
-
+ vpx_free(cpi->lf_ref_frame);
cpi->lf_ref_frame = 0;
// Delete sementation map
- vpx_free(cpi->segmentation_map);
-
+ vpx_free(cpi->segmentation_map);
cpi->segmentation_map = 0;
- vpx_free(cpi->active_map);
-
+ vpx_free(cpi->active_map);
cpi->active_map = 0;
+#if !(CONFIG_REALTIME_ONLY)
// Delete first pass motion map
- vpx_free(cpi->fp_motion_map);
-
+ vpx_free(cpi->fp_motion_map);
cpi->fp_motion_map = 0;
+#endif
vp8_de_alloc_frame_buffers(&cpi->common);
@@ -380,21 +376,17 @@ void vp8_dealloc_compressor_data(VP8_COMP *cpi)
cpi->tok = 0;
// Structure used to monitor GF usage
- vpx_free(cpi->gf_active_flags);
-
+ vpx_free(cpi->gf_active_flags);
cpi->gf_active_flags = 0;
- vpx_free(cpi->mb.pip);
-
+ vpx_free(cpi->mb.pip);
cpi->mb.pip = 0;
#if !(CONFIG_REALTIME_ONLY)
- vpx_free(cpi->total_stats);
-
+ vpx_free(cpi->total_stats);
cpi->total_stats = 0;
- vpx_free(cpi->this_frame_stats);
-
+ vpx_free(cpi->this_frame_stats);
cpi->this_frame_stats = 0;
#endif
}
@@ -2230,9 +2222,11 @@ VP8_PTR vp8_create_compressor(VP8_CONFIG *oxcf)
vpx_memset(cpi->active_map , 1, (cpi->common.mb_rows * cpi->common.mb_cols));
cpi->active_map_enabled = 0;
+#if !(CONFIG_REALTIME_ONLY)
// Create the first pass motion map structure and set to 0
// Allocate space for maximum of 15 buffers
CHECK_MEM_ERROR(cpi->fp_motion_map, vpx_calloc(15*cpi->common.MBs, 1));
+#endif
#if 0
// Experimental code for lagged and one pass
@@ -3199,8 +3193,11 @@ static void update_golden_frame_and_stats(VP8_COMP *cpi)
// Update the Golden frame reconstruction buffer if signalled and the GF usage counts.
if (cm->refresh_golden_frame)
{
- // Update the golden frame buffer
- vp8_yv12_copy_frame_ptr(cm->frame_to_show, &cm->yv12_fb[cm->gld_fb_idx]);
+ if (cm->frame_type != KEY_FRAME)
+ {
+ // Update the golden frame buffer
+ vp8_yv12_copy_frame_ptr(cm->frame_to_show, &cm->yv12_fb[cm->gld_fb_idx]);
+ }
// Select an interval before next GF
if (!cpi->auto_gold)
@@ -4834,16 +4831,19 @@ static void encode_frame_to_data_rate
if (cpi->oxcf.error_resilient_mode)
{
- // Is this an alternate reference update
- if (cpi->common.refresh_alt_ref_frame)
- vp8_yv12_copy_frame_ptr(cm->frame_to_show, &cm->yv12_fb[cm->alt_fb_idx]);
+ if (cm->frame_type != KEY_FRAME)
+ {
+ // Is this an alternate reference update
+ if (cm->refresh_alt_ref_frame)
+ vp8_yv12_copy_frame_ptr(cm->frame_to_show, &cm->yv12_fb[cm->alt_fb_idx]);
- if (cpi->common.refresh_golden_frame)
- vp8_yv12_copy_frame_ptr(cm->frame_to_show, &cm->yv12_fb[cm->gld_fb_idx]);
+ if (cm->refresh_golden_frame)
+ vp8_yv12_copy_frame_ptr(cm->frame_to_show, &cm->yv12_fb[cm->gld_fb_idx]);
+ }
}
else
{
- if (cpi->oxcf.play_alternate && cpi->common.refresh_alt_ref_frame && (cpi->common.frame_type != KEY_FRAME))
+ if (cpi->oxcf.play_alternate && cm->refresh_alt_ref_frame && (cm->frame_type != KEY_FRAME))
// Update the alternate reference frame and stats as appropriate.
update_alt_ref_frame_and_stats(cpi);
else
@@ -5318,23 +5318,6 @@ int vp8_get_compressed_data(VP8_PTR ptr, unsigned int *frame_flags, unsigned lon
if (cpi->compressor_speed == 2)
{
vp8_check_gf_quality(cpi);
- }
-
- if (!cpi)
- {
-#if HAVE_ARMV7
-#if CONFIG_RUNTIME_CPU_DETECT
- if (cm->rtcd.flags & HAS_NEON)
-#endif
- {
- vp8_pop_neon(store_reg);
- }
-#endif
- return 0;
- }
-
- if (cpi->compressor_speed == 2)
- {
vpx_usec_timer_start(&tsctimer);
vpx_usec_timer_start(&ticktimer);
}