Opened 10 years ago

Closed 10 years ago

#3151 closed defect (fixed)

H.261 encoding: "-mbd rd" seems to confuse order of MBs in GOBs

Reported by: Maik Merten Owned by:
Priority: normal Component: avcodec
Version: git-master Keywords: h261
Cc: Blocked By:
Blocking: Reproduced by developer: yes
Analyzed by developer: no

Description

Summary of the bug:
How to reproduce:

% ffmpeg -i tmp/test.y4m -f h261 -vb 256k -mbd rd  /tmp/test.h261

ffmpeg version N-58246-g7d0e927 Copyright (c) 2000-2013 the FFmpeg developers
  built on Nov 18 2013 17:15:01 with gcc 4.8 (Ubuntu/Linaro 4.8.1-10ubuntu8)

Specifying the "-mbd rd" option for H.261 encoding results in massively corrupted output (see attached picture). From the looks of it, it appears that the position of macroblocks within a GOB gets messed up.

Intra frames are unaffected.

Bitrate does not get inflated, quite surprisingly. Internal reference stays intact, but failure to create a correct bitstream?

Attachments (1)

test.png (298.3 KB ) - added by Maik Merten 10 years ago.

Download all attachments as: .zip

Change History (4)

by Maik Merten, 10 years ago

Attachment: test.png added

comment:1 by Maik Merten, 10 years ago

Forgot to mention: Test sequence used is http://media.xiph.org/video/derf/y4m/sign_irene_cif.y4m

comment:2 by Carl Eugen Hoyos, 10 years ago

Keywords: h261 added
Reproduced by developer: set
Status: newopen
Version: unspecifiedgit-master

The output file shows heavy artefacts.

$ ffmpeg -f lavfi -i testsrc=s=352x288 -vb 256k -mbd rd -t 60 out.h261
ffmpeg version N-58249-g2974050 Copyright (c) 2000-2013 the FFmpeg developers
  built on Nov 18 2013 18:18:50 with gcc 4.7 (SUSE Linux)
  configuration: --enable-gpl
  libavutil      52. 53.100 / 52. 53.100
  libavcodec     55. 43.101 / 55. 43.101
  libavformat    55. 21.100 / 55. 21.100
  libavdevice    55.  5.100 / 55.  5.100
  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, lavfi, from 'testsrc=s=352x288':
  Duration: N/A, start: 0.000000, bitrate: N/A
    Stream #0:0: Video: rawvideo (RGB[24] / 0x18424752), rgb24, 352x288 [SAR 1:1 DAR 11:9], 25 tbr, 25 tbn, 25 tbc
Output #0, h261, to 'out.h261':
  Metadata:
    encoder         : Lavf55.21.100
    Stream #0:0: Video: h261, yuv420p, 352x288 [SAR 1:1 DAR 11:9], q=2-31, 256 kb/s, 90k tbn, 25 tbc
Stream mapping:
  Stream #0:0 -> #0:0 (rawvideo -> h261)
Press [q] to stop, [?] for help
frame= 1500 fps=877 q=9.3 Lsize=    2217kB time=00:01:00.00 bitrate= 302.7kbits/s
video:2217kB audio:0kB subtitle:0 global headers:0kB muxing overhead 0.000000%

comment:3 by Michael Niedermayer, 10 years ago

Resolution: fixed
Status: openclosed

Fixed in ec312c1fd0d8651f6ef34a101a56c0332e65702e and th previous commit

Note: See TracTickets for help on using tickets.