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

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

Issue 415333002: libvpx: Pull from upstream (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/libvpx/
Patch Set: Created 6 years, 5 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/decoder/vp9_decodeframe.c ('k') | source/libvpx/vp9/encoder/vp9_encodeframe.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: source/libvpx/vp9/encoder/vp9_bitstream.c
===================================================================
--- source/libvpx/vp9/encoder/vp9_bitstream.c (revision 285372)
+++ source/libvpx/vp9/encoder/vp9_bitstream.c (working copy)
@@ -520,7 +520,7 @@
int i, j, k, l, t;
switch (cpi->sf.use_fast_coef_updates) {
case TWO_LOOP: {
- /* dry run to see if there is any udpate at all needed */
+ /* dry run to see if there is any update at all needed */
int savings = 0;
int update[2] = {0, 0};
for (i = 0; i < PLANE_TYPES; ++i) {
@@ -739,7 +739,6 @@
write_delta_q(wb, cm->uv_ac_delta_q);
}
-
static void encode_segmentation(VP9_COMP *cpi,
struct vp9_write_bit_buffer *wb) {
int i, j;
@@ -802,7 +801,6 @@
}
}
-
static void encode_txfm_probs(VP9_COMMON *cm, vp9_writer *w) {
// Mode
vp9_write_literal(w, MIN(cm->tx_mode, ALLOW_32X32), 2);
@@ -890,28 +888,28 @@
}
static int get_refresh_mask(VP9_COMP *cpi) {
- if (!cpi->multi_arf_allowed && cpi->refresh_golden_frame &&
- cpi->rc.is_src_frame_alt_ref && !cpi->use_svc) {
- // Preserve the previously existing golden frame and update the frame in
- // the alt ref slot instead. This is highly specific to the use of
- // alt-ref as a forward reference, and this needs to be generalized as
- // other uses are implemented (like RTC/temporal scaling)
- //
- // gld_fb_idx and alt_fb_idx need to be swapped for future frames, but
- // that happens in vp9_encoder.c:update_reference_frames() so that it can
- // be done outside of the recode loop.
- return (cpi->refresh_last_frame << cpi->lst_fb_idx) |
- (cpi->refresh_golden_frame << cpi->alt_fb_idx);
- } else {
- int arf_idx = cpi->alt_fb_idx;
- if ((cpi->pass == 2) && cpi->multi_arf_allowed) {
- const GF_GROUP *const gf_group = &cpi->twopass.gf_group;
- arf_idx = gf_group->arf_update_idx[gf_group->index];
- }
- return (cpi->refresh_last_frame << cpi->lst_fb_idx) |
- (cpi->refresh_golden_frame << cpi->gld_fb_idx) |
- (cpi->refresh_alt_ref_frame << arf_idx);
+ if (!cpi->multi_arf_allowed && cpi->refresh_golden_frame &&
+ cpi->rc.is_src_frame_alt_ref && !cpi->use_svc) {
+ // Preserve the previously existing golden frame and update the frame in
+ // the alt ref slot instead. This is highly specific to the use of
+ // alt-ref as a forward reference, and this needs to be generalized as
+ // other uses are implemented (like RTC/temporal scaling)
+ //
+ // gld_fb_idx and alt_fb_idx need to be swapped for future frames, but
+ // that happens in vp9_encoder.c:update_reference_frames() so that it can
+ // be done outside of the recode loop.
+ return (cpi->refresh_last_frame << cpi->lst_fb_idx) |
+ (cpi->refresh_golden_frame << cpi->alt_fb_idx);
+ } else {
+ int arf_idx = cpi->alt_fb_idx;
+ if ((cpi->pass == 2) && cpi->multi_arf_allowed) {
+ const GF_GROUP *const gf_group = &cpi->twopass.gf_group;
+ arf_idx = gf_group->arf_update_idx[gf_group->index];
}
+ return (cpi->refresh_last_frame << cpi->lst_fb_idx) |
+ (cpi->refresh_golden_frame << cpi->gld_fb_idx) |
+ (cpi->refresh_alt_ref_frame << arf_idx);
+ }
}
static size_t encode_tiles(VP9_COMP *cpi, uint8_t *data_ptr) {
@@ -1068,11 +1066,11 @@
if (cm->profile == PROFILE_1 || cm->profile == PROFILE_3) {
vp9_wb_write_bit(wb, cm->subsampling_x);
vp9_wb_write_bit(wb, cm->subsampling_y);
- vp9_wb_write_bit(wb, 0); // has extra plane
+ vp9_wb_write_bit(wb, 0); // unused
}
} else {
assert(cm->profile == PROFILE_1 || cm->profile == PROFILE_3);
- vp9_wb_write_bit(wb, 0); // has extra plane
+ vp9_wb_write_bit(wb, 0); // unused
}
write_frame_size(cm, wb);
@@ -1223,4 +1221,3 @@
*size = data - dest;
}
-
« no previous file with comments | « source/libvpx/vp9/decoder/vp9_decodeframe.c ('k') | source/libvpx/vp9/encoder/vp9_encodeframe.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698