Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(108)

Unified Diff: source/libvpx/vp9/encoder/vp9_svc_layercontext.c

Issue 1302353004: libvpx: Pull from upstream (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/libvpx.git@master
Patch Set: Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « source/libvpx/vp9/encoder/vp9_ssim.c ('k') | source/libvpx/vp9/encoder/vp9_temporal_filter.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: source/libvpx/vp9/encoder/vp9_svc_layercontext.c
diff --git a/source/libvpx/vp9/encoder/vp9_svc_layercontext.c b/source/libvpx/vp9/encoder/vp9_svc_layercontext.c
index 1b35ac9b61e2d1c24d61df0381499023d868b552..b619840b0fdb8f628ac2b289a4909fa7c58b7d28 100644
--- a/source/libvpx/vp9/encoder/vp9_svc_layercontext.c
+++ b/source/libvpx/vp9/encoder/vp9_svc_layercontext.c
@@ -15,7 +15,7 @@
#include "vp9/encoder/vp9_extend.h"
#define SMALL_FRAME_FB_IDX 7
-#define SMALL_FRAME_WIDTH 16
+#define SMALL_FRAME_WIDTH 32
#define SMALL_FRAME_HEIGHT 16
void vp9_init_layer_context(VP9_COMP *const cpi) {
@@ -28,7 +28,7 @@ void vp9_init_layer_context(VP9_COMP *const cpi) {
svc->temporal_layer_id = 0;
if (cpi->oxcf.error_resilient_mode == 0 && cpi->oxcf.pass == 2) {
- if (vp9_realloc_frame_buffer(&cpi->svc.empty_frame.img,
+ if (vpx_realloc_frame_buffer(&cpi->svc.empty_frame.img,
SMALL_FRAME_WIDTH, SMALL_FRAME_HEIGHT,
cpi->common.subsampling_x,
cpi->common.subsampling_y,
@@ -113,8 +113,6 @@ void vp9_update_layer_context_change_config(VP9_COMP *const cpi,
if (svc->temporal_layering_mode != VP9E_TEMPORAL_LAYERING_MODE_NOLAYERING) {
for (sl = 0; sl < oxcf->ss_number_layers; ++sl) {
- spatial_layer_target = 0;
-
for (tl = 0; tl < oxcf->ts_number_layers; ++tl) {
layer = LAYER_IDS_TO_IDX(sl, tl, oxcf->ts_number_layers);
svc->layer_context[layer].target_bandwidth =
@@ -141,8 +139,8 @@ void vp9_update_layer_context_change_config(VP9_COMP *const cpi,
lrc->maximum_buffer_size =
(int64_t)(rc->maximum_buffer_size * bitrate_alloc);
lrc->bits_off_target =
- MIN(lrc->bits_off_target, lrc->maximum_buffer_size);
- lrc->buffer_level = MIN(lrc->buffer_level, lrc->maximum_buffer_size);
+ VPXMIN(lrc->bits_off_target, lrc->maximum_buffer_size);
+ lrc->buffer_level = VPXMIN(lrc->buffer_level, lrc->maximum_buffer_size);
lc->framerate = cpi->framerate / oxcf->ts_rate_decimator[tl];
lrc->avg_frame_bandwidth = (int)(lc->target_bandwidth / lc->framerate);
lrc->max_frame_bandwidth = rc->max_frame_bandwidth;
@@ -173,9 +171,9 @@ void vp9_update_layer_context_change_config(VP9_COMP *const cpi,
(int64_t)(rc->optimal_buffer_level * bitrate_alloc);
lrc->maximum_buffer_size =
(int64_t)(rc->maximum_buffer_size * bitrate_alloc);
- lrc->bits_off_target = MIN(lrc->bits_off_target,
- lrc->maximum_buffer_size);
- lrc->buffer_level = MIN(lrc->buffer_level, lrc->maximum_buffer_size);
+ lrc->bits_off_target = VPXMIN(lrc->bits_off_target,
+ lrc->maximum_buffer_size);
+ lrc->buffer_level = VPXMIN(lrc->buffer_level, lrc->maximum_buffer_size);
// Update framerate-related quantities.
if (svc->number_temporal_layers > 1 && cpi->oxcf.rc_mode == VPX_CBR) {
lc->framerate = cpi->framerate / oxcf->ts_rate_decimator[layer];
« no previous file with comments | « source/libvpx/vp9/encoder/vp9_ssim.c ('k') | source/libvpx/vp9/encoder/vp9_temporal_filter.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698