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

Unified Diff: media/video/h264_poc.cc

Issue 2272233002: VTVDA: Fix computation of |reorder_window|. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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/vt_video_decode_accelerator_mac.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/video/h264_poc.cc
diff --git a/media/video/h264_poc.cc b/media/video/h264_poc.cc
index 2934f25d3b79e8595717b95b807234fd0750f5f8..cfa91057e4490a63399da198204e15bcad6fb731 100644
--- a/media/video/h264_poc.cc
+++ b/media/video/h264_poc.cc
@@ -67,14 +67,13 @@ bool H264POC::ComputePicOrderCnt(
int32_t max_pic_order_cnt_lsb =
1 << (sps->log2_max_pic_order_cnt_lsb_minus4 + 4);
- // Check for invalid (including duplicate) |frame_num| values. All cases are
- // treated as gaps, which is to say that nothing is done. (Gaps don't affect
- // POC computation.)
- if (!slice_hdr.idr_pic_flag &&
- slice_hdr.frame_num != (prev_frame_num_ + 1) % max_frame_num) {
- if (!sps->gaps_in_frame_num_value_allowed_flag)
- DLOG(WARNING) << "Invalid gap in frame_num";
- }
+ // Note: Duplicate frame numbers are ignored. They occur in many videos
+ // despite appearing to be invalid according to the spec.
+ // TODO(sandersd): Check if these videos are using slices or have redundant
+ // streams.
+
+ // Note: Gaps in frame numbers are also ignored. They do not affect POC
+ // computation.
// Based on T-REC-H.264 8.2.1, "Decoding process for picture order
// count", available from http://www.itu.int/rec/T-REC-H.264.
« no previous file with comments | « media/gpu/vt_video_decode_accelerator_mac.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698