[FFmpeg-devel] [PATCH] Issue1247 - libavcodec/snow.c:2357: pred_block: Assertion `b_w>1 && b_h>1' failed.

Michael Niedermayer michaelni
Thu Jul 16 02:40:09 CEST 2009


On Wed, Jul 15, 2009 at 10:36:37PM +0100, Chris Stones wrote:
> On Wed, Jul 15, 2009 at 10:20 PM, Diego Biurrun <diego at biurrun.de> wrote:
> 
> > On Wed, Jul 15, 2009 at 10:03:15PM +0100, Chris Stones wrote:
> > > Hi, This my first patch submit, im a bit of a stranger here so please
> > > forgive if I've made a mistake.
> >
> > You sent a context diff instead of a unified diff.  Since this happens
> > every once in a while I would like to know how you produced it and why.
> >
> >
> Sorry, please find attached the unified diff.
> How i produced the assertion ?
> It happens frequently when encoding snow video with low resolution.
> There is more info in the tracker, along with some sample media.
> 
> ffmpeg -i sample_media -vcodec snow -strict -2 -an -s 74x68 -f nut
> output.snow.nut
> 
> The scaling is not part of the problem, encoding png's already this size can
> auto trigger the assertion.
> 
> Thanks.
> Chris Stones,

>  snow.c |    4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> c0712a8084aaf0b350594efe566564b875835eb7  issue1247.patch
> --- ffmpeg/libavcodec/snow.c	2009-07-15 12:41:13.963453170 +0100
> +++ ffmpeg/libavcodec/snow.c	2009-07-15 12:56:17.197453349 +0100
> @@ -2354,9 +2354,9 @@
>          }
>  //        assert(b_w == b_h || 2*b_w == b_h || b_w == 2*b_h);
>  //        assert(!(b_w&(b_w-1)));
> -        assert(b_w>1 && b_h>1);
> +//        assert(b_w>1 && b_h>1);
>          assert((tab_index>=0 && tab_index<4) || b_w==32);
> -        if((dx&3) || (dy&3) || !(b_w == b_h || 2*b_w == b_h || b_w == 2*b_h) || (b_w&(b_w-1)) || !s->plane[plane_index].fast_mc )
> +        if((b_w<=1) || (b_h<=1) || (dx&3) || (dy&3) || !(b_w == b_h || 2*b_w == b_h || b_w == 2*b_h) || (b_w&(b_w-1)) || !s->plane[plane_index].fast_mc )

It might be better to pad the buffers to avoid such sizes

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Why not whip the teacher when the pupil misbehaves? -- Diogenes of Sinope
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090716/cfb67873/attachment.pgp>



More information about the ffmpeg-devel mailing list