#5514: Interlaced HEVC Steam not Decoded Properly
-------------------------------------+-----------------------------------
Reporter: jlsantiago0 | Owner:
Type: defect | Status: open
Priority: normal | Component: avcodec
Version: git-master | Resolution:
Keywords: hevc | Blocked By:
Blocking: | Reproduced by developer: 1
Analyzed by developer: 0 |
-------------------------------------+-----------------------------------
Comment (by tmm1):
I have a simple patch to make ffprobe report these hevc files as
interlaced. Not sure if it is completely correct though, as the spec was
hard for me to parse. See page 326 of Rec. ITU-T H.265 v7 (11/2019)
{{{
diff --git a/libavcodec/hevc_parser.c b/libavcodec/hevc_parser.c
index b444b99955..da9b9019e2 100644
--- a/libavcodec/hevc_parser.c
+++ b/libavcodec/hevc_parser.c
@@ -65,7 +65,24 @@ static int hevc_parse_slice_header(AVCodecParserContext
*s, H2645NAL *nal,
sh->first_slice_in_pic_flag = get_bits1(gb);
s->picture_structure = sei->picture_timing.picture_struct;
- s->field_order = sei->picture_timing.picture_struct;
+ switch (s->picture_structure) {
+ case 0:
+ s->field_order = AV_FIELD_PROGRESSIVE;
+ break;
+ case 1:
+ case 9:
+ case 11:
+ s->field_order = AV_FIELD_TT;
+ break;
+ case 2:
+ case 10:
+ case 12:
+ s->field_order = AV_FIELD_BB;
+ break;
+ default:
+ s->field_order = AV_FIELD_UNKNOWN;
+ break;
+ }
if (IS_IRAP_NAL(nal)) {
s->key_frame = 1;
}}}
--
Ticket URL: <https://trac.ffmpeg.org/ticket/5514#comment:11>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
_______________________________________________
FFmpeg-trac mailing list
[email protected]
https://ffmpeg.org/mailman/listinfo/ffmpeg-trac
To unsubscribe, visit link above, or email
[email protected] with subject "unsubscribe".