37 int16_t *
block,
int n,
int qscale)
40 const uint16_t *quant_matrix;
42 nCoeffs=
s->block_last_index[n];
44 block[0] *= n < 4 ?
s->y_dc_scale :
s->c_dc_scale;
46 quant_matrix =
s->intra_matrix;
47 for(
i=1;
i<=nCoeffs;
i++) {
48 int j=
s->intra_scantable.permutated[
i];
53 level = (int)(
level * qscale * quant_matrix[j]) >> 3;
57 level = (int)(
level * qscale * quant_matrix[j]) >> 3;
66 int16_t *
block,
int n,
int qscale)
69 const uint16_t *quant_matrix;
71 nCoeffs=
s->block_last_index[n];
73 quant_matrix =
s->inter_matrix;
74 for(
i=0;
i<=nCoeffs;
i++) {
75 int j=
s->intra_scantable.permutated[
i];
81 ((int) (quant_matrix[j]))) >> 4;
86 ((int) (quant_matrix[j]))) >> 4;
95 int16_t *
block,
int n,
int qscale)
98 const uint16_t *quant_matrix;
103 nCoeffs=
s->block_last_index[n];
105 block[0] *= n < 4 ?
s->y_dc_scale :
s->c_dc_scale;
106 quant_matrix =
s->intra_matrix;
107 for(
i=1;
i<=nCoeffs;
i++) {
108 int j=
s->intra_scantable.permutated[
i];
113 level = (int)(
level * qscale * quant_matrix[j]) >> 4;
116 level = (int)(
level * qscale * quant_matrix[j]) >> 4;
124 int16_t *
block,
int n,
int qscale)
127 const uint16_t *quant_matrix;
133 nCoeffs=
s->block_last_index[n];
135 block[0] *= n < 4 ?
s->y_dc_scale :
s->c_dc_scale;
137 quant_matrix =
s->intra_matrix;
138 for(
i=1;
i<=nCoeffs;
i++) {
139 int j=
s->intra_scantable.permutated[
i];
144 level = (int)(
level * qscale * quant_matrix[j]) >> 4;
147 level = (int)(
level * qscale * quant_matrix[j]) >> 4;
157 int16_t *
block,
int n,
int qscale)
160 const uint16_t *quant_matrix;
166 nCoeffs=
s->block_last_index[n];
168 quant_matrix =
s->inter_matrix;
169 for(
i=0;
i<=nCoeffs;
i++) {
170 int j=
s->intra_scantable.permutated[
i];
176 ((int) (quant_matrix[j]))) >> 5;
180 ((int) (quant_matrix[j]))) >> 5;
190 int16_t *
block,
int n,
int qscale)
200 block[0] *= n < 4 ?
s->y_dc_scale :
s->c_dc_scale;
201 qadd = (qscale - 1) | 1;
208 nCoeffs=
s->intra_scantable.raster_end[
s->block_last_index[n] ];
210 for(
i=1;
i<=nCoeffs;
i++) {
224 int16_t *
block,
int n,
int qscale)
231 qadd = (qscale - 1) | 1;
234 nCoeffs=
s->inter_scantable.raster_end[
s->block_last_index[n] ];
236 for(
i=0;
i<=nCoeffs;
i++) {
250 int bitexact,
int q_scale_type)
261 #if HAVE_INTRINSICS_NEON