45 int block_w = plane_index ? block_size/2 : block_size;
47 int obmc_stride= plane_index ? block_size : 2*block_size;
58 for(y=block_w*mb_y; y<
FFMIN(h,block_w*(mb_y+1)); y++){
65 if(v&(~255)) v= ~(v>>31);
66 dst8[x + y*ref_stride]= v;
70 for(y=block_w*mb_y; y<
FFMIN(h,block_w*(mb_y+1)); y++){
83 for(mb_x=0; mb_x<=mb_w; mb_x++){
85 block_w*mb_x - block_w/2,
86 block_w*mb_y - block_w/2,
89 w, ref_stride, obmc_stride,
96 const int w= b->
width;
110 new_index = save_state[0];
113 for(y=start_y; y<h; y++){
121 register int t= ( (v>>1)*qmul + qadd)>>
QEXPSHIFT;
122 register int u= -(v&1);
131 save_state[0] = new_index;
139 const int index= (x + y*w) << rem_depth;
140 int trx= (x+1)<<rem_depth;
144 const BlockNode *tr = y && trx<w && ((x&1)==0 || level==0) ? &s->
block[index-w+(1<<rem_depth)] : tl;
149 set_blocks(s, level, x, y,
null_block.
color[0],
null_block.
color[1],
null_block.
color[2],
null_block.
mx,
null_block.
my,
null_block.
ref,
BLOCK_INTRA);
155 int l = left->
color[0];
156 int cb= left->
color[1];
157 int cr= left->
color[2];
166 pred_mv(s, &mx, &my, 0, left, top, tr);
177 pred_mv(s, &mx, &my, ref, left, top, tr);
181 set_blocks(s, level, x, y, l, cb, cr, mx, my, ref, type);
193 const int w= b->
width;
201 for(y=start_y; y<end_y; y++){
207 line[x]= -((-i*qmul + qadd)>>(
QEXPSHIFT));
209 line[x]= (( i*qmul + qadd)>>(
QEXPSHIFT));
216 const int w= b->
width;
225 for(y=start_y; y<end_y; y++){
232 if(y && x+1<w) line[x] +=
mid_pred(line[x - 1], prev[x], prev[x + 1]);
233 else line[x] += line[x - 1];
235 if(y) line[x] +=
mid_pred(line[x - 1], prev[x], line[x - 1] + prev[x] - prev[x - 1]);
236 else line[x] += line[x - 1];
239 if(y) line[x] += prev[x];
246 int plane_index,
level, orientation;
248 for(plane_index=0; plane_index<3; plane_index++){
250 for(orientation=level ? 1:0; orientation<4; orientation++){
261 #define GET_S(dst, check) \
262 tmp= get_symbol(&s->c, s->header_state, 0);\
264 av_log(s->avctx, AV_LOG_ERROR, "Error " #dst " is %d\n", tmp);\
270 int plane_index, tmp;
273 memset(kstate,
MID_STATE,
sizeof(kstate));
303 for(plane_index=0; plane_index<2; plane_index++){
308 if((
unsigned)htaps >
HTAPS_MAX || htaps==0)
311 for(i= htaps/2; i; i--){
389 int buf_size = avpkt->
size;
394 int level, orientation, plane_index;
414 for(plane_index=0; plane_index<3; plane_index++){
432 for(plane_index=0; plane_index<3; plane_index++){
453 for(orientation=level ? 1 : 0; orientation<4; orientation++){
463 const int block_w = plane_index ? block_size/2 : block_size;
471 for(mb_y=0; mb_y<=mb_h; mb_y++){
473 int slice_starty = block_w*mb_y;
474 int slice_h = block_w*(mb_y+1);
476 slice_starty =
FFMAX(0, slice_starty - (block_w >> 1));
477 slice_h -= (block_w >> 1);
481 for(orientation=level ? 1 : 0; orientation<4; orientation++){
485 int our_mb_start = mb_y;
486 int our_mb_end = (mb_y + 1);
497 if (start_y != end_y){
498 if (orientation == 0){
501 int correlate_start_y =
FFMIN(b->
height, (start_y ? start_y + 1 : 0));
512 for(; yd<slice_h; yd+=4){
517 for(; yq<slice_h && yq<h; yq++){