summaryrefslogtreecommitdiff
path: root/vp8/encoder/onyx_if.c
diff options
context:
space:
mode:
authorJohn Koleszar <jkoleszar@google.com>2011-03-03 08:59:34 -0500
committerJohn Koleszar <jkoleszar@google.com>2011-03-03 08:59:34 -0500
commitca29f6a7c47471621da52e96cb2d5c5acb81b41b (patch)
tree57b2392bc6fcb2f7b49f90cb05043da8edcbf6e2 /vp8/encoder/onyx_if.c
parent738a79191725f5af4a08451312f5a48fb386bc4b (diff)
parent6f5189c044cf52171822f6df1ad6ae4a3bcaf2c4 (diff)
downloadlibvpx-ca29f6a7c47471621da52e96cb2d5c5acb81b41b.tar
libvpx-ca29f6a7c47471621da52e96cb2d5c5acb81b41b.tar.gz
libvpx-ca29f6a7c47471621da52e96cb2d5c5acb81b41b.tar.bz2
libvpx-ca29f6a7c47471621da52e96cb2d5c5acb81b41b.zip
Merge remote branch 'internal/upstream' into HEAD
Conflicts: vp8/vp8_cx_iface.c Change-Id: Iecfd4532ab1c722d10ecce8a5ec473e96093cf3b
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 3f0ee8e91..0d471cd28 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
}
@@ -2227,9 +2219,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
@@ -3195,8 +3189,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)
@@ -4833,16 +4830,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
@@ -5317,23 +5317,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);
}