45 int block_w = plane_index ? block_size>>s->
chroma_h_shift : block_size;
46 int block_h = plane_index ? block_size>>s->
chroma_v_shift : block_size;
48 int obmc_stride= plane_index ? (2*block_size)>>s->
chroma_h_shift : 2*block_size;
59 for(y=block_h*mb_y; y<
FFMIN(h,block_h*(mb_y+1)); y++){
66 if(v&(~255)) v= ~(v>>31);
67 dst8[x + y*ref_stride]=
v;
71 for(y=block_h*mb_y; y<
FFMIN(h,block_h*(mb_y+1)); y++){
84 for(mb_x=0; mb_x<=mb_w; mb_x++){
86 block_w*mb_x - block_w/2,
87 block_h*mb_y - block_h/2,
90 w, ref_stride, obmc_stride,
97 const int w= b->
width;
111 new_index = save_state[0];
114 for(y=start_y; y<h; y++){
122 register int t= ( (v>>1)*qmul + qadd)>>
QEXPSHIFT;
123 register int u= -(v&1);
132 save_state[0] = new_index;
140 const int index= (x + y*w) << rem_depth;
141 int trx= (x+1)<<rem_depth;
145 const BlockNode *tr = y && trx<w && ((x&1)==0 || level==0) ? &s->
block[index-w+(1<<rem_depth)] : tl;
150 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);
156 int l = left->
color[0];
167 pred_mv(s, &mx, &my, 0, left, top, tr);
178 pred_mv(s, &mx, &my, ref, left, top, tr);
182 set_blocks(s, level, x, y, l, cb, cr, mx, my, ref, type);
194 const int w= b->
width;
202 for(y=start_y; y<end_y; y++){
208 line[x]= -((-i*qmul + qadd)>>(
QEXPSHIFT));
210 line[x]= (( i*qmul + qadd)>>(
QEXPSHIFT));
217 const int w= b->
width;
226 for(y=start_y; y<end_y; y++){
233 if(y && x+1<w) line[x] +=
mid_pred(line[x - 1], prev[x], prev[x + 1]);
234 else line[x] += line[x - 1];
236 if(y) line[x] +=
mid_pred(line[x - 1], prev[x], line[x - 1] + prev[x] - prev[x - 1]);
237 else line[x] += line[x - 1];
240 if(y) line[x] += prev[x];
247 int plane_index,
level, orientation;
249 for(plane_index=0; plane_index<3; plane_index++){
251 for(orientation=level ? 1:0; orientation<4; orientation++){
262 #define GET_S(dst, check) \
263 tmp= get_symbol(&s->c, s->header_state, 0);\
265 av_log(s->avctx, AV_LOG_ERROR, "Error " #dst " is %d\n", tmp);\
271 int plane_index, tmp;
274 memset(kstate,
MID_STATE,
sizeof(kstate));
318 for(plane_index=0; plane_index<2; plane_index++){
323 if((
unsigned)htaps >
HTAPS_MAX || htaps==0)
326 for(i= htaps/2; i; i--){
398 int buf_size = avpkt->
size;
403 int level, orientation, plane_index;
424 for(plane_index=0; plane_index<3; plane_index++){
442 for(plane_index=0; plane_index<3; plane_index++){
463 for(orientation=level ? 1 : 0; orientation<4; orientation++){
473 const int block_h = plane_index ? block_size>>s->
chroma_v_shift : block_size;
481 for(mb_y=0; mb_y<=mb_h; mb_y++){
483 int slice_starty = block_h*mb_y;
484 int slice_h = block_h*(mb_y+1);
487 slice_starty =
FFMAX(0, slice_starty - (block_h >> 1));
488 slice_h -= (block_h >> 1);
492 for(orientation=level ? 1 : 0; orientation<4; orientation++){
496 int our_mb_start = mb_y;
497 int our_mb_end = (mb_y + 1);
508 if (start_y != end_y){
509 if (orientation == 0){
512 int correlate_start_y =
FFMIN(b->
height, (start_y ? start_y + 1 : 0));
523 for(; yd<slice_h; yd+=4){
528 for(; yq<slice_h && yq<h; yq++){