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

Side by Side Diff: trunk/src/content/common/gpu/media/vaapi_h264_decoder.cc

Issue 357903003: Revert 279958 "Revert "Revert 279650 "Add VaapiVideoEncodeAccele..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 years, 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <algorithm> 5 #include <algorithm>
6 #include <limits> 6 #include <limits>
7 7
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/bind_helpers.h" 9 #include "base/bind_helpers.h"
10 #include "base/numerics/safe_conversions.h" 10 #include "base/numerics/safe_conversions.h"
(...skipping 470 matching lines...) Expand 10 before | Expand all | Expand 10 after
481 bool VaapiH264Decoder::DecodePicture() { 481 bool VaapiH264Decoder::DecodePicture() {
482 DCHECK(curr_pic_.get()); 482 DCHECK(curr_pic_.get());
483 483
484 DVLOG(4) << "Decoding POC " << curr_pic_->pic_order_cnt; 484 DVLOG(4) << "Decoding POC " << curr_pic_->pic_order_cnt;
485 DecodeSurface* dec_surface = DecodeSurfaceByPoC(curr_pic_->pic_order_cnt); 485 DecodeSurface* dec_surface = DecodeSurfaceByPoC(curr_pic_->pic_order_cnt);
486 if (!dec_surface) { 486 if (!dec_surface) {
487 DVLOG(1) << "Asked to decode an invalid POC " << curr_pic_->pic_order_cnt; 487 DVLOG(1) << "Asked to decode an invalid POC " << curr_pic_->pic_order_cnt;
488 return false; 488 return false;
489 } 489 }
490 490
491 if (!vaapi_wrapper_->ExecuteAndDestroyPendingBuffers( 491 if (!vaapi_wrapper_->DecodeAndDestroyPendingBuffers(
492 dec_surface->va_surface()->id())) { 492 dec_surface->va_surface()->id())) {
493 DVLOG(1) << "Failed decoding picture"; 493 DVLOG(1) << "Failed decoding picture";
494 return false; 494 return false;
495 } 495 }
496 496
497 return true; 497 return true;
498 } 498 }
499 499
500 bool VaapiH264Decoder::InitCurrPicture(media::H264SliceHeader* slice_hdr) { 500 bool VaapiH264Decoder::InitCurrPicture(media::H264SliceHeader* slice_hdr) {
501 DCHECK(curr_pic_.get()); 501 DCHECK(curr_pic_.get());
502 502
(...skipping 1178 matching lines...) Expand 10 before | Expand all | Expand 10 after
1681 break; 1681 break;
1682 } 1682 }
1683 } 1683 }
1684 } 1684 }
1685 1685
1686 size_t VaapiH264Decoder::GetRequiredNumOfPictures() { 1686 size_t VaapiH264Decoder::GetRequiredNumOfPictures() {
1687 return dpb_.max_num_pics() + kPicsInPipeline; 1687 return dpb_.max_num_pics() + kPicsInPipeline;
1688 } 1688 }
1689 1689
1690 } // namespace content 1690 } // namespace content
OLDNEW
« no previous file with comments | « trunk/src/content/common/gpu/media/va.sigs ('k') | trunk/src/content/common/gpu/media/vaapi_h264_decoder_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698