41 int block_w = plane_index ? block_size>>s->
chroma_h_shift : block_size;
42 int block_h = plane_index ? block_size>>s->
chroma_v_shift : block_size;
44 int obmc_stride= plane_index ? (2*block_size)>>s->
chroma_h_shift : 2*block_size;
55 for(y=block_h*mb_y; y<
FFMIN(h,block_h*(mb_y+1)); y++){
62 if(v&(~255)) v= ~(v>>31);
63 dst8[x + y*ref_stride]=
v;
67 for(y=block_h*mb_y; y<
FFMIN(h,block_h*(mb_y+1)); y++){
80 for(mb_x=0; mb_x<=mb_w; mb_x++){
82 block_w*mb_x - block_w/2,
83 block_h*mb_y - block_h/2,
86 w, ref_stride, obmc_stride,
93 const int w= b->
width;
107 new_index = save_state[0];
110 for(y=start_y; y<h; y++){
118 register int t= ( (v>>1)*qmul + qadd)>>
QEXPSHIFT;
119 register int u= -(v&1);
128 save_state[0] = new_index;
136 const int index= (x + y*w) << rem_depth;
137 int trx= (x+1)<<rem_depth;
141 const BlockNode *tr = y && trx<w && ((x&1)==0 || level==0) ? &s->
block[index-w+(1<<rem_depth)] : tl;
146 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);
152 int l = left->
color[0];
163 pred_mv(s, &mx, &my, 0, left, top, tr);
176 pred_mv(s, &mx, &my, ref, left, top, tr);
180 set_blocks(s, level, x, y, l, cb, cr, mx, my, ref, type);
192 const int w= b->
width;
200 for(y=start_y; y<end_y; y++){
206 line[x]= -((-i*qmul + qadd)>>(
QEXPSHIFT));
208 line[x]= (( i*qmul + qadd)>>(
QEXPSHIFT));
215 const int w= b->
width;
224 for(y=start_y; y<end_y; y++){
231 if(y && x+1<w) line[x] +=
mid_pred(line[x - 1], prev[x], prev[x + 1]);
232 else line[x] += line[x - 1];
234 if(y) line[x] +=
mid_pred(line[x - 1], prev[x], line[x - 1] + prev[x] - prev[x - 1]);
235 else line[x] += line[x - 1];
238 if(y) line[x] += prev[x];
245 int plane_index,
level, orientation;
247 for(plane_index=0; plane_index < s->
nb_planes; plane_index++){
249 for(orientation=level ? 1:0; orientation<4; orientation++){
260 #define GET_S(dst, check) \
261 tmp= get_symbol(&s->c, s->header_state, 0);\
263 av_log(s->avctx, AV_LOG_ERROR, "Error " #dst " is %d\n", tmp);\
264 return AVERROR_INVALIDDATA;\
269 int plane_index, tmp;
272 memset(kstate,
MID_STATE,
sizeof(kstate));
328 for(plane_index=0; plane_index<
FFMIN(s->
nb_planes, 2); plane_index++){
333 if((
unsigned)htaps >
HTAPS_MAX || htaps==0)
336 for(i= htaps/2; i; i--){
408 int buf_size = avpkt->
size;
413 int level, orientation, plane_index;
434 for(plane_index=0; plane_index < s->
nb_planes; plane_index++){
448 "keyframe:%d qlog:%d qbias: %d mvscale: %d "
449 "decomposition_type:%d decomposition_count:%d\n",
458 for(plane_index=0; plane_index < s->
nb_planes; plane_index++){
479 for(orientation=level ? 1 : 0; orientation<4; orientation++){
489 const int block_h = plane_index ? block_size>>s->
chroma_v_shift : block_size;
497 for(mb_y=0; mb_y<=mb_h; mb_y++){
499 int slice_starty = block_h*mb_y;
500 int slice_h = block_h*(mb_y+1);
503 slice_starty =
FFMAX(0, slice_starty - (block_h >> 1));
504 slice_h -= (block_h >> 1);
508 for(orientation=level ? 1 : 0; orientation<4; orientation++){
512 int our_mb_start = mb_y;
513 int our_mb_end = (mb_y + 1);
524 if (start_y != end_y){
525 if (orientation == 0){
528 int correlate_start_y =
FFMIN(b->
height, (start_y ? start_y + 1 : 0));
539 for(; yd<slice_h; yd+=4){
544 for(; yq<slice_h && yq<h; yq++){