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

Unified Diff: media/gpu/h264_decoder.h

Issue 2538883002: Detect H264 slices of the same frame in VEAUnittest (Closed)
Patch Set: Created 3 years, 10 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 | « media/gpu/BUILD.gn ('k') | media/gpu/h264_decoder.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/gpu/h264_decoder.h
diff --git a/media/gpu/h264_decoder.h b/media/gpu/h264_decoder.h
index 1caf662a7a6fa07b68b069321e014195fd6f28fd..7db95f7c596dd5f4faa3066f42622b7c7133b386 100644
--- a/media/gpu/h264_decoder.h
+++ b/media/gpu/h264_decoder.h
@@ -111,6 +111,18 @@ class MEDIA_GPU_EXPORT H264Decoder : public AcceleratedVideoDecoder {
gfx::Size GetPicSize() const override;
size_t GetRequiredNumOfPictures() const override;
+ // Return true if we need to start a new picture.
+ static bool IsNewPrimaryCodedPicture(scoped_refptr<H264Picture> curr_pic,
+ int curr_pps_id,
+ const H264SPS* sps,
+ const H264SliceHeader& slice_hdr);
+
+ // Create a H264Picture from given params. Return nullptr when there is an
+ // error.
+ static scoped_refptr<H264Picture> CreateH264PictureFromSliceHeader(
+ const H264SPS* sps,
+ const H264SliceHeader& slice_hdr);
+
private:
// We need to keep at most kDPBMaxSize pictures in DPB for
// reference/to display later and an additional one for the one currently
@@ -139,9 +151,6 @@ class MEDIA_GPU_EXPORT H264Decoder : public AcceleratedVideoDecoder {
// Process current slice as a slice of the current picture.
bool ProcessCurrentSlice();
- // Return true if we need to start a new picture.
- bool IsNewPrimaryCodedPicture(const H264SliceHeader* slice_hdr) const;
-
// Initialize the current picture according to data in |slice_hdr|.
bool InitCurrPicture(const H264SliceHeader* slice_hdr);
« no previous file with comments | « media/gpu/BUILD.gn ('k') | media/gpu/h264_decoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698