diff options
author | John Koleszar <jkoleszar@google.com> | 2013-01-14 14:44:39 -0800 |
---|---|---|
committer | John Koleszar <jkoleszar@google.com> | 2013-01-15 17:36:39 -0800 |
commit | b8e027989f166cbfc23821bcffbb80ba1427ab6f (patch) | |
tree | b43491152434f953f3a5c5f042b98b03f10ff91b /vp9/encoder | |
parent | 9bf73f46f9ce98be0f62d5f858be3e2100ddae5d (diff) | |
download | libvpx-b8e027989f166cbfc23821bcffbb80ba1427ab6f.tar libvpx-b8e027989f166cbfc23821bcffbb80ba1427ab6f.tar.gz libvpx-b8e027989f166cbfc23821bcffbb80ba1427ab6f.tar.bz2 libvpx-b8e027989f166cbfc23821bcffbb80ba1427ab6f.zip |
Remove buffer-to-buffer copy logic
This is the first in a series of commits to add additional reference
frames to the codec. Each frame will be able to update any of the
available references, but copying between references is not
supported.
Change-Id: I5945b5ce6cc3582c495102b4e7eed4f08c44d5a1
Diffstat (limited to 'vp9/encoder')
-rw-r--r-- | vp9/encoder/vp9_bitstream.c | 13 | ||||
-rw-r--r-- | vp9/encoder/vp9_onyx_if.c | 41 |
2 files changed, 0 insertions, 54 deletions
diff --git a/vp9/encoder/vp9_bitstream.c b/vp9/encoder/vp9_bitstream.c index 61aac5cd1..148975205 100644 --- a/vp9/encoder/vp9_bitstream.c +++ b/vp9/encoder/vp9_bitstream.c @@ -1776,19 +1776,6 @@ void vp9_pack_bitstream(VP9_COMP *cpi, unsigned char *dest, vp9_write_bit(&header_bc, pc->refresh_golden_frame); vp9_write_bit(&header_bc, pc->refresh_alt_ref_frame); - // For inter frames the current default behavior is that when - // cm->refresh_golden_frame is set we copy the old GF over to - // the ARF buffer. This is purely an encoder decision at present. - if (pc->refresh_golden_frame) - pc->copy_buffer_to_arf = 2; - - // If not being updated from current frame should either GF or ARF be updated from another buffer - if (!pc->refresh_golden_frame) - vp9_write_literal(&header_bc, pc->copy_buffer_to_gf, 2); - - if (!pc->refresh_alt_ref_frame) - vp9_write_literal(&header_bc, pc->copy_buffer_to_arf, 2); - // Indicate reference frame sign bias for Golden and ARF frames (always 0 for last frame buffer) vp9_write_bit(&header_bc, pc->ref_frame_sign_bias[GOLDEN_FRAME]); vp9_write_bit(&header_bc, pc->ref_frame_sign_bias[ALTREF_FRAME]); diff --git a/vp9/encoder/vp9_onyx_if.c b/vp9/encoder/vp9_onyx_if.c index fbdc2d2cc..c133bf23d 100644 --- a/vp9/encoder/vp9_onyx_if.c +++ b/vp9/encoder/vp9_onyx_if.c @@ -2578,51 +2578,15 @@ static void update_reference_frames(VP9_COMMON *cm) { cm->alt_fb_idx = cm->gld_fb_idx = cm->new_fb_idx; } else { /* For non key frames */ if (cm->refresh_alt_ref_frame) { - assert(!cm->copy_buffer_to_arf); - cm->yv12_fb[cm->new_fb_idx].flags |= VP9_ALT_FLAG; cm->yv12_fb[cm->alt_fb_idx].flags &= ~VP9_ALT_FLAG; cm->alt_fb_idx = cm->new_fb_idx; - } else if (cm->copy_buffer_to_arf) { - assert(!(cm->copy_buffer_to_arf & ~0x3)); - - if (cm->copy_buffer_to_arf == 1) { - if (cm->alt_fb_idx != cm->lst_fb_idx) { - yv12_fb[cm->lst_fb_idx].flags |= VP9_ALT_FLAG; - yv12_fb[cm->alt_fb_idx].flags &= ~VP9_ALT_FLAG; - cm->alt_fb_idx = cm->lst_fb_idx; - } - } else { /* if (cm->copy_buffer_to_arf == 2) */ - if (cm->alt_fb_idx != cm->gld_fb_idx) { - yv12_fb[cm->gld_fb_idx].flags |= VP9_ALT_FLAG; - yv12_fb[cm->alt_fb_idx].flags &= ~VP9_ALT_FLAG; - cm->alt_fb_idx = cm->gld_fb_idx; - } - } } if (cm->refresh_golden_frame) { - assert(!cm->copy_buffer_to_gf); - cm->yv12_fb[cm->new_fb_idx].flags |= VP9_GOLD_FLAG; cm->yv12_fb[cm->gld_fb_idx].flags &= ~VP9_GOLD_FLAG; cm->gld_fb_idx = cm->new_fb_idx; - } else if (cm->copy_buffer_to_gf) { - assert(!(cm->copy_buffer_to_arf & ~0x3)); - - if (cm->copy_buffer_to_gf == 1) { - if (cm->gld_fb_idx != cm->lst_fb_idx) { - yv12_fb[cm->lst_fb_idx].flags |= VP9_GOLD_FLAG; - yv12_fb[cm->gld_fb_idx].flags &= ~VP9_GOLD_FLAG; - cm->gld_fb_idx = cm->lst_fb_idx; - } - } else { /* if (cm->copy_buffer_to_gf == 2) */ - if (cm->alt_fb_idx != cm->gld_fb_idx) { - yv12_fb[cm->alt_fb_idx].flags |= VP9_GOLD_FLAG; - yv12_fb[cm->gld_fb_idx].flags &= ~VP9_GOLD_FLAG; - cm->gld_fb_idx = cm->alt_fb_idx; - } - } } } @@ -2786,10 +2750,6 @@ static void encode_frame_to_data_rate(VP9_COMP *cpi, cpi->output_frame_rate); } - // Default turn off buffer to buffer copying - cm->copy_buffer_to_gf = 0; - cm->copy_buffer_to_arf = 0; - // Clear zbin over-quant value and mode boost values. cpi->zbin_over_quant = 0; cpi->zbin_mode_boost = 0; @@ -3810,7 +3770,6 @@ static int frame_is_reference(const VP9_COMP *cpi) { return cm->frame_type == KEY_FRAME || cm->refresh_last_frame || cm->refresh_golden_frame || cm->refresh_alt_ref_frame - || cm->copy_buffer_to_gf || cm->copy_buffer_to_arf || cm->refresh_entropy_probs || xd->mode_ref_lf_delta_update || xd->update_mb_segmentation_map || xd->update_mb_segmentation_data; |