static IDWTELEM * slice_buffer_load_line(slice_buffer * buf, int line)
{
- int offset;
IDWTELEM * buffer;
assert(buf->data_stack_top >= 0);
if (buf->line[line])
return buf->line[line];
- offset = buf->line_width * line;
buffer = buf->data_stack[buf->data_stack_top];
buf->data_stack_top--;
buf->line[line] = buffer;
static void slice_buffer_release(slice_buffer * buf, int line)
{
- int offset;
IDWTELEM * buffer;
assert(line >= 0 && line < buf->line_count);
assert(buf->line[line]);
- offset = buf->line_width * line;
buffer = buf->line[line];
buf->data_stack_top++;
buf->data_stack[buf->data_stack_top] = buffer;
for(i=0; i<e; i++){
put_rac(c, state+1+FFMIN(i,9), 1); //1..10
}
- put_rac(c, state+1+FFMIN(i,9), 0);
+ put_rac(c, state+1+9, 0);
for(i=e-1; i>=0; i--){
put_rac(c, state+22+FFMIN(i,9), (a>>i)&1); //22..31
}
if(is_signed)
- put_rac(c, state+11 + FFMIN(e,10), v < 0); //11..21
+ put_rac(c, state+11 + 10, v < 0); //11..21
}
#endif /* 1 */
}else{
a += a + get_rac(c, state+22 + FFMIN(i,9)); //22..31
}
- if(is_signed && get_rac(c, state+11 + FFMIN(e,10))) //11..21
- return -a;
- else
- return a;
+ e= -(is_signed && get_rac(c, state+11 + FFMIN(e,10))); //11..21
+ return (a^e)-e;
}
}
if(y+0<(unsigned)height) vertical_compose97iH0(b0, b1, b2, width);
}
- if(y-1<(unsigned)height) dsp->horizontal_compose97i(b0, width);
- if(y+0<(unsigned)height) dsp->horizontal_compose97i(b1, width);
+ if(y-1<(unsigned)height) dsp->horizontal_compose97i(b0, width);
+ if(y+0<(unsigned)height) dsp->horizontal_compose97i(b1, width);
cs->b0=b2;
cs->b1=b3;
IDWTELEM *b4= buffer + mirror(y+3, height-1)*stride;
IDWTELEM *b5= buffer + mirror(y+4, height-1)*stride;
- if(y+3<(unsigned)height) vertical_compose97iL1(b3, b4, b5, width);
- if(y+2<(unsigned)height) vertical_compose97iH1(b2, b3, b4, width);
- if(y+1<(unsigned)height) vertical_compose97iL0(b1, b2, b3, width);
- if(y+0<(unsigned)height) vertical_compose97iH0(b0, b1, b2, width);
+ if(y+3<(unsigned)height) vertical_compose97iL1(b3, b4, b5, width);
+ if(y+2<(unsigned)height) vertical_compose97iH1(b2, b3, b4, width);
+ if(y+1<(unsigned)height) vertical_compose97iL0(b1, b2, b3, width);
+ if(y+0<(unsigned)height) vertical_compose97iH0(b0, b1, b2, width);
- if(y-1<(unsigned)height) ff_snow_horizontal_compose97i(b0, width);
- if(y+0<(unsigned)height) ff_snow_horizontal_compose97i(b1, width);
+ if(y-1<(unsigned)height) ff_snow_horizontal_compose97i(b0, width);
+ if(y+0<(unsigned)height) ff_snow_horizontal_compose97i(b1, width);
cs->b0=b2;
cs->b1=b3;
c->mb_penalty_factor = get_penalty_factor(s->lambda, s->lambda2, c->avctx->mb_cmp);
c->current_mv_penalty= c->mv_penalty[s->m.f_code=1] + MAX_MV;
- c->xmin = - x*block_w - 16+2;
- c->ymin = - y*block_w - 16+2;
- c->xmax = - (x+1)*block_w + (w<<(LOG2_MB_SIZE - s->block_max_depth)) + 16-2;
- c->ymax = - (y+1)*block_w + (h<<(LOG2_MB_SIZE - s->block_max_depth)) + 16-2;
+ c->xmin = - x*block_w - 16+3;
+ c->ymin = - y*block_w - 16+3;
+ c->xmax = - (x+1)*block_w + (w<<(LOG2_MB_SIZE - s->block_max_depth)) + 16-3;
+ c->ymax = - (y+1)*block_w + (h<<(LOG2_MB_SIZE - s->block_max_depth)) + 16-3;
if(P_LEFT[0] > (c->xmax<<shift)) P_LEFT[0] = (c->xmax<<shift);
if(P_LEFT[1] > (c->ymax<<shift)) P_LEFT[1] = (c->ymax<<shift);
s->spatial_decomposition_type= avctx->prediction_method; //FIXME add decorrelator type r transform_type
- s->chroma_h_shift= 1; //FIXME XXX
- s->chroma_v_shift= 1;
-
s->mv_scale = (avctx->flags & CODEC_FLAG_QPEL) ? 2 : 4;
s->block_max_depth= (avctx->flags & CODEC_FLAG_4MV ) ? 1 : 0;