[FFmpeg-trac] #3185(FFprobe:new): ffprobe do not handle HEVC correctly

FFmpeg trac at avcodec.org
Sun Dec 1 01:03:39 CET 2013


#3185: ffprobe do not handle HEVC correctly
---------------------------------+---------------------------------------
             Reporter:  figgis   |                     Type:  defect
               Status:  new      |                 Priority:  normal
            Component:  FFprobe  |                  Version:  unspecified
             Keywords:           |               Blocked By:
             Blocking:           |  Reproduced by developer:  0
Analyzed by developer:  0        |
---------------------------------+---------------------------------------
 Summary of the bug:
 How to reproduce:
 {{{
 I encoded some frames using the HM-encoder.
 This is what the decoder says:

 $ ./TAppDecoderStatic -b foreman_352x288.hevc

 HM software: Decoder Version [12.1][Linux][GCC 4.7.3][64 bit]

 POC    0 TId: 0 ( I-SLICE, QP 32 ) [DT  0.020] [L0 ] [L1 ] [:,,,(unk)]
 POC    1 TId: 0 ( P-SLICE, QP 35 ) [DT  0.000] [L0 0 ] [L1 ] [:,,,(unk)]
 POC    2 TId: 0 ( B-SLICE, QP 34 ) [DT  0.000] [L0 1 0 ] [L1 1 0 ]
 [:,,,(unk)]
 POC    3 TId: 0 ( B-SLICE, QP 35 ) [DT  0.010] [L0 2 1 0 ] [L1 2 1 0 ]
 [:,,,(unk)]
 POC    4 TId: 0 ( B-SLICE, QP 33 ) [DT  0.010] [L0 3 2 1 0 ] [L1 3 2 1 0 ]
 [:,,,(unk)]
  Total Time:        0.040 sec.

 This is the output from ffprobe for the first frame:
 $ ./ffprobe -show_frames ~/src/jctvc-hm/bin/foreman_352x288.hevc
 ffprobe version N-58684-gf068aed Copyright (c) 2007-2013 the FFmpeg
 developers
   built on Nov 30 2013 23:52:44 with gcc 4.7 (Ubuntu/Linaro
 4.7.3-1ubuntu1)
   configuration: --enable-libx264 --enable-gpl --enable-libmp3lame
   libavutil      52. 56.100 / 52. 56.100
   libavcodec     55. 44.100 / 55. 44.100
   libavformat    55. 21.102 / 55. 21.102
   libavdevice    55.  5.102 / 55.  5.102
   libavfilter     3. 91.100 /  3. 91.100
   libswscale      2.  5.101 /  2.  5.101
   libswresample   0. 17.104 /  0. 17.104
   libpostproc    52.  3.100 / 52.  3.100
 Input #0, hevc, from '/home/fp/src/jctvc-hm/bin/foreman_352x288.hevc':
   Duration: N/A, bitrate: N/A
     Stream #0:0: Video: hevc (Main), yuv420p(tv), 352x288, 25 fps, 25 tbr,
 1200k tbn, 25 tbc
 [FRAME]
 media_type=video
 key_frame=1
 pkt_pts=0
 pkt_pts_time=0.000000
 pkt_dts=0
 pkt_dts_time=0.000000
 pkt_duration=48000
 pkt_duration_time=0.040000
 pkt_pos=0
 pkt_size=3695
 width=352
 height=288
 pix_fmt=yuv420p
 sample_aspect_ratio=N/A
 pict_type=?
 coded_picture_number=0
 display_picture_number=0
 interlaced_frame=0
 top_field_first=0
 repeat_pict=0
 [/FRAME]

 in the above, pict_type do not display the correct frame-type, also
 coded_picture_number and display_picture_number always displays as zero.

 HEVC reference decoder/encoder uses the slize-type do determine the type,
 i.e. I, P, B.

 Valid code in the reference decoder is
 Lib/TLibDecoder/TDecGop.cpp:219

   Char c = (pcSlice->isIntra() ? 'I' : pcSlice->isInterP() ? 'P' : 'B');
   if (!pcSlice->isReferenced()) c += 32;

   //-- For time output for each slice
   printf("\nPOC %4d TId: %1d ( %c-SLICE, QP%3d ) ", pcSlice->getPOC(),
                                                     pcSlice->getTLayer(),
                                                     c,
                                                     pcSlice->getSliceQp()
 );

 See e.g. table 7.7, page 77. in HEVC-standard
 http://www.itu.int/rec/T-REC-H.265-201304-I/en

 }}}

--
Ticket URL: <https://trac.ffmpeg.org/ticket/3185>
FFmpeg <http://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list