summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Kovalev <dkovalev@google.com>2014-08-22 14:19:49 -0700
committerGerrit Code Review <gerrit@gerrit.golo.chromium.org>2014-08-22 14:19:49 -0700
commit3c810ef79cfebdfb9512811e4424acf360a4dea4 (patch)
treec63d2db93656fb3cc2e997b98988e0c43de542cd
parent8fa9d183795a2336032a2f7d37a637f8e579f062 (diff)
parent10da24a4943fbc39f1443bed1d495ea9874e7b24 (diff)
downloadlibvpx-3c810ef79cfebdfb9512811e4424acf360a4dea4.tar
libvpx-3c810ef79cfebdfb9512811e4424acf360a4dea4.tar.gz
libvpx-3c810ef79cfebdfb9512811e4424acf360a4dea4.tar.bz2
libvpx-3c810ef79cfebdfb9512811e4424acf360a4dea4.zip
Merge "Removing last_source field from VP9_COMP."
-rw-r--r--vp9/encoder/vp9_encoder.c11
-rw-r--r--vp9/encoder/vp9_encoder.h1
2 files changed, 5 insertions, 7 deletions
diff --git a/vp9/encoder/vp9_encoder.c b/vp9/encoder/vp9_encoder.c
index 1aa8b9584..4ba9e079e 100644
--- a/vp9/encoder/vp9_encoder.c
+++ b/vp9/encoder/vp9_encoder.c
@@ -2461,6 +2461,7 @@ int vp9_get_compressed_data(VP9_COMP *cpi, unsigned int *frame_flags,
RATE_CONTROL *const rc = &cpi->rc;
struct vpx_usec_timer cmptimer;
YV12_BUFFER_CONFIG *force_src_buffer = NULL;
+ struct lookahead_entry *last_source = NULL;
MV_REFERENCE_FRAME ref_frame;
int arf_src_index;
@@ -2474,7 +2475,6 @@ int vp9_get_compressed_data(VP9_COMP *cpi, unsigned int *frame_flags,
vpx_usec_timer_start(&cmptimer);
cpi->source = NULL;
- cpi->last_source = NULL;
vp9_set_high_precision_mv(cpi, ALTREF_HIGH_PRECISION_MV);
@@ -2537,11 +2537,11 @@ int vp9_get_compressed_data(VP9_COMP *cpi, unsigned int *frame_flags,
if (cm->current_video_frame > 0) {
#if CONFIG_SPATIAL_SVC
if (is_spatial_svc(cpi))
- cpi->last_source = vp9_svc_lookahead_peek(cpi, cpi->lookahead, -1, 0);
+ last_source = vp9_svc_lookahead_peek(cpi, cpi->lookahead, -1, 0);
else
#endif
- cpi->last_source = vp9_lookahead_peek(cpi->lookahead, -1);
- if (cpi->last_source == NULL)
+ last_source = vp9_lookahead_peek(cpi->lookahead, -1);
+ if (last_source == NULL)
return -1;
}
@@ -2565,8 +2565,7 @@ int vp9_get_compressed_data(VP9_COMP *cpi, unsigned int *frame_flags,
cpi->un_scaled_source = cpi->Source = force_src_buffer ? force_src_buffer
: &cpi->source->img;
- cpi->unscaled_last_source = cpi->last_source != NULL ?
- &cpi->last_source->img : NULL;
+ cpi->unscaled_last_source = last_source != NULL ? &last_source->img : NULL;
*time_stamp = cpi->source->ts_start;
*time_end = cpi->source->ts_end;
diff --git a/vp9/encoder/vp9_encoder.h b/vp9/encoder/vp9_encoder.h
index c3ff2211b..bdd12f366 100644
--- a/vp9/encoder/vp9_encoder.h
+++ b/vp9/encoder/vp9_encoder.h
@@ -235,7 +235,6 @@ typedef struct VP9_COMP {
struct lookahead_ctx *lookahead;
struct lookahead_entry *source;
struct lookahead_entry *alt_ref_source;
- struct lookahead_entry *last_source;
YV12_BUFFER_CONFIG *Source;
YV12_BUFFER_CONFIG *Last_Source; // NULL for first frame and alt_ref frames