Ticket #244 (open defect)

Opened 2 years ago

Last modified 7 months ago

rm muxer fails with frames larger than 64k byte

Reported by: ami_stuff Owned by:
Priority: normal Component: avformat
Version: unspecified Keywords: real
Cc: Blocked By:
Blocking: Reproduced by developer: yes
Analyzed by developer: yes

Description

pbm file:  https://ffmpeg.org/trac/ffmpeg/ticket/193

When I convert "bikerace.pbm" file to rv10

ffmpeg -i C:\bikerace.pbm -vcodec rv10 out.rm

everything works ok, but when I try to decode it I get error:

C:\>ffmpeg -i out.rm out.avi
ffmpeg version git-N-30155-g01a73d6, Copyright (c) 2000-2011 the FFmpeg develope
rs
  built on May 23 2011 03:43:18 with gcc 4.5.3
  configuration: --enable-gpl --enable-version3 --enable-memalign-hack --enable-
runtime-cpudetect --enable-avisynth --enable-bzlib --enable-frei0r --enable-libo
pencore-amrnb --enable-libopencore-amrwb --enable-libfreetype --enable-libgsm --
enable-libmp3lame --enable-libopenjpeg --enable-librtmp --enable-libschroedinger
 --enable-libspeex --enable-libtheora --enable-libvorbis --enable-libvpx --enabl
e-libx264 --enable-libxavs --enable-libxvid --enable-zlib --pkg-config=pkg-confi
g
  libavutil    51.  2. 1 / 51.  2. 1
  libavcodec   53.  6. 0 / 53.  6. 0
  libavformat  53.  2. 0 / 53.  2. 0
  libavdevice  53.  0. 0 / 53.  0. 0
  libavfilter   2. 10. 0 /  2. 10. 0
  libswscale    0. 14. 0 /  0. 14. 0
  libpostproc  51.  2. 0 / 51.  2. 0
Input #0, rm, from 'out.rm':
  Metadata:
    title           :
    author          :
    copyright       :
    comment         :
  Duration: 00:00:00.04, start: 0.000000, bitrate: 33538 kb/s
    Stream #0.0: Video: rv10, yuv420p, 550x423, 200 kb/s, 25 tbr, 1k tbn, 25 tbc

[buffer @ 01DE1620] w:550 h:423 pixfmt:yuv420p tb:1/1000000 sar:0/1 sws_param:
Output #0, avi, to 'out.avi':
  Metadata:
    INAM            :
    author          :
    ICOP            :
    ICMT            :
    ISFT            : Lavf53.2.0
    Stream #0.0: Video: mpeg4, yuv420p, 550x423, q=2-31, 200 kb/s, 25 tbn, 25 tb
c
Stream mapping:
  Stream #0.0 -> #0.0
Press [q] to stop, [?] for help
[rv10 @ 02360780] illegal ac vlc code at 15x7
[rv10 @ 02360780] ERROR at MB 15 7
frame=    0 fps=  0 q=0.0 Lsize=       6kB time=10000000000.00 bitrate=   0.0kbi
ts/s
video:0kB audio:0kB global headers:0kB muxing overhead 1.#INF00%

I think this is a bug in RV10 / RV20 encoder that it doesn't check which picture sizes are valid for this
codec, so probably a check like for H263 codec should be added to these codecs as well (I don't know
which picture sizes are valid for RV10 and RV10, but for example 320x240 resolution seems to work correctly, but for example is not allowed for h263).

libavcodec/mpegvideo_env.c:

    case CODEC_ID_H263:
        if (!CONFIG_H263_ENCODER)  return -1;
        if (ff_match_2uint16(h263_format, FF_ARRAY_ELEMS(h263_format), s->width, s->height) == 8) {
            av_log(avctx, AV_LOG_ERROR, "The specified picture size of %dx%d is not valid for the H.263 codec.\nValid sizes are 128x96, 176x144, 352x288, 704x576, and 1408x1152. Try H.263+.\n", s->width, s->height);
            return -1;
        }
        s->out_format = FMT_H263;
        s->obmc= (avctx->flags & CODEC_FLAG_OBMC) ? 1:0;
        avctx->delay=0;
        s->low_delay=1;
        break;

[...]

    case CODEC_ID_RV10:
        s->out_format = FMT_H263;
        avctx->delay=0;
        s->low_delay=1;
        break;
    case CODEC_ID_RV20:
        s->out_format = FMT_H263;
        avctx->delay=0;
        s->low_delay=1;
        s->modified_quant=1;
        s->h263_aic=1;
        s->h263_plus=1;
        s->loop_filter=1;
        s->unrestricted_mv= 0;
        break;

Change History

comment:1 Changed 2 years ago by michael

  • Status changed from new to open
  • Reproduced by developer set
  • Component changed from undetermined to avformat
  • Summary changed from add a check for input picture size in rv10/rv20 encoders to rm muxer fails with frames larger than 64k byte
  • Keywords rm muxer added
  • Analyzed by developer set

The problem is in the RM muxer which does not fully support frames that need more than 64k byte

comment:2 Changed 7 months ago by cehoyos

  • Keywords real added; rm muxer removed
Note: See TracTickets for help on using tickets.