Home | History | Annotate | Download | only in common

Lines Matching refs:sf

16 static INLINE int scaled_x(int val, const struct scale_factors *sf) {
17 return (int)((int64_t)val * sf->x_scale_fp >> REF_SCALE_SHIFT);
20 static INLINE int scaled_y(int val, const struct scale_factors *sf) {
21 return (int)((int64_t)val * sf->y_scale_fp >> REF_SCALE_SHIFT);
24 static int unscaled_value(int val, const struct scale_factors *sf) {
25 (void)sf;
37 MV32 vp9_scale_mv(const MV *mv, int x, int y, const struct scale_factors *sf) {
38 const int x_off_q4 = scaled_x(x << SUBPEL_BITS, sf) & SUBPEL_MASK;
39 const int y_off_q4 = scaled_y(y << SUBPEL_BITS, sf) & SUBPEL_MASK;
40 const MV32 res = { scaled_y(mv->row, sf) + y_off_q4,
41 scaled_x(mv->col, sf) + x_off_q4 };
46 void vp9_setup_scale_factors_for_frame(struct scale_factors *sf, int other_w,
50 void vp9_setup_scale_factors_for_frame(struct scale_factors *sf, int other_w,
54 sf->x_scale_fp = REF_INVALID_SCALE;
55 sf->y_scale_fp = REF_INVALID_SCALE;
59 sf->x_scale_fp = get_fixed_point_scale_factor(other_w, this_w);
60 sf->y_scale_fp = get_fixed_point_scale_factor(other_h, this_h);
61 sf->x_step_q4 = scaled_x(16, sf);
62 sf->y_step_q4 = scaled_y(16, sf);
64 if (vp9_is_scaled(sf)) {
65 sf->scale_value_x = scaled_x;
66 sf->scale_value_y = scaled_y;
68 sf->scale_value_x = unscaled_value;
69 sf->scale_value_y = unscaled_value;
79 if (sf->x_step_q4 == 16) {
80 if (sf->y_step_q4 == 16) {
82 sf->predict[0][0][0] = vpx_convolve_copy;
83 sf->predict[0][0][1] = vpx_convolve_avg;
84 sf->predict[0][1][0] = vpx_convolve8_vert;
85 sf->predict[0][1][1] = vpx_convolve8_avg_vert;
86 sf->predict[1][0][0] = vpx_convolve8_horiz;
87 sf->predict[1][0][1] = vpx_convolve8_avg_horiz;
90 sf->predict[0][0][0] = vpx_scaled_vert;
91 sf->predict[0][0][1] = vpx_scaled_avg_vert;
92 sf->predict[0][1][0] = vpx_scaled_vert;
93 sf->predict[0][1][1] = vpx_scaled_avg_vert;
94 sf->predict[1][0][0] = vpx_scaled_2d;
95 sf->predict[1][0][1] = vpx_scaled_avg_2d;
98 if (sf->y_step_q4 == 16) {
100 sf->predict[0][0][0] = vpx_scaled_horiz;
101 sf->predict[0][0][1] = vpx_scaled_avg_horiz;
102 sf->predict[0][1][0] = vpx_scaled_2d;
103 sf->predict[0][1][1] = vpx_scaled_avg_2d;
104 sf->predict[1][0][0] = vpx_scaled_horiz;
105 sf->predict[1][0][1] = vpx_scaled_avg_horiz;
108 sf->predict[0][0][0] = vpx_scaled_2d;
109 sf->predict[0][0][1] = vpx_scaled_avg_2d;
110 sf->predict[0][1][0] = vpx_scaled_2d;
111 sf->predict[0][1][1] = vpx_scaled_avg_2d;
112 sf->predict[1][0][0] = vpx_scaled_2d;
113 sf->predict[1][0][1] = vpx_scaled_avg_2d;
119 if ((sf->x_step_q4 != 16) || (sf->y_step_q4 != 16)) {
120 sf->predict[1][1][0] = vpx_scaled_2d;
121 sf->predict[1][1][1] = vpx_scaled_avg_2d;
123 sf->predict[1][1][0] = vpx_convolve8;
124 sf->predict[1][1][1] = vpx_convolve8_avg;
129 if (sf->x_step_q4 == 16) {
130 if (sf->y_step_q4 == 16) {
132 sf->highbd_predict[0][0][0] = vpx_highbd_convolve_copy;
133 sf->highbd_predict[0][0][1] = vpx_highbd_convolve_avg;
134 sf->highbd_predict[0][1][0] = vpx_highbd_convolve8_vert;
135 sf->highbd_predict[0][1][1] = vpx_highbd_convolve8_avg_vert;
136 sf->highbd_predict[1][0][0] = vpx_highbd_convolve8_horiz;
137 sf->highbd_predict[1][0][1] = vpx_highbd_convolve8_avg_horiz;
140 sf->highbd_predict[0][0][0] = vpx_highbd_convolve8_vert;
141 sf->highbd_predict[0][0][1] = vpx_highbd_convolve8_avg_vert;
142 sf->highbd_predict[0][1][0] = vpx_highbd_convolve8_vert;
143 sf->highbd_predict[0][1][1] = vpx_highbd_convolve8_avg_vert;
144 sf->highbd_predict[1][0][0] = vpx_highbd_convolve8;
145 sf->highbd_predict[1][0][1] = vpx_highbd_convolve8_avg;
148 if (sf->y_step_q4 == 16) {
150 sf->highbd_predict[0][0][0] = vpx_highbd_convolve8_horiz;
151 sf->highbd_predict[0][0][1] = vpx_highbd_convolve8_avg_horiz;
152 sf->highbd_predict[0][1][0] = vpx_highbd_convolve8;
153 sf->highbd_predict[0][1][1] = vpx_highbd_convolve8_avg;
154 sf->highbd_predict[1][0][0] = vpx_highbd_convolve8_horiz;
155 sf->highbd_predict[1][0][1] = vpx_highbd_convolve8_avg_horiz;
158 sf->highbd_predict[0][0][0] = vpx_highbd_convolve8;
159 sf->highbd_predict[0][0][1] = vpx_highbd_convolve8_avg;
160 sf->highbd_predict[0][1][0] = vpx_highbd_convolve8;
161 sf->highbd_predict[0][1][1] = vpx_highbd_convolve8_avg;
162 sf->highbd_predict[1][0][0] = vpx_highbd_convolve8;
163 sf->highbd_predict[1][0][1] = vpx_highbd_convolve8_avg;
167 sf->highbd_predict[1][1][0] = vpx_highbd_convolve8;
168 sf->highbd_predict[1][1][1] = vpx_highbd_convolve8_avg;