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

Chris Stones chris.stones
Wed Jul 15 23:03:15 CEST 2009


Hi, This my first patch submit, im a bit of a stranger here so please
forgive if I've made a mistake.

I posted the issue a few weeks back, but have since found the solution.
The assertion fails quite often when encoding snow videos with strange,
small resolutions.(74x68 is common)

There is sample media on the issue tracker.

Thanks.
Chris Stones. (chris.stones at gmail.com)

-------------------------------------------------------8<-------------------------------------------------------
diff -crB ffmpeg/libavcodec/snow.c ffmpeg_working/libavcodec/snow.c
*** ffmpeg/libavcodec/snow.c    Wed Jul 15 12:41:13 2009
--- ffmpeg_working/libavcodec/snow.c    Wed Jul 15 12:56:17 2009
***************
*** 2354,2362 ****
          }
  //        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((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 )
              mc_block(&s->plane[plane_index], dst, src, tmp, stride, b_w,
b_h, dx, dy);
          else if(b_w==32){
              int y;
--- 2354,2362 ----
          }
  //        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((tab_index>=0 && tab_index<4) || b_w==32);
!         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 )
              mc_block(&s->plane[plane_index], dst, src, tmp, stride, b_w,
b_h, dx, dy);
          else if(b_w==32){
              int y;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: issue1247.patch
Type: application/octet-stream
Size: 1215 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090715/8ebcbcdb/attachment.obj>



More information about the ffmpeg-devel mailing list