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

Unified Diff: content/common/gpu/media/vaapi_video_encode_accelerator.cc

Issue 686283002: Vaapi VEA: always generate IDR when keyframe is requested. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/gpu/media/vaapi_video_encode_accelerator.cc
diff --git a/content/common/gpu/media/vaapi_video_encode_accelerator.cc b/content/common/gpu/media/vaapi_video_encode_accelerator.cc
index 14ffe34355012f74e4ce4e72c13f24ae8b915b7a..39c9ee9e6e09c51a57a7be71505258d79808e2ad 100644
--- a/content/common/gpu/media/vaapi_video_encode_accelerator.cc
+++ b/content/common/gpu/media/vaapi_video_encode_accelerator.cc
@@ -286,15 +286,13 @@ void VaapiVideoEncodeAccelerator::BeginFrame(bool force_keyframe) {
current_pic_.frame_num = frame_num_++;
frame_num_ %= idr_period_;
- if (current_pic_.frame_num % i_period_ == 0 || force_keyframe)
+ if (current_pic_.frame_num % i_period_ == 0 || force_keyframe) {
current_pic_.type = media::H264SliceHeader::kISlice;
- else
- current_pic_.type = media::H264SliceHeader::kPSlice;
-
- if (current_pic_.frame_num % idr_period_ == 0) {
Pawel Osciak 2014/10/30 00:09:46 This is generating IDR on each i_period, which is
hshi1 2014/10/30 00:18:01 Done.
current_pic_.idr = true;
last_idr_frame_num_ = current_pic_.frame_num;
ref_pic_list0_.clear();
+ } else {
+ current_pic_.type = media::H264SliceHeader::kPSlice;
}
if (current_pic_.type != media::H264SliceHeader::kBSlice)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698