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

Unified Diff: media/gpu/h264_decoder.h

Issue 2538883002: Detect H264 slices of the same frame in VEAUnittest (Closed)
Patch Set: Refactor into static methods. Created 4 years 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
Index: media/gpu/h264_decoder.h
diff --git a/media/gpu/h264_decoder.h b/media/gpu/h264_decoder.h
index 1caf662a7a6fa07b68b069321e014195fd6f28fd..5fb46e6de85201d5b88a1cd283283cb76e1e5a1f 100644
--- a/media/gpu/h264_decoder.h
+++ b/media/gpu/h264_decoder.h
@@ -111,6 +111,19 @@ 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,
+ int curr_sps_id,
+ const H264Parser& parser,
+ const H264SliceHeader* slice_hdr);
+
+ // Return true if we can initialize |pic| with the given info.
+ static bool InitPictureFromSliceHeader(int curr_sps_id,
+ const H264Parser& parser,
+ const H264SliceHeader* slice_hdr,
+ scoped_refptr<H264Picture> pic);
+
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 +152,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') | media/gpu/h264_decoder.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698