42 int block_w = plane_index ? block_size>>s->
chroma_h_shift : block_size;
43 int block_h = plane_index ? block_size>>s->
chroma_v_shift : block_size;
45 int obmc_stride= plane_index ? (2*block_size)>>s->
chroma_h_shift : 2*block_size;
56 for(y=block_h*mb_y; y<
FFMIN(h,block_h*(mb_y+1)); y++){
63 if(v&(~255)) v= ~(v>>31);
64 dst8[x + y*ref_stride]=
v;
68 for(y=block_h*mb_y; y<
FFMIN(h,block_h*(mb_y+1)); y++){
81 for(mb_x=0; mb_x<=mb_w; mb_x++){
83 block_w*mb_x - block_w/2,
84 block_h*mb_y - block_h/2,
87 w, ref_stride, obmc_stride,
94 const int w= b->
width;
108 new_index = save_state[0];
111 for(y=start_y; y<h; y++){
119 register int t= ( (v>>1)*qmul + qadd)>>
QEXPSHIFT;
120 register int u= -(v&1);
129 save_state[0] = new_index;
137 const int index= (x + y*w) << rem_depth;
138 int trx= (x+1)<<rem_depth;
142 const BlockNode *tr = y && trx<w && ((x&1)==0 || level==0) ? &s->
block[index-w+(1<<rem_depth)] : tl;
147 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);
153 int l = left->
color[0];
164 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 < s->
nb_planes; 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));
329 for(plane_index=0; plane_index<
FFMIN(s->
nb_planes, 2); plane_index++){
334 if((
unsigned)htaps >
HTAPS_MAX || htaps==0)
337 for(i= htaps/2; i; i--){
409 int buf_size = avpkt->
size;
414 int level, orientation, plane_index;
435 for(plane_index=0; plane_index < s->
nb_planes; plane_index++){
453 for(plane_index=0; plane_index < s->
nb_planes; plane_index++){
474 for(orientation=level ? 1 : 0; orientation<4; orientation++){
484 const int block_h = plane_index ? block_size>>s->
chroma_v_shift : block_size;
492 for(mb_y=0; mb_y<=mb_h; mb_y++){
494 int slice_starty = block_h*mb_y;
495 int slice_h = block_h*(mb_y+1);
498 slice_starty =
FFMAX(0, slice_starty - (block_h >> 1));
499 slice_h -= (block_h >> 1);
503 for(orientation=level ? 1 : 0; orientation<4; orientation++){
507 int our_mb_start = mb_y;
508 int our_mb_end = (mb_y + 1);
519 if (start_y != end_y){
520 if (orientation == 0){
523 int correlate_start_y =
FFMIN(b->
height, (start_y ? start_y + 1 : 0));
534 for(; yd<slice_h; yd+=4){
539 for(; yq<slice_h && yq<h; yq++){