DWTELEM *temp_dwt_buffer;
IDWTELEM *spatial_idwt_buffer;
IDWTELEM *temp_idwt_buffer;
+ int *run_buffer;
int colorspace_type;
int chroma_h_shift;
int chroma_v_shift;
MpegEncContext m; // needed for motion estimation, should not be used for anything else, the idea is to eventually make the motion estimation independent of MpegEncContext, so this will be removed then (FIXME/XXX)
uint8_t *scratchbuf;
- int *runs;
+ uint8_t *emu_edge_buffer;
}SnowContext;
/* Tables */
av_assert2(log2>=-4);
- while(get_rac(c, state+4+log2)){
+ while(log2<28 && get_rac(c, state+4+log2)){
v+= r;
log2++;
if(log2>0) r+=r;
int max_run;
run--;
v=0;
-
+ av_assert2(run >= 0);
if(y) max_run= FFMIN(run, prev_xc->x - x - 2);
else max_run= FFMIN(run, w-x-1);
if(parent_xc)
max_run= FFMIN(max_run, 2*parent_xc->x - x - 1);
+ av_assert2(max_run >= 0 && max_run <= run);
+
x+= max_run;
run-= max_run;
}