[FFmpeg-devel] [libav-devel] Enabling frame sizes changes with FF_THREAD_FRAMEs globally.

Michael Niedermayer michaelni at gmx.at
Fri Mar 16 05:59:27 CET 2012


On Sat, Mar 10, 2012 at 10:56:13AM -0800, Ronald S. Bultje wrote:
> Hi,
> 
> On Fri, Mar 9, 2012 at 2:52 PM, Dale Curtis <dalecurtis at chromium.org> wrote:
> > Are there still any outstanding issues with enabling frame size changes with
> > multiple threads globally? H264 and H263 have codec specific checks in
> > place. Ronald suspects RV40 and MPEG codecs may have issues. Are there any
> > others? Or other concerns to be aware of? I'm curious because, the Chromium
> > team would like to enable this for VP8 frame size changes.
> >
> > diff --git a/libavcodec/utils.c b/libavcodec/utils.c
> > index 23ab832..9f409fb 100644
> > --- a/libavcodec/utils.c
> > +++ b/libavcodec/utils.c
> > @@ -425,11 +425,6 @@ static int video_get_buffer(AVCodecContext *s, AVFrame
> > *pic)
> >      buf = &avci->buffer[avci->buffer_count];
> >
> >      if(buf->base[0] && (buf->width != w || buf->height != h || buf->pix_fmt
> > != s->pix_fmt)){
> > -        if(s->active_thread_type&FF_THREAD_FRAME) {
> > -            av_log_missing_feature(s, "Width/height changing with frame
> > threads is", 0);
> > -            return -1;
> > -        }
> > -
> 
> Just to be clear, for VP8 I think this is well-tested, and for
> intra-codecs I see no reason why it wouldn't work also. Main concern
> is that I'd like tests to ensure we don't break it.

Iam not convinced, at least your beloved fork crashes with memory
corruption litterally at the spot
and its not happening with -threads 1, well at least not with the tiny
set of inputs i used

avconv version v0.8-1007-gc95fefa, Copyright (c) 2000-2012 the Libav developers
  built on Mar 11 2012 23:46:11 with gcc 4.6.1
[matroska,webm @ 0x2810880] Unknown entry 0x43F7
[matroska,webm @ 0x2810880] Unknown entry 0x5285
[matroska,webm @ 0x2810880] Unknown entry 0x2AD7B9
[matroska,webm @ 0x2810880] Unknown entry 0x3304A3
[matroska,webm @ 0x2810880] Unknown entry 0x1F43B675
    Last message repeated 2 times
[matroska,webm @ 0x2810880] Estimating duration from bitrate, this may be inaccurate
Input #0, matroska,webm, from '/home/michael/videos/frame_size_change.webm':
  Duration: 00:00:09.96, start: 0.000000, bitrate: N/A
    Stream #0.0(eng): Video: vp8, yuv420p, 1920x1080, PAR 1:1 DAR 16:9, 29.92 tbr, 1k tbn (default)
[buffer @ 0x28130e0] w:1920 h:1080 pixfmt:yuv420p
Output #0, null, to 'pipe:':
  Metadata:
    encoder         : Lavf54.2.0
    Stream #0.0(eng): Video: rawvideo, yuv420p, 1920x1080 [PAR 1:1 DAR 16:9], q=2-31, 200 kb/s, 90k tbn, 1k tbc (default)
Stream mapping:
  Stream #0:0 -> #0:0 (vp8 -> rawvideo)
Press ctrl-c to stop encoding
Input stream #0:0 frame changed from size:1920x1080 fmt:yuv420p to size:160x90 fmt:yuv420p
[buffer @ 0x28132e0] w:160 h:90 pixfmt:yuv420p
[scale @ 0x2816140] w:160 h:90 fmt:yuv420p -> w:1920 h:1080 fmt:yuv420p flags:0x4
*** glibc detected *** /home/michael/libav/libav/avconv: malloc(): memory corruption: 0x00000000035902f0 ***

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Republics decline into democracies and democracies degenerate into
despotisms. -- Aristotle
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20120316/c9c336f0/attachment.asc>


More information about the ffmpeg-devel mailing list