Commit b634e7ed authored by Nathan E. Egge's avatar Nathan E. Egge Committed by Nathan Egge
Browse files

Fix a bug in the DAALA_TX 4-point DST functions.

The OD_FDST_4() and OD_IDST_4() macros were written for use in the
 OD_FDCT_8_ASYM macro which took asymmetrically scaled input and
 after running an asymmetric butterfly step, passed it through to
 the 4-point Type-II DCT and 4-point Type-IV DST.
Because the DST implementations were never tested as stand alone
 transforms, some of the signs from the butterfly step ended up inside
 the DST macros.
These extra operations will be addressed in a follow up patch.

Change-Id: I5ad1dee7b903d3a6dc3d512ae430841244851bc0
parent ad80858b
...@@ -3841,9 +3841,9 @@ void od_bin_fdst4(od_coeff y[4], const od_coeff *x, int xstride) { ...@@ -3841,9 +3841,9 @@ void od_bin_fdst4(od_coeff y[4], const od_coeff *x, int xstride) {
q3 = x[0*xstride]; q3 = x[0*xstride];
OD_FDST_4(q0, q2, q1, q3); OD_FDST_4(q0, q2, q1, q3);
y[0] = (od_coeff)q3; y[0] = (od_coeff)q3;
y[1] = (od_coeff)q2; y[1] = -(od_coeff)q2;
y[2] = (od_coeff)q1; y[2] = (od_coeff)q1;
y[3] = (od_coeff)q0; y[3] = -(od_coeff)q0;
} }
void od_bin_idst4(od_coeff *x, int xstride, const od_coeff y[4]) { void od_bin_idst4(od_coeff *x, int xstride, const od_coeff y[4]) {
...@@ -3851,9 +3851,9 @@ void od_bin_idst4(od_coeff *x, int xstride, const od_coeff y[4]) { ...@@ -3851,9 +3851,9 @@ void od_bin_idst4(od_coeff *x, int xstride, const od_coeff y[4]) {
int q1; int q1;
int q2; int q2;
int q3; int q3;
q0 = y[3]; q0 = -y[3];
q2 = y[2]; q2 = y[2];
q1 = y[1]; q1 = -y[1];
q3 = y[0]; q3 = y[0];
OD_IDST_4(q0, q2, q1, q3); OD_IDST_4(q0, q2, q1, q3);
x[0*xstride] = q3; x[0*xstride] = q3;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment