Lines Matching defs:dir
36 static av_always_inline int scaleforsame_x(VC1Context *v, int n /* MV */, int dir)
41 int table_index = dir ^ v->second_field;
46 refdist = dir ? v->brfd : v->frfd;
69 static av_always_inline int scaleforsame_y(VC1Context *v, int i, int n /* MV */, int dir)
74 int table_index = dir ^ v->second_field;
79 refdist = dir ? v->brfd : v->frfd;
100 if (v->cur_field_type && !v->ref_field_type[dir])
133 static av_always_inline int scaleforopp_y(VC1Context *v, int n /* MV */, int dir)
157 if (v->cur_field_type && !v->ref_field_type[dir]) {
165 int dim, int dir)
171 if (v->s.pict_type != AV_PICTURE_TYPE_B || v->second_field || !dir) {
173 n = scaleforsame_y(v, i, n, dir) * (1 << hpel);
175 n = scaleforsame_x(v, n, dir) * (1 << hpel);
186 int dim, int dir)
192 if (v->s.pict_type == AV_PICTURE_TYPE_B && !v->second_field && dir == 1) {
194 n = scaleforopp_y(v, n, dir) * (1 << hpel);
202 refdist = dir ? v->brfd : v->frfd;
204 scaleopp = ff_vc1_field_mvpred_scales[dir ^ v->second_field][0][refdist];
214 int pred_flag, int dir)
304 A = s->current_picture.motion_val[dir][xy - wrap + v->blocks_off];
305 a_f = v->mv_f[dir][xy - wrap + v->blocks_off];
315 B = s->current_picture.motion_val[dir][xy - wrap + off + v->blocks_off];
316 b_f = v->mv_f[dir][xy - wrap + off + v->blocks_off];
326 C = s->current_picture.motion_val[dir][xy - 1 + v->blocks_off];
327 c_f = v->mv_f[dir][xy - 1 + v->blocks_off];
351 v->mv_f[dir][xy + v->blocks_off] = 1;
352 v->ref_field_type[dir] = !v->cur_field_type;
354 field_predA[0] = scaleforopp(v, field_predA[0], 0, dir);
355 field_predA[1] = scaleforopp(v, field_predA[1], 1, dir);
358 field_predB[0] = scaleforopp(v, field_predB[0], 0, dir);
359 field_predB[1] = scaleforopp(v, field_predB[1], 1, dir);
362 field_predC[0] = scaleforopp(v, field_predC[0], 0, dir);
363 field_predC[1] = scaleforopp(v, field_predC[1], 1, dir);
366 v->mv_f[dir][xy + v->blocks_off] = 0;
367 v->ref_field_type[dir] = v->cur_field_type;
369 field_predA[0] = scaleforsame(v, n, field_predA[0], 0, dir);
370 field_predA[1] = scaleforsame(v, n, field_predA[1], 1, dir);
373 field_predB[0] = scaleforsame(v, n, field_predB[0], 0, dir);
374 field_predB[1] = scaleforsame(v, n, field_predB[1], 1, dir);
377 field_predC[0] = scaleforsame(v, n, field_predC[0], 0, dir);
378 field_predC[1] = scaleforsame(v, n, field_predC[1], 1, dir);
451 if (v->field_mode && v->cur_field_type && v->ref_field_type[dir] == 0)
454 s->mv[dir][n][0] = s->current_picture.motion_val[dir][xy + v->blocks_off][0] = ((px + dmv_x + r_x) & ((r_x << 1) - 1)) - r_x;
455 s->mv[dir][n][1] = s->current_picture.motion_val[dir][xy + v->blocks_off][1] = ((py + dmv_y + r_y - y_bias) & ((r_y << 1) - 1)) - r_y + y_bias;
457 s->current_picture.motion_val[dir][xy + 1 + v->blocks_off][0] = s->current_picture.motion_val[dir][xy + v->blocks_off][0];
458 s->current_picture.motion_val[dir][xy + 1 + v->blocks_off][1] = s->current_picture.motion_val[dir][xy + v->blocks_off][1];
459 s->current_picture.motion_val[dir][xy + wrap + v->blocks_off][0] = s->current_picture.motion_val[dir][xy + v->blocks_off][0];
460 s->current_picture.motion_val[dir][xy + wrap + v->blocks_off][1] = s->current_picture.motion_val[dir][xy + v->blocks_off][1];
461 s->current_picture.motion_val[dir][xy + wrap + 1 + v->blocks_off][0] = s->current_picture.motion_val[dir][xy + v->blocks_off][0];
462 s->current_picture.motion_val[dir][xy + wrap + 1 + v->blocks_off][1] = s->current_picture.motion_val[dir][xy + v->blocks_off][1];
463 v->mv_f[dir][xy + 1 + v->blocks_off] = v->mv_f[dir][xy + v->blocks_off];
464 v->mv_f[dir][xy + wrap + v->blocks_off] = v->mv_f[dir][xy + wrap + 1 + v->blocks_off] = v->mv_f[dir][xy + v->blocks_off];
471 int mvn, int r_x, int r_y, int dir)
513 A[0] = s->current_picture.motion_val[dir][xy - 1][0];
514 A[1] = s->current_picture.motion_val[dir][xy - 1][1];
517 A[0] = (s->current_picture.motion_val[dir][xy - 1][0]
518 + s->current_picture.motion_val[dir][xy - 1 + off * wrap][0] + 1) >> 1;
519 A[1] = (s->current_picture.motion_val[dir][xy - 1][1]
520 + s->current_picture.motion_val[dir][xy - 1 + off * wrap][1] + 1) >> 1;
540 B[0] = s->current_picture.motion_val[dir][s->block_index[n_adj] - 2 * wrap][0];
541 B[1] = s->current_picture.motion_val[dir][s->block_index[n_adj] - 2 * wrap][1];
543 B[0] = (B[0] + s->current_picture.motion_val[dir][s->block_index[n_adj ^ 2] - 2 * wrap][0] + 1) >> 1;
544 B[1] = (B[1] + s->current_picture.motion_val[dir][s->block_index[n_adj ^ 2] - 2 * wrap][1] + 1) >> 1;
555 C[0] = s->current_picture.motion_val[dir][s->block_index[n_adj] - 2 * wrap + 2][0];
556 C[1] = s->current_picture.motion_val[dir][s->block_index[n_adj] - 2 * wrap + 2][1];
558 C[0] = (1 + C[0] + (s->current_picture.motion_val[dir][s->block_index[n_adj ^ 2] - 2 * wrap + 2][0])) >> 1;
559 C[1] = (1 + C[1] + (s->current_picture.motion_val[dir][s->block_index[n_adj ^ 2] - 2 * wrap + 2][1])) >> 1;
569 C[0] = s->current_picture.motion_val[dir][s->block_index[n_adj] - 2 * wrap - 2][0];
570 C[1] = s->current_picture.motion_val[dir][s->block_index[n_adj] - 2 * wrap - 2][1];
572 C[0] = (1 + C[0] + s->current_picture.motion_val[dir][s->block_index[1] - 2 * wrap - 2][0]) >> 1;
573 C[1] = (1 + C[1] + s->current_picture.motion_val[dir][s->block_index[1] - 2 * wrap - 2][1]) >> 1;
584 B[0] = s->current_picture.motion_val[dir][pos_b][0];
585 B[1] = s->current_picture.motion_val[dir][pos_b][1];
588 C[0] = s->current_picture.motion_val[dir][pos_c][0];
589 C[1] = s->current_picture.motion_val[dir][pos_c][1];
674 s->mv[dir][n][0] = s->current_picture.motion_val[dir][xy][0] = ((px + dmv_x + r_x) & ((r_x << 1) - 1)) - r_x;
675 s->mv[dir][n][1] = s->current_picture.motion_val[dir][xy][1] = ((py + dmv_y + r_y) & ((r_y << 1) - 1)) - r_y;
677 s->current_picture.motion_val[dir][xy + 1 ][0] = s->current_picture.motion_val[dir][xy][0];
678 s->current_picture.motion_val[dir][xy + 1 ][1] = s->current_picture.motion_val[dir][xy][1];
679 s->current_picture.motion_val[dir][xy + wrap ][0] = s->current_picture.motion_val[dir][xy][0];
680 s->current_picture.motion_val[dir][xy + wrap ][1] = s->current_picture.motion_val[dir][xy][1];
681 s->current_picture.motion_val[dir][xy + wrap + 1][0] = s->current_picture.motion_val[dir][xy][0];
682 s->current_picture.motion_val[dir][xy + wrap + 1][1] = s->current_picture.motion_val[dir][xy][1];
684 s->current_picture.motion_val[dir][xy + 1][0] = s->current_picture.motion_val[dir][xy][0];
685 s->current_picture.motion_val[dir][xy + 1][1] = s->current_picture.motion_val[dir][xy][1];
686 s->mv[dir][n + 1][0] = s->mv[dir][n][0];
687 s->mv[dir][n + 1][1] = s->mv[dir][n][1];
894 int dir = (v->bmvtype == BMV_TYPE_BACKWARD) ? 1 : 0;
936 if (dir) { // backward