VAVDA: Switch to using max_num_reorder_frames.
H.264 standard allows for an optional max_num_reorder_frames parameter to be specified in VUI parameters. When present, it indicates the maximum number of frames that may precede a given frame in decode order, but come after it in output order. This means, that if the number of decoded and not yet outputted frames exceeds max_num_reorder_frames, we are allowed to output until this no longer holds true. In case max_num_reorder_frames is not present, the value is to be inferred to be either 0 or equal to the size of DPB. In case of the latter, we would always have to wait until the DPB is full before outputting anything. This means we could incur visible stuttering whenever DPB had to be cleared (on IDRs, etc.). max_num_reorder_frames seems to be very common in streams these days however, so it should be a relatively rare occurrence. Relying on max_num_reorder_frames also gives us an ability to handle streams with negative POC values, which are produced by some camera models. TEST=video playbacks, vdatest, switchtests BUG=chromium:177692 Review URL: https://codereview.chromium.org/177583002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@255898 0039d316-1c4b-4281-b951-d872f2087c98
Showing
Please register or sign in to comment