Field-based HEVC treated incorrectly
Hello,
I have just uploaded two samples to your server: src13_interlaced.265 (originally from FFmpeg ticket 5514) and a sample from FFmpeg ticket 4141). Both have field_seq_flag
set to 1
in the VUI section of the SPS, which means that the coded pictures are actually coded fields, not frames (although they may be fields of progressive frames (this is given in detail in picture timing SEI messages that are mandatory when field_seq_flag
is set to 1
)). The pic_width/height_in_luma_samples
and the conformance cropping window only refer to a picture and so in this case they only contain the field dimensions, not the frame dimensions. The dimensions derived from this end up in the pixel and display dimensions, although the semantics of all these fields refer to "video frames". And if an MPEG-2 or H.264 video uses separately coded fields, then the dimensions refer to the frames, too, not the fields. (I'd love to point to a proper Codec Mapping for HEVC (or to something more recent than the draft linked to below), but there is no Codec Mapping and I don't have something newer than that.)
(Furthermore, the draft of the encapsulation of HEVC in mp4 from the Matroska mailing list also says that the VisualSampleEntry
should contain the frame dimensions and if I am not mistaken, then this field contains the equivalent of Matroska's pixel dimensions.)
Greetings Andi
PS: As you can see from the above tickets FFmpeg doesn't handle field-based HEVC correctly; and Mediainfo is wrong, too. (Or is my version outdated? -- I'll investigate.)