History

Avoid double copying of key frames into alt and golden buffer

Attila Nagy committed 15 years ago

Commit d8fc9741 parent 861175e1 file · +14 −8Browse files

Unified · Split

vp8/encoder/onyx_if.c+14−8
@@ -3130,8 +3130,11 @@ static void update_golden_frame_and_stats(VP8_COMP *cpi) · 3129 unmodified lines
3130 // Update the Golden frame reconstruction buffer if signalled and the GF usage counts.3130 // Update the Golden frame reconstruction buffer if signalled and the GF usage counts.
3131 if (cm->refresh_golden_frame)3131 if (cm->refresh_golden_frame)
3132 {3132 {
3133 // Update the golden frame buffer3133 if (cm->frame_type != KEY_FRAME)
3134 vp8_yv12_copy_frame_ptr(cm->frame_to_show, &cm->yv12_fb[cm->gld_fb_idx]);3134 {
3135 // Update the golden frame buffer
3136 vp8_yv12_copy_frame_ptr(cm->frame_to_show, &cm->yv12_fb[cm->gld_fb_idx]);
3137 }
3135 3138
3136 // Select an interval before next GF3139 // Select an interval before next GF
3137 if (!cpi->auto_gold)3140 if (!cpi->auto_gold)
@@ -4748,16 +4751,19 @@ static void encode_frame_to_data_rate · 1610 unmodified lines
4748 4751
4749 if (cpi->oxcf.error_resilient_mode)4752 if (cpi->oxcf.error_resilient_mode)
4750 {4753 {
4751 // Is this an alternate reference update4754 if (cm->frame_type != KEY_FRAME)
4752 if (cpi->common.refresh_alt_ref_frame)4755 {
4753 vp8_yv12_copy_frame_ptr(cm->frame_to_show, &cm->yv12_fb[cm->alt_fb_idx]);4756 // Is this an alternate reference update
4757 if (cm->refresh_alt_ref_frame)
4758 vp8_yv12_copy_frame_ptr(cm->frame_to_show, &cm->yv12_fb[cm->alt_fb_idx]);
4754 4759
4755 if (cpi->common.refresh_golden_frame)4760 if (cm->refresh_golden_frame)
4756 vp8_yv12_copy_frame_ptr(cm->frame_to_show, &cm->yv12_fb[cm->gld_fb_idx]);4761 vp8_yv12_copy_frame_ptr(cm->frame_to_show, &cm->yv12_fb[cm->gld_fb_idx]);
4762 }
4757 }4763 }
4758 else4764 else
4759 {4765 {
4760 if (cpi->oxcf.play_alternate && cpi->common.refresh_alt_ref_frame && (cpi->common.frame_type != KEY_FRAME))4766 if (cpi->oxcf.play_alternate && cm->refresh_alt_ref_frame && (cm->frame_type != KEY_FRAME))
4761 // Update the alternate reference frame and stats as appropriate.4767 // Update the alternate reference frame and stats as appropriate.
4762 update_alt_ref_frame_and_stats(cpi);4768 update_alt_ref_frame_and_stats(cpi);
4763 else4769 else

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t