HEVC: support of interlaced content (TFF/BFF, field height and frame rate)#2637
Open
tobbee wants to merge 1 commit into
Open
HEVC: support of interlaced content (TFF/BFF, field height and frame rate)#2637tobbee wants to merge 1 commit into
tobbee wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Fixes #1092
Reports interlacing for HEVC, mirroring the existing AVC behaviour. Until now HEVC
streams had no
ScanType/ScanOrder, and field-sequence streams were reported with thecoded field dimensions and rate (e.g. 1920×540 @ 50) instead of the frame values.
HEVC slice headers carry no
field_pic_flag/bottom_field_flag; field coding is signalledonly via metadata, all of which the parser already read and discarded, or stored:
field_seq_flag(VUI) — wasSkip_SBpic_struct/source_scan_type(pic_timing SEI) — wereSkip_S1general_progressive_source_flag/general_interlaced_source_flag(profile_tier_level)Behaviour
Fills
ScanType,ScanOrder(TFF/BFF),ScanType_StoreMethod(Interleaved vs Separated) and
Interlacement, frompic_struct(per Table D.2), with afallback to
source_scan_typeand theprofile_tier_levelconstraint flags when nopic_timing SEI is present.
For separated fields (
field_seq_flag=1,pic_struct∈ {1,2,9–12}) the coded picture is asingle field, so
Heightis doubled (1920×540 → 1920×1080) andFrameRateis halved(50 → 25) — this addresses @svart-riddare's point in Does not report interlacing on HEVC video contents #1092.
Field order for separated fields is derived from the parity of the first coded field of the
initial IRAP (analogous to AVC's
pic_struct_FirstDetected).Before / after
On a 1080i50 HEVC
.ts:Notes
I can provide a 1080i50 HEVC
.tssample for the test suite.Out of scope: frame doubling/tripling (
pic_struct7/8) rate handling — currently reportedas Progressive, unchanged.
Spec
ISO/IEC 23008-2 (H.265): Table D.2 (
pic_struct),source_scan_typesemantics,field_seq_flagsemantics (incl. NOTE 11 on field dimensions/rate).