[FFmpeg-trac] #5732(avcodec:new): Display corruption on very high-bitrate H.264 files

FFmpeg trac at avcodec.org
Sun Jul 24 17:33:00 EEST 2016


#5732: Display corruption on very high-bitrate H.264 files
------------------------------------+-----------------------------------
             Reporter:  Sesse       |                    Owner:
                 Type:  defect      |                   Status:  new
             Priority:  normal      |                Component:  avcodec
              Version:  git-master  |               Resolution:
             Keywords:              |               Blocked By:
             Blocking:              |  Reproduced by developer:  0
Analyzed by developer:  0           |
------------------------------------+-----------------------------------

Comment (by jkqxz):

 Ok, with that stream I have exactly the same behaviour.

 The reference decoder says:
 {{{
 ----------------------------- JM 19.0 (FRExt)
 -----------------------------
  Input reference file                   : test_rec.yuv does not exist
                                           SNR values are not available
 Warning: zero_byte shall exist
 POC must = frame# or field# for SNRs to be correct
 --------------------------------------------------------------------------
   Frame          POC  Pic#   QP    SnrY     SnrU     SnrV   Y:U:V Time(ms)
 --------------------------------------------------------------------------
 00000(IDR)        0     0    15                             4:2:0    1232
 00001( P )        3     1    15                             4:2:0    1232
 00000( b )        1     2    15                             4:2:0    1204
 00001( b )        2     2    15                             4:2:0    1209
 00003( P )        6     2    15                             4:2:0    1228
 00002( b )        4     3    15                             4:2:0    1215
 00002( b )        5     3    15                             4:2:0    1256
 WARNING! Vertical motion vector 2076 is out of allowed range {-2048, 2047}
 in picture 0, macroblock 53
 WARNING! Vertical motion vector 2111 is out of allowed range {-2048, 2047}
 in picture 0, macroblock 53
 WARNING! Vertical motion vector 2060 is out of allowed range {-2048, 2047}
 in picture 0, macroblock 53
 WARNING! Vertical motion vector 2130 is out of allowed range {-2048, 2047}
 in picture 0, macroblock 53
 WARNING! Vertical motion vector 6167 is out of allowed range {-2048, 2047}
 in picture 0, macroblock 53
 WARNING! Vertical motion vector 2049 is out of allowed range {-2048, 2047}
 in picture 0, macroblock 54
 WARNING! Vertical motion vector 2053 is out of allowed range {-2048, 2047}
 in picture 0, macroblock 54
 WARNING! Vertical motion vector 6203 is out of allowed range {-2048, 2047}
 in picture 0, macroblock 54
 WARNING! Vertical motion vector 6184 is out of allowed range {-2048, 2047}
 in picture 0, macroblock 54
 WARNING! Vertical motion vector 6176 is out of allowed range {-2048, 2047}
 in picture 0, macroblock 54
 WARNING! Vertical motion vector 10235 is out of allowed range {-2048,
 2047} in picture 0, macroblock 54
 WARNING! Vertical motion vector 10316 is out of allowed range {-2048,
 2047} in picture 0, macroblock 54
 WARNING! Vertical motion vector 10300 is out of allowed range {-2048,
 2047} in picture 0, macroblock 54
 WARNING! Vertical motion vector 10379 is out of allowed range {-2048,
 2047} in picture 0, macroblock 55
 WARNING! Vertical motion vector 10291 is out of allowed range {-2048,
 2047} in picture 0, macroblock 55
 WARNING! Vertical motion vector 14398 is out of allowed range {-2048,
 2047} in picture 0, macroblock 55
 WARNING! Vertical motion vector 14469 is out of allowed range {-2048,
 2047} in picture 0, macroblock 55
 }}}
 (... and more)

 Looking at the trace output for that macroblock and the following one, we
 see that it really is getting huge vectors there:
 {{{
 *********** POC: 9 (I/P) MB: 53 Slice: 0 Type 0 **********
 @6330520 mb_skip_flag                                                    (
 1)
 @6330521 mb_type                                                         (
 4)
 @6330522 sub_mb_type                                                     (
 1)
 @6330523 sub_mb_type                                                     (
 2)
 @6330524 sub_mb_type                                                     (
 1)
 @6330525 sub_mb_type                                                     (
 1)
 @6330526 mvd_l0
 (-52)
 @6330527 mvd_l0                                                          (
 22)
 @6330528 mvd_l0
 (-14)
 @6330529 mvd_l0                                                          (
 74)
 @6330530 mvd_l0                                                          (
 4)
 @6330531 mvd_l0
 (-10)
 @6330532 mvd_l0
 (-12)
 @6330533 mvd_l0                                                          (
 29)
 @6330534 mvd_l0                                                          (
 -6)
 @6330535 mvd_l0                                                          (
 97)
 @6330536 mvd_l0                                                          (
 81)
 @6330537 mvd_l0                                                          (
 60)
 @6330538 mvd_l0                                                          (
 69)
 @6330539 mvd_l0                                                          (
 54)
 @6330540 mvd_l0
 (-48)
 @6330541 mvd_l0
 (4056)
 @6330542 coded_block_pattern                                             (
 31)
 @6330543 mb_qp_delta                                                     (
 0)
 }}}
 {{{
 *********** POC: 9 (I/P) MB: 54 Slice: 0 Type 0 **********
 @6330801 mb_skip_flag                                                    (
 1)
 @6330802 mb_type                                                         (
 4)
 @6330803 sub_mb_type                                                     (
 1)
 @6330804 sub_mb_type                                                     (
 1)
 @6330805 sub_mb_type                                                     (
 2)
 @6330806 sub_mb_type                                                     (
 1)
 @6330807 mvd_l0                                                          (
 0)
 @6330808 mvd_l0                                                          (
 6)
 @6330809 mvd_l0
 (-44)
 @6330810 mvd_l0                                                          (
 10)
 @6330811 mvd_l0                                                          (
 0)
 @6330812 mvd_l0
 (4154)
 @6330813 mvd_l0
 (-52)
 @6330814 mvd_l0
 (4131)
 @6330815 mvd_l0
 (-15)
 @6330816 mvd_l0
 (4123)
 @6330817 mvd_l0
 (111)
 @6330818 mvd_l0
 (4059)
 @6330819 mvd_l0
 (-17)
 @6330820 mvd_l0
 (4132)
 @6330821 mvd_l0
 (-47)
 @6330822 mvd_l0                                                          (
 65)
 @6330823 coded_block_pattern                                             (
 31)
 @6330824 mb_qp_delta                                                     (
 0)
 }}}

 The [-2048,2047] is in qpels, so the ~2000 numbers are just about
 plausible as ~500 pixels in the 1280x720 stream (but still outside the
 level limits).  However, the following vectors over 6000 qpels are just
 wrong (larger than the frame), suggesting an encoder bug.  For the VAAPI
 decode to work, presumably the Intel hardware encoder and decoder use the
 same logic to interpret them and therefore get the same answer.

 Not sure what to do with that result.  Can you try a more recent version
 of the i965 VA driver on the encode in case this is a bug there that has
 been fixed?

--
Ticket URL: <https://trac.ffmpeg.org/ticket/5732#comment:10>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list