*/\r
\r
\r
-// MMX32 iDCT algorithm (IEEE-1180 compliant) :: idct_mmx32()\r
-//\r
-// MPEG2AVI\r
-// --------\r
-// v0.16B33 initial release\r
-//\r
-// This was one of the harder pieces of work to code.\r
-// Intel's app-note focuses on the numerical issues of the algorithm, but\r
-// assumes the programmer is familiar with IDCT mathematics, leaving the\r
-// form of the complete function up to the programmer's imagination.\r
-//\r
-// ALGORITHM OVERVIEW\r
-// ------------------\r
-// I played around with the code for quite a few hours. I came up\r
-// with *A* working IDCT algorithm, however I'm not sure whether my routine\r
-// is "the correct one." But rest assured, my code passes all six IEEE \r
-// accuracy tests with plenty of margin.\r
-//\r
-// My IDCT algorithm consists of 4 steps:\r
-//\r
-// 1) IDCT-row transformation (using the IDCT-row function) on all 8 rows\r
-// This yields an intermediate 8x8 matrix.\r
-//\r
-// 2) intermediate matrix transpose (mandatory)\r
-//\r
-// 3) IDCT-row transformation (2nd time) on all 8 rows of the intermediate\r
-// matrix. The output is the final-result, in transposed form.\r
-//\r
-// 4) post-transformation matrix transpose \r
-// (not necessary if the input-data is already transposed, this could\r
-// be done during the MPEG "zig-zag" scan, but since my algorithm\r
-// requires at least one transpose operation, why not re-use the\r
-// transpose-code.)\r
-//\r
-// Although the (1st) and (3rd) steps use the SAME row-transform operation,\r
-// the (3rd) step uses different shift&round constants (explained later.)\r
-//\r
-// Also note that the intermediate transpose (2) would not be neccessary,\r
-// if the subsequent operation were a iDCT-column transformation. Since\r
-// we only have the iDCT-row transform, we transpose the intermediate\r
-// matrix and use the iDCT-row transform a 2nd time.\r
-//\r
-// I had to change some constants/variables for my method to work :\r
-//\r
-// As given by Intel, the #defines for SHIFT_INV_COL and RND_INV_COL are\r
-// wrong. Not surprising since I'm not using a true column-transform \r
-// operation, but the row-transform operation (as mentioned earlier.)\r
-// round_inv_col[], which is given as "4 short" values, should have the\r
-// same dimensions as round_inv_row[]. The corrected variables are \r
-// shown.\r
-//\r
-// Intel's code defines a different table for each each row operation.\r
-// The tables given are 0/4, 1/7, 2/6, and 5/3. My code only uses row#0.\r
-// Using the other rows messes up the overall transform.\r
-//\r
-// IMPLEMENTATION DETAILs\r
-// ----------------------\r
-// \r
-// I divided the algorithm's work into two subroutines,\r
-// 1) idct_mmx32_rows() - transforms 8 rows, then transpose\r
-// 2) idct_mmx32_cols() - transforms 8 rows, then transpose\r
-// yields final result ("drop-in" direct replacement for INT32 IDCT)\r
-//\r
-// The 2nd function is a clone of the 1st, with changes made only to the\r
-// shift&rounding instructions.\r
-//\r
-// In the 1st function (rows), the shift & round instructions use \r
-// SHIFT_INV_ROW & round_inv_row[] (renamed to r_inv_row[])\r
-//\r
-// In the 2nd function (cols)-> r_inv_col[], and\r
-// SHIFT_INV_COL & round_inv_col[] (renamed to r_inv_col[])\r
-//\r
-// Each function contains an integrated transpose-operator, which comes\r
-// AFTER the primary transformation operation. In the future, I'll optimize\r
-// the code to do more of the transpose-work "in-place". Right now, I've\r
-// left the code as two subroutines and a main calling function, so other\r
-// people can read the code more easily.\r
-//\r
-// liaor@umcc.ais.org http://members.tripod.com/~liaor\r
-// \r
-\r
-\r
-//;=============================================================================\r
-//;\r
-//; AP-922 http://developer.intel.com/vtune/cbts/strmsimd\r
-//; These examples contain code fragments for first stage iDCT 8x8\r
-//; (for rows) and first stage DCT 8x8 (for columns)\r
-//;\r
-//;=============================================================================\r
+/* MMX32 iDCT algorithm (IEEE-1180 compliant) :: idct_mmx32()\r */
+/*\r */
+/* MPEG2AVI\r */
+/* --------\r */
+/* v0.16B33 initial release\r */
+/*\r */
+/* This was one of the harder pieces of work to code.\r */
+/* Intel's app-note focuses on the numerical issues of the algorithm, but\r */
+/* assumes the programmer is familiar with IDCT mathematics, leaving the\r */
+/* form of the complete function up to the programmer's imagination.\r */
+/*\r */
+/* ALGORITHM OVERVIEW\r */
+/* ------------------\r */
+/* I played around with the code for quite a few hours. I came up\r */
+/* with *A* working IDCT algorithm, however I'm not sure whether my routine\r */
+/* is "the correct one." But rest assured, my code passes all six IEEE \r */
+/* accuracy tests with plenty of margin.\r */
+/*\r */
+/* My IDCT algorithm consists of 4 steps:\r */
+/*\r */
+/* 1) IDCT-row transformation (using the IDCT-row function) on all 8 rows\r */
+/* This yields an intermediate 8x8 matrix.\r */
+/*\r */
+/* 2) intermediate matrix transpose (mandatory)\r */
+/*\r */
+/* 3) IDCT-row transformation (2nd time) on all 8 rows of the intermediate\r */
+/* matrix. The output is the final-result, in transposed form.\r */
+/*\r */
+/* 4) post-transformation matrix transpose \r */
+/* (not necessary if the input-data is already transposed, this could\r */
+/* be done during the MPEG "zig-zag" scan, but since my algorithm\r */
+/* requires at least one transpose operation, why not re-use the\r */
+/* transpose-code.)\r */
+/*\r */
+/* Although the (1st) and (3rd) steps use the SAME row-transform operation,\r */
+/* the (3rd) step uses different shift&round constants (explained later.)\r */
+/*\r */
+/* Also note that the intermediate transpose (2) would not be neccessary,\r */
+/* if the subsequent operation were a iDCT-column transformation. Since\r */
+/* we only have the iDCT-row transform, we transpose the intermediate\r */
+/* matrix and use the iDCT-row transform a 2nd time.\r */
+/*\r */
+/* I had to change some constants/variables for my method to work :\r */
+/*\r */
+/* As given by Intel, the #defines for SHIFT_INV_COL and RND_INV_COL are\r */
+/* wrong. Not surprising since I'm not using a true column-transform \r */
+/* operation, but the row-transform operation (as mentioned earlier.)\r */
+/* round_inv_col[], which is given as "4 short" values, should have the\r */
+/* same dimensions as round_inv_row[]. The corrected variables are \r */
+/* shown.\r */
+/*\r */
+/* Intel's code defines a different table for each each row operation.\r */
+/* The tables given are 0/4, 1/7, 2/6, and 5/3. My code only uses row#0.\r */
+/* Using the other rows messes up the overall transform.\r */
+/*\r */
+/* IMPLEMENTATION DETAILs\r */
+/* ----------------------\r */
+/* \r */
+/* I divided the algorithm's work into two subroutines,\r */
+/* 1) idct_mmx32_rows() - transforms 8 rows, then transpose\r */
+/* 2) idct_mmx32_cols() - transforms 8 rows, then transpose\r */
+/* yields final result ("drop-in" direct replacement for INT32 IDCT)\r */
+/*\r */
+/* The 2nd function is a clone of the 1st, with changes made only to the\r */
+/* shift&rounding instructions.\r */
+/*\r */
+/* In the 1st function (rows), the shift & round instructions use \r */
+/* SHIFT_INV_ROW & round_inv_row[] (renamed to r_inv_row[])\r */
+/*\r */
+/* In the 2nd function (cols)-> r_inv_col[], and\r */
+/* SHIFT_INV_COL & round_inv_col[] (renamed to r_inv_col[])\r */
+/*\r */
+/* Each function contains an integrated transpose-operator, which comes\r */
+/* AFTER the primary transformation operation. In the future, I'll optimize\r */
+/* the code to do more of the transpose-work "in-place". Right now, I've\r */
+/* left the code as two subroutines and a main calling function, so other\r */
+/* people can read the code more easily.\r */
+/*\r */
+/* liaor@umcc.ais.org http://members.tripod.com/~liaor\r */
+/* \r */
+\r
+\r
+/*;=============================================================================\r */
+/*;\r */
+/*; AP-922 http://developer.intel.com/vtune/cbts/strmsimd\r */
+/*; These examples contain code fragments for first stage iDCT 8x8\r */
+/*; (for rows) and first stage DCT 8x8 (for columns)\r */
+/*;\r */
+/*;=============================================================================\r */
/*\r
mword typedef qword\r
qword ptr equ mword ptr */\r
\r
#include <mmx.h>\r
\r
-#define BITS_INV_ACC 4 //; 4 or 5 for IEEE\r
- // 5 yields higher accuracy, but lessens dynamic range on the input matrix\r
+#define BITS_INV_ACC 4 /*; 4 or 5 for IEEE\r */
+ /* 5 yields higher accuracy, but lessens dynamic range on the input matrix\r */
#define SHIFT_INV_ROW (16 - BITS_INV_ACC)\r
-#define SHIFT_INV_COL (1 + BITS_INV_ACC +14 ) // changed from Intel's val)\r
-//#define SHIFT_INV_COL (1 + BITS_INV_ACC )\r
+#define SHIFT_INV_COL (1 + BITS_INV_ACC +14 ) /* changed from Intel's val)\r */
+/*#define SHIFT_INV_COL (1 + BITS_INV_ACC )\r */
\r
#define RND_INV_ROW (1 << (SHIFT_INV_ROW-1))\r
#define RND_INV_COL (1 << (SHIFT_INV_COL-1)) \r
-#define RND_INV_CORR (RND_INV_COL - 1) //; correction -1.0 and round\r
-//#define RND_INV_ROW (1024 * (6 - BITS_INV_ACC)) //; 1 << (SHIFT_INV_ROW-1)\r
-//#define RND_INV_COL (16 * (BITS_INV_ACC - 3)) //; 1 << (SHIFT_INV_COL-1)\r
+#define RND_INV_CORR (RND_INV_COL - 1) /*; correction -1.0 and round\r */
+/*#define RND_INV_ROW (1024 * (6 - BITS_INV_ACC)) //; 1 << (SHIFT_INV_ROW-1)\r */
+/*#define RND_INV_COL (16 * (BITS_INV_ACC - 3)) //; 1 << (SHIFT_INV_COL-1)\r */
\r
\r
-//.data\r
-//Align 16\r
+/*.data\r */
+/*Align 16\r */
const static long r_inv_row[2] = { RND_INV_ROW, RND_INV_ROW};\r
const static long r_inv_col[2] = {RND_INV_COL, RND_INV_COL};\r
const static long r_inv_corr[2] = {RND_INV_CORR, RND_INV_CORR };\r
\r
-//const static short r_inv_col[4] = \r
-// {RND_INV_COL, RND_INV_COL, RND_INV_COL, RND_INV_COL};\r
-//const static short r_inv_corr[4] =\r
-// {RND_INV_CORR, RND_INV_CORR, RND_INV_CORR, RND_INV_CORR};\r
+/*const static short r_inv_col[4] = \r */
+/* {RND_INV_COL, RND_INV_COL, RND_INV_COL, RND_INV_COL};\r */
+/*const static short r_inv_corr[4] =\r */
+/* {RND_INV_CORR, RND_INV_CORR, RND_INV_CORR, RND_INV_CORR};\r */
\r
/* constants for the forward DCT\r
\r
-//#define BITS_FRW_ACC 3 //; 2 or 3 for accuracy\r
-//#define SHIFT_FRW_COL BITS_FRW_ACC\r
-//#define SHIFT_FRW_ROW (BITS_FRW_ACC + 17)\r
-//#define RND_FRW_ROW (262144 * (BITS_FRW_ACC - 1)) //; 1 << (SHIFT_FRW_ROW-1)\r
+/*#define BITS_FRW_ACC 3 //; 2 or 3 for accuracy\r */
+/*#define SHIFT_FRW_COL BITS_FRW_ACC\r */
+/*#define SHIFT_FRW_ROW (BITS_FRW_ACC + 17)\r */
+/*#define RND_FRW_ROW (262144 * (BITS_FRW_ACC - 1)) //; 1 << (SHIFT_FRW_ROW-1)\r */
\r
const static __int64 one_corr = 0x0001000100010001;\r
const static long r_frw_row[2] = {RND_FRW_ROW, RND_FRW_ROW };\r
\r
-//const static short tg_1_16[4] = {13036, 13036, 13036, 13036 }; //tg * (2<<16) + 0.5\r
-//const static short tg_2_16[4] = {27146, 27146, 27146, 27146 }; //tg * (2<<16) + 0.5\r
-//const static short tg_3_16[4] = {-21746, -21746, -21746, -21746 }; //tg * (2<<16) + 0.5\r
-//const static short cos_4_16[4] = {-19195, -19195, -19195, -19195 }; //cos * (2<<16) + 0.5\r
-//const static short ocos_4_16[4] = {23170, 23170, 23170, 23170 }; //cos * (2<<15) + 0.5\r
+/*const static short tg_1_16[4] = {13036, 13036, 13036, 13036 }; //tg * (2<<16) + 0.5\r */
+/*const static short tg_2_16[4] = {27146, 27146, 27146, 27146 }; //tg * (2<<16) + 0.5\r */
+/*const static short tg_3_16[4] = {-21746, -21746, -21746, -21746 }; //tg * (2<<16) + 0.5\r */
+/*const static short cos_4_16[4] = {-19195, -19195, -19195, -19195 }; //cos * (2<<16) + 0.5\r */
+/*const static short ocos_4_16[4] = {23170, 23170, 23170, 23170 }; //cos * (2<<15) + 0.5\r */
\r
-//concatenated table, for forward DCT transformation\r
+/*concatenated table, for forward DCT transformation\r */
const static short tg_all_16[] = {\r
- 13036, 13036, 13036, 13036, // tg * (2<<16) + 0.5\r
- 27146, 27146, 27146, 27146, //tg * (2<<16) + 0.5\r
- -21746, -21746, -21746, -21746, // tg * (2<<16) + 0.5\r
- -19195, -19195, -19195, -19195, //cos * (2<<16) + 0.5\r
- 23170, 23170, 23170, 23170 }; //cos * (2<<15) + 0.5\r
+ 13036, 13036, 13036, 13036, /* tg * (2<<16) + 0.5\r */
+ 27146, 27146, 27146, 27146, /*tg * (2<<16) + 0.5\r */
+ -21746, -21746, -21746, -21746, /* tg * (2<<16) + 0.5\r */
+ -19195, -19195, -19195, -19195, /*cos * (2<<16) + 0.5\r */
+ 23170, 23170, 23170, 23170 }; /*cos * (2<<15) + 0.5\r */
\r
#define tg_1_16 (tg_all_16 + 0)\r
#define tg_2_16 (tg_all_16 + 8)\r
IF _MMX ; MMX code\r
;=============================================================================\r
\r
-//; Table for rows 0,4 - constants are multiplied by cos_4_16\r
+/*; Table for rows 0,4 - constants are multiplied by cos_4_16\r */
const short tab_i_04[] = {\r
- 16384, 16384, 16384, -16384, // ; movq-> w06 w04 w02 w00\r
- 21407, 8867, 8867, -21407, // w07 w05 w03 w01\r
- 16384, -16384, 16384, 16384, //; w14 w12 w10 w08\r
- -8867, 21407, -21407, -8867, //; w15 w13 w11 w09\r
- 22725, 12873, 19266, -22725, //; w22 w20 w18 w16\r
- 19266, 4520, -4520, -12873, //; w23 w21 w19 w17\r
- 12873, 4520, 4520, 19266, //; w30 w28 w26 w24\r
- -22725, 19266, -12873, -22725 };//w31 w29 w27 w25\r
-\r
-//; Table for rows 1,7 - constants are multiplied by cos_1_16\r
+ 16384, 16384, 16384, -16384, /* ; movq-> w06 w04 w02 w00\r */
+ 21407, 8867, 8867, -21407, /* w07 w05 w03 w01\r */
+ 16384, -16384, 16384, 16384, /*; w14 w12 w10 w08\r */
+ -8867, 21407, -21407, -8867, /*; w15 w13 w11 w09\r */
+ 22725, 12873, 19266, -22725, /*; w22 w20 w18 w16\r */
+ 19266, 4520, -4520, -12873, /*; w23 w21 w19 w17\r */
+ 12873, 4520, 4520, 19266, /*; w30 w28 w26 w24\r */
+ -22725, 19266, -12873, -22725 };/*w31 w29 w27 w25\r */
+\r
+/*; Table for rows 1,7 - constants are multiplied by cos_1_16\r */
const short tab_i_17[] = {\r
- 22725, 22725, 22725, -22725, // ; movq-> w06 w04 w02 w00\r
- 29692, 12299, 12299, -29692, // ; w07 w05 w03 w01\r
- 22725, -22725, 22725, 22725, //; w14 w12 w10 w08\r
- -12299, 29692, -29692, -12299, //; w15 w13 w11 w09\r
- 31521, 17855, 26722, -31521, //; w22 w20 w18 w16\r
- 26722, 6270, -6270, -17855, //; w23 w21 w19 w17\r
- 17855, 6270, 6270, 26722, //; w30 w28 w26 w24\r
- -31521, 26722, -17855, -31521}; // w31 w29 w27 w25\r
-\r
-//; Table for rows 2,6 - constants are multiplied by cos_2_16\r
+ 22725, 22725, 22725, -22725, /* ; movq-> w06 w04 w02 w00\r */
+ 29692, 12299, 12299, -29692, /* ; w07 w05 w03 w01\r */
+ 22725, -22725, 22725, 22725, /*; w14 w12 w10 w08\r */
+ -12299, 29692, -29692, -12299, /*; w15 w13 w11 w09\r */
+ 31521, 17855, 26722, -31521, /*; w22 w20 w18 w16\r */
+ 26722, 6270, -6270, -17855, /*; w23 w21 w19 w17\r */
+ 17855, 6270, 6270, 26722, /*; w30 w28 w26 w24\r */
+ -31521, 26722, -17855, -31521}; /* w31 w29 w27 w25\r */
+\r
+/*; Table for rows 2,6 - constants are multiplied by cos_2_16\r */
const short tab_i_26[] = {\r
- 21407, 21407, 21407, -21407, // ; movq-> w06 w04 w02 w00\r
- 27969, 11585, 11585, -27969, // ; w07 w05 w03 w01\r
- 21407, -21407, 21407, 21407, // ; w14 w12 w10 w08\r
- -11585, 27969, -27969, -11585, // ;w15 w13 w11 w09\r
- 29692, 16819, 25172, -29692, // ;w22 w20 w18 w16\r
- 25172, 5906, -5906, -16819, // ;w23 w21 w19 w17\r
- 16819, 5906, 5906, 25172, // ;w30 w28 w26 w24\r
- -29692, 25172, -16819, -29692}; // ;w31 w29 w27 w25\r
+ 21407, 21407, 21407, -21407, /* ; movq-> w06 w04 w02 w00\r */
+ 27969, 11585, 11585, -27969, /* ; w07 w05 w03 w01\r */
+ 21407, -21407, 21407, 21407, /* ; w14 w12 w10 w08\r */
+ -11585, 27969, -27969, -11585, /* ;w15 w13 w11 w09\r */
+ 29692, 16819, 25172, -29692, /* ;w22 w20 w18 w16\r */
+ 25172, 5906, -5906, -16819, /* ;w23 w21 w19 w17\r */
+ 16819, 5906, 5906, 25172, /* ;w30 w28 w26 w24\r */
+ -29692, 25172, -16819, -29692}; /* ;w31 w29 w27 w25\r */
\r
\r
-//; Table for rows 3,5 - constants are multiplied by cos_3_16\r
+/*; Table for rows 3,5 - constants are multiplied by cos_3_16\r */
const short tab_i_35[] = {\r
- 19266, 19266, 19266, -19266, //; movq-> w06 w04 w02 w00\r
- 25172, 10426, 10426, -25172, //; w07 w05 w03 w01\r
- 19266, -19266, 19266, 19266, //; w14 w12 w10 w08\r
- -10426, 25172, -25172, -10426, //; w15 w13 w11 w09\r
- 26722, 15137, 22654, -26722, //; w22 w20 w18 w16\r
- 22654, 5315, -5315, -15137, //; w23 w21 w19 w17\r
- 15137, 5315, 5315, 22654, //; w30 w28 w26 w24\r
- -26722, 22654, -15137, -26722}; //; w31 w29 w27 w25\r
+ 19266, 19266, 19266, -19266, /*; movq-> w06 w04 w02 w00\r */
+ 25172, 10426, 10426, -25172, /*; w07 w05 w03 w01\r */
+ 19266, -19266, 19266, 19266, /*; w14 w12 w10 w08\r */
+ -10426, 25172, -25172, -10426, /*; w15 w13 w11 w09\r */
+ 26722, 15137, 22654, -26722, /*; w22 w20 w18 w16\r */
+ 22654, 5315, -5315, -15137, /*; w23 w21 w19 w17\r */
+ 15137, 5315, 5315, 22654, /*; w30 w28 w26 w24\r */
+ -26722, 22654, -15137, -26722}; /*; w31 w29 w27 w25\r */
*/\r
\r
-// CONCATENATED TABLE, rows 0,1,2,3,4,5,6,7 (in order )\r
-//\r
-// In our implementation, however, we only use row0 !\r
-//\r
+/* CONCATENATED TABLE, rows 0,1,2,3,4,5,6,7 (in order )\r */
+/*\r */
+/* In our implementation, however, we only use row0 !\r */
+/*\r */
static const short tab_i_01234567[] = {\r
- //row0, this row is required\r
- 16384, 16384, 16384, -16384, // ; movq-> w06 w04 w02 w00\r
- 21407, 8867, 8867, -21407, // w07 w05 w03 w01\r
- 16384, -16384, 16384, 16384, //; w14 w12 w10 w08\r
- -8867, 21407, -21407, -8867, //; w15 w13 w11 w09\r
- 22725, 12873, 19266, -22725, //; w22 w20 w18 w16\r
- 19266, 4520, -4520, -12873, //; w23 w21 w19 w17\r
- 12873, 4520, 4520, 19266, //; w30 w28 w26 w24\r
- -22725, 19266, -12873, -22725, //w31 w29 w27 w25\r
-\r
- // the rest of these rows (1-7), aren't used !\r
-\r
- //row1\r
- 22725, 22725, 22725, -22725, // ; movq-> w06 w04 w02 w00\r
- 29692, 12299, 12299, -29692, // ; w07 w05 w03 w01\r
- 22725, -22725, 22725, 22725, //; w14 w12 w10 w08\r
- -12299, 29692, -29692, -12299, //; w15 w13 w11 w09\r
- 31521, 17855, 26722, -31521, //; w22 w20 w18 w16\r
- 26722, 6270, -6270, -17855, //; w23 w21 w19 w17\r
- 17855, 6270, 6270, 26722, //; w30 w28 w26 w24\r
- -31521, 26722, -17855, -31521, // w31 w29 w27 w25\r
-\r
- //row2\r
- 21407, 21407, 21407, -21407, // ; movq-> w06 w04 w02 w00\r
- 27969, 11585, 11585, -27969, // ; w07 w05 w03 w01\r
- 21407, -21407, 21407, 21407, // ; w14 w12 w10 w08\r
- -11585, 27969, -27969, -11585, // ;w15 w13 w11 w09\r
- 29692, 16819, 25172, -29692, // ;w22 w20 w18 w16\r
- 25172, 5906, -5906, -16819, // ;w23 w21 w19 w17\r
- 16819, 5906, 5906, 25172, // ;w30 w28 w26 w24\r
- -29692, 25172, -16819, -29692, // ;w31 w29 w27 w25\r
-\r
- //row3\r
- 19266, 19266, 19266, -19266, //; movq-> w06 w04 w02 w00\r
- 25172, 10426, 10426, -25172, //; w07 w05 w03 w01\r
- 19266, -19266, 19266, 19266, //; w14 w12 w10 w08\r
- -10426, 25172, -25172, -10426, //; w15 w13 w11 w09\r
- 26722, 15137, 22654, -26722, //; w22 w20 w18 w16\r
- 22654, 5315, -5315, -15137, //; w23 w21 w19 w17\r
- 15137, 5315, 5315, 22654, //; w30 w28 w26 w24\r
- -26722, 22654, -15137, -26722, //; w31 w29 w27 w25\r
-\r
- //row4\r
- 16384, 16384, 16384, -16384, // ; movq-> w06 w04 w02 w00\r
- 21407, 8867, 8867, -21407, // w07 w05 w03 w01\r
- 16384, -16384, 16384, 16384, //; w14 w12 w10 w08\r
- -8867, 21407, -21407, -8867, //; w15 w13 w11 w09\r
- 22725, 12873, 19266, -22725, //; w22 w20 w18 w16\r
- 19266, 4520, -4520, -12873, //; w23 w21 w19 w17\r
- 12873, 4520, 4520, 19266, //; w30 w28 w26 w24\r
- -22725, 19266, -12873, -22725, //w31 w29 w27 w25\r
-\r
- //row5\r
- 19266, 19266, 19266, -19266, //; movq-> w06 w04 w02 w00\r
- 25172, 10426, 10426, -25172, //; w07 w05 w03 w01\r
- 19266, -19266, 19266, 19266, //; w14 w12 w10 w08\r
- -10426, 25172, -25172, -10426, //; w15 w13 w11 w09\r
- 26722, 15137, 22654, -26722, //; w22 w20 w18 w16\r
- 22654, 5315, -5315, -15137, //; w23 w21 w19 w17\r
- 15137, 5315, 5315, 22654, //; w30 w28 w26 w24\r
- -26722, 22654, -15137, -26722, //; w31 w29 w27 w25\r
-\r
- //row6\r
- 21407, 21407, 21407, -21407, // ; movq-> w06 w04 w02 w00\r
- 27969, 11585, 11585, -27969, // ; w07 w05 w03 w01\r
- 21407, -21407, 21407, 21407, // ; w14 w12 w10 w08\r
- -11585, 27969, -27969, -11585, // ;w15 w13 w11 w09\r
- 29692, 16819, 25172, -29692, // ;w22 w20 w18 w16\r
- 25172, 5906, -5906, -16819, // ;w23 w21 w19 w17\r
- 16819, 5906, 5906, 25172, // ;w30 w28 w26 w24\r
- -29692, 25172, -16819, -29692, // ;w31 w29 w27 w25\r
-\r
- //row7\r
- 22725, 22725, 22725, -22725, // ; movq-> w06 w04 w02 w00\r
- 29692, 12299, 12299, -29692, // ; w07 w05 w03 w01\r
- 22725, -22725, 22725, 22725, //; w14 w12 w10 w08\r
- -12299, 29692, -29692, -12299, //; w15 w13 w11 w09\r
- 31521, 17855, 26722, -31521, //; w22 w20 w18 w16\r
- 26722, 6270, -6270, -17855, //; w23 w21 w19 w17\r
- 17855, 6270, 6270, 26722, //; w30 w28 w26 w24\r
- -31521, 26722, -17855, -31521}; // w31 w29 w27 w25\r
-\r
-\r
-#define INP eax // pointer to (short *blk)\r
-#define OUT ecx // pointer to output (temporary store space qwTemp[])\r
-#define TABLE ebx // pointer to tab_i_01234567[]\r
+ /*row0, this row is required\r */
+ 16384, 16384, 16384, -16384, /* ; movq-> w06 w04 w02 w00\r */
+ 21407, 8867, 8867, -21407, /* w07 w05 w03 w01\r */
+ 16384, -16384, 16384, 16384, /*; w14 w12 w10 w08\r */
+ -8867, 21407, -21407, -8867, /*; w15 w13 w11 w09\r */
+ 22725, 12873, 19266, -22725, /*; w22 w20 w18 w16\r */
+ 19266, 4520, -4520, -12873, /*; w23 w21 w19 w17\r */
+ 12873, 4520, 4520, 19266, /*; w30 w28 w26 w24\r */
+ -22725, 19266, -12873, -22725, /*w31 w29 w27 w25\r */
+\r
+ /* the rest of these rows (1-7), aren't used !\r */
+\r
+ /*row1\r */
+ 22725, 22725, 22725, -22725, /* ; movq-> w06 w04 w02 w00\r */
+ 29692, 12299, 12299, -29692, /* ; w07 w05 w03 w01\r */
+ 22725, -22725, 22725, 22725, /*; w14 w12 w10 w08\r */
+ -12299, 29692, -29692, -12299, /*; w15 w13 w11 w09\r */
+ 31521, 17855, 26722, -31521, /*; w22 w20 w18 w16\r */
+ 26722, 6270, -6270, -17855, /*; w23 w21 w19 w17\r */
+ 17855, 6270, 6270, 26722, /*; w30 w28 w26 w24\r */
+ -31521, 26722, -17855, -31521, /* w31 w29 w27 w25\r */
+\r
+ /*row2\r */
+ 21407, 21407, 21407, -21407, /* ; movq-> w06 w04 w02 w00\r */
+ 27969, 11585, 11585, -27969, /* ; w07 w05 w03 w01\r */
+ 21407, -21407, 21407, 21407, /* ; w14 w12 w10 w08\r */
+ -11585, 27969, -27969, -11585, /* ;w15 w13 w11 w09\r */
+ 29692, 16819, 25172, -29692, /* ;w22 w20 w18 w16\r */
+ 25172, 5906, -5906, -16819, /* ;w23 w21 w19 w17\r */
+ 16819, 5906, 5906, 25172, /* ;w30 w28 w26 w24\r */
+ -29692, 25172, -16819, -29692, /* ;w31 w29 w27 w25\r */
+\r
+ /*row3\r */
+ 19266, 19266, 19266, -19266, /*; movq-> w06 w04 w02 w00\r */
+ 25172, 10426, 10426, -25172, /*; w07 w05 w03 w01\r */
+ 19266, -19266, 19266, 19266, /*; w14 w12 w10 w08\r */
+ -10426, 25172, -25172, -10426, /*; w15 w13 w11 w09\r */
+ 26722, 15137, 22654, -26722, /*; w22 w20 w18 w16\r */
+ 22654, 5315, -5315, -15137, /*; w23 w21 w19 w17\r */
+ 15137, 5315, 5315, 22654, /*; w30 w28 w26 w24\r */
+ -26722, 22654, -15137, -26722, /*; w31 w29 w27 w25\r */
+\r
+ /*row4\r */
+ 16384, 16384, 16384, -16384, /* ; movq-> w06 w04 w02 w00\r */
+ 21407, 8867, 8867, -21407, /* w07 w05 w03 w01\r */
+ 16384, -16384, 16384, 16384, /*; w14 w12 w10 w08\r */
+ -8867, 21407, -21407, -8867, /*; w15 w13 w11 w09\r */
+ 22725, 12873, 19266, -22725, /*; w22 w20 w18 w16\r */
+ 19266, 4520, -4520, -12873, /*; w23 w21 w19 w17\r */
+ 12873, 4520, 4520, 19266, /*; w30 w28 w26 w24\r */
+ -22725, 19266, -12873, -22725, /*w31 w29 w27 w25\r */
+\r
+ /*row5\r */
+ 19266, 19266, 19266, -19266, /*; movq-> w06 w04 w02 w00\r */
+ 25172, 10426, 10426, -25172, /*; w07 w05 w03 w01\r */
+ 19266, -19266, 19266, 19266, /*; w14 w12 w10 w08\r */
+ -10426, 25172, -25172, -10426, /*; w15 w13 w11 w09\r */
+ 26722, 15137, 22654, -26722, /*; w22 w20 w18 w16\r */
+ 22654, 5315, -5315, -15137, /*; w23 w21 w19 w17\r */
+ 15137, 5315, 5315, 22654, /*; w30 w28 w26 w24\r */
+ -26722, 22654, -15137, -26722, /*; w31 w29 w27 w25\r */
+\r
+ /*row6\r */
+ 21407, 21407, 21407, -21407, /* ; movq-> w06 w04 w02 w00\r */
+ 27969, 11585, 11585, -27969, /* ; w07 w05 w03 w01\r */
+ 21407, -21407, 21407, 21407, /* ; w14 w12 w10 w08\r */
+ -11585, 27969, -27969, -11585, /* ;w15 w13 w11 w09\r */
+ 29692, 16819, 25172, -29692, /* ;w22 w20 w18 w16\r */
+ 25172, 5906, -5906, -16819, /* ;w23 w21 w19 w17\r */
+ 16819, 5906, 5906, 25172, /* ;w30 w28 w26 w24\r */
+ -29692, 25172, -16819, -29692, /* ;w31 w29 w27 w25\r */
+\r
+ /*row7\r */
+ 22725, 22725, 22725, -22725, /* ; movq-> w06 w04 w02 w00\r */
+ 29692, 12299, 12299, -29692, /* ; w07 w05 w03 w01\r */
+ 22725, -22725, 22725, 22725, /*; w14 w12 w10 w08\r */
+ -12299, 29692, -29692, -12299, /*; w15 w13 w11 w09\r */
+ 31521, 17855, 26722, -31521, /*; w22 w20 w18 w16\r */
+ 26722, 6270, -6270, -17855, /*; w23 w21 w19 w17\r */
+ 17855, 6270, 6270, 26722, /*; w30 w28 w26 w24\r */
+ -31521, 26722, -17855, -31521}; /* w31 w29 w27 w25\r */
+\r
+\r
+#define INP eax /* pointer to (short *blk)\r */
+#define OUT ecx /* pointer to output (temporary store space qwTemp[])\r */
+#define TABLE ebx /* pointer to tab_i_01234567[]\r */
#define round_inv_row edx\r
#define round_inv_col edx\r
\r
-#define ROW_STRIDE 8 // for 8x8 matrix transposer\r
+#define ROW_STRIDE 8 /* for 8x8 matrix transposer\r */
\r
-// private variables and functions\r
+/* private variables and functions\r */
\r
-//temporary storage space, 8x8 of shorts\r
+/*temporary storage space, 8x8 of shorts\r */
\r
-__inline static void idct_mmx32_rows( short *blk ); // transform rows\r
-__inline static void idct_mmx32_cols( short *blk ); // transform "columns"\r
- // the "column" transform actually transforms rows, it is\r
- // identical to the row-transform except for the ROUNDING\r
- // and SHIFTING coefficients.\r
+__inline static void idct_mmx32_rows( short *blk ); /* transform rows\r */
+__inline static void idct_mmx32_cols( short *blk ); /* transform "columns"\r */
+ /* the "column" transform actually transforms rows, it is\r */
+ /* identical to the row-transform except for the ROUNDING\r */
+ /* and SHIFTING coefficients.\r */
\r
\r
static void \r
-idct_mmx32_rows( short *blk ) // transform all 8 rows of 8x8 iDCT block\r
+idct_mmx32_rows( short *blk ) /* transform all 8 rows of 8x8 iDCT block\r */
{\r
int x;\r
short qwTemp[64];\r
short *out = &qwTemp[0];\r
short *inptr = blk;\r
- // this subroutine performs two operations\r
- // 1) iDCT row transform\r
- // for( i = 0; i < 8; ++ i)\r
- // DCT_8_INV_ROW_1( blk[i*8], qwTemp[i] );\r
- //\r
- // 2) transpose the matrix (which was stored in qwTemp[])\r
- // qwTemp[] -> [8x8 matrix transpose] -> blk[]\r
+ /* this subroutine performs two operations\r */
+ /* 1) iDCT row transform\r */
+ /* for( i = 0; i < 8; ++ i)\r */
+ /* DCT_8_INV_ROW_1( blk[i*8], qwTemp[i] );\r */
+ /*\r */
+ /* 2) transpose the matrix (which was stored in qwTemp[])\r */
+ /* qwTemp[] -> [8x8 matrix transpose] -> blk[]\r */
\r
- for (x=0; x<8; x++) { // transform one row per iteration\r
- movq_m2r(*(inptr), mm0); // 0 ; x3 x2 x1 x0\r
+ for (x=0; x<8; x++) { /* transform one row per iteration\r */
+ movq_m2r(*(inptr), mm0); /* 0 ; x3 x2 x1 x0\r */
\r
- movq_m2r(*(inptr+4), mm1); // 1 ; x7 x6 x5 x4\r
- movq_r2r(mm0, mm2); // 2 ; x3 x2 x1 x0\r
+ movq_m2r(*(inptr+4), mm1); /* 1 ; x7 x6 x5 x4\r */
+ movq_r2r(mm0, mm2); /* 2 ; x3 x2 x1 x0\r */
\r
- movq_m2r(*(tab_i_01234567), mm3); // 3 ; w06 w04 w02 w00\r
- punpcklwd_r2r(mm1, mm0); // x5 x1 x4 x0\r
+ movq_m2r(*(tab_i_01234567), mm3); /* 3 ; w06 w04 w02 w00\r */
+ punpcklwd_r2r(mm1, mm0); /* x5 x1 x4 x0\r */
\r
- // ----------\r
- movq_r2r(mm0, mm5); // 5 ; x5 x1 x4 x0\r
- punpckldq_r2r(mm0, mm0); // x4 x0 x4 x0\r
+ /* ----------\r */
+ movq_r2r(mm0, mm5); /* 5 ; x5 x1 x4 x0\r */
+ punpckldq_r2r(mm0, mm0); /* x4 x0 x4 x0\r */
\r
- movq_m2r(*(tab_i_01234567+4), mm4); // 4 ; w07 w05 w03 w01\r
- punpckhwd_r2r(mm1, mm2); // 1 ; x7 x3 x6 x2\r
+ movq_m2r(*(tab_i_01234567+4), mm4); /* 4 ; w07 w05 w03 w01\r */
+ punpckhwd_r2r(mm1, mm2); /* 1 ; x7 x3 x6 x2\r */
\r
- pmaddwd_r2r(mm0, mm3); // x4*w06+x0*w04 x4*w02+x0*w00\r
- movq_r2r(mm2, mm6); // 6 ; x7 x3 x6 x2\r
+ pmaddwd_r2r(mm0, mm3); /* x4*w06+x0*w04 x4*w02+x0*w00\r */
+ movq_r2r(mm2, mm6); /* 6 ; x7 x3 x6 x2\r */
\r
- movq_m2r(*(tab_i_01234567+16), mm1);// 1 ; w22 w20 w18 w16\r
- punpckldq_r2r(mm2, mm2); // x6 x2 x6 x2\r
+ movq_m2r(*(tab_i_01234567+16), mm1);/* 1 ; w22 w20 w18 w16\r */
+ punpckldq_r2r(mm2, mm2); /* x6 x2 x6 x2\r */
\r
- pmaddwd_r2r(mm2, mm4); // x6*w07+x2*w05 x6*w03+x2*w01\r
- punpckhdq_r2r(mm5, mm5); // x5 x1 x5 x1\r
+ pmaddwd_r2r(mm2, mm4); /* x6*w07+x2*w05 x6*w03+x2*w01\r */
+ punpckhdq_r2r(mm5, mm5); /* x5 x1 x5 x1\r */
\r
- pmaddwd_m2r(*(tab_i_01234567+8), mm0);// x4*w14+x0*w12 x4*w10+x0*w08\r
- punpckhdq_r2r(mm6, mm6); // x7 x3 x7 x3\r
+ pmaddwd_m2r(*(tab_i_01234567+8), mm0);/* x4*w14+x0*w12 x4*w10+x0*w08\r */
+ punpckhdq_r2r(mm6, mm6); /* x7 x3 x7 x3\r */
\r
- movq_m2r(*(tab_i_01234567+20), mm7);// 7 ; w23 w21 w19 w17\r
- pmaddwd_r2r(mm5, mm1); // x5*w22+x1*w20 x5*w18+x1*w16\r
+ movq_m2r(*(tab_i_01234567+20), mm7);/* 7 ; w23 w21 w19 w17\r */
+ pmaddwd_r2r(mm5, mm1); /* x5*w22+x1*w20 x5*w18+x1*w16\r */
\r
- paddd_m2r(*(r_inv_row), mm3);// +rounder\r
- pmaddwd_r2r(mm6, mm7); // x7*w23+x3*w21 x7*w19+x3*w17\r
+ paddd_m2r(*(r_inv_row), mm3);/* +rounder\r */
+ pmaddwd_r2r(mm6, mm7); /* x7*w23+x3*w21 x7*w19+x3*w17\r */
\r
- pmaddwd_m2r(*(tab_i_01234567+12), mm2);// x6*w15+x2*w13 x6*w11+x2*w09\r
- paddd_r2r(mm4, mm3); // 4 ; a1=sum(even1) a0=sum(even0)\r
+ pmaddwd_m2r(*(tab_i_01234567+12), mm2);/* x6*w15+x2*w13 x6*w11+x2*w09\r */
+ paddd_r2r(mm4, mm3); /* 4 ; a1=sum(even1) a0=sum(even0)\r */
\r
- pmaddwd_m2r(*(tab_i_01234567+24), mm5);// x5*w30+x1*w28 x5*w26+x1*w24\r
- movq_r2r(mm3, mm4); // 4 ; a1 a0\r
+ pmaddwd_m2r(*(tab_i_01234567+24), mm5);/* x5*w30+x1*w28 x5*w26+x1*w24\r */
+ movq_r2r(mm3, mm4); /* 4 ; a1 a0\r */
\r
- pmaddwd_m2r(*(tab_i_01234567+28), mm6);// x7*w31+x3*w29 x7*w27+x3*w25\r
- paddd_r2r(mm7, mm1); // 7 ; b1=sum(odd1) b0=sum(odd0)\r
+ pmaddwd_m2r(*(tab_i_01234567+28), mm6);/* x7*w31+x3*w29 x7*w27+x3*w25\r */
+ paddd_r2r(mm7, mm1); /* 7 ; b1=sum(odd1) b0=sum(odd0)\r */
\r
- paddd_m2r(*(r_inv_row), mm0);// +rounder\r
- psubd_r2r(mm1, mm3); // a1-b1 a0-b0\r
+ paddd_m2r(*(r_inv_row), mm0);/* +rounder\r */
+ psubd_r2r(mm1, mm3); /* a1-b1 a0-b0\r */
\r
- psrad_i2r(SHIFT_INV_ROW, mm3); // y6=a1-b1 y7=a0-b0\r
- paddd_r2r(mm4, mm1); // 4 ; a1+b1 a0+b0\r
+ psrad_i2r(SHIFT_INV_ROW, mm3); /* y6=a1-b1 y7=a0-b0\r */
+ paddd_r2r(mm4, mm1); /* 4 ; a1+b1 a0+b0\r */
\r
- paddd_r2r(mm2, mm0); // 2 ; a3=sum(even3) a2=sum(even2)\r
- psrad_i2r(SHIFT_INV_ROW, mm1); // y1=a1+b1 y0=a0+b0\r
+ paddd_r2r(mm2, mm0); /* 2 ; a3=sum(even3) a2=sum(even2)\r */
+ psrad_i2r(SHIFT_INV_ROW, mm1); /* y1=a1+b1 y0=a0+b0\r */
\r
- paddd_r2r(mm6, mm5); // 6 ; b3=sum(odd3) b2=sum(odd2)\r
- movq_r2r(mm0, mm4); // 4 ; a3 a2\r
+ paddd_r2r(mm6, mm5); /* 6 ; b3=sum(odd3) b2=sum(odd2)\r */
+ movq_r2r(mm0, mm4); /* 4 ; a3 a2\r */
\r
- paddd_r2r(mm5, mm0); // a3+b3 a2+b2\r
- psubd_r2r(mm5, mm4); // 5 ; a3-b3 a2-b2\r
+ paddd_r2r(mm5, mm0); /* a3+b3 a2+b2\r */
+ psubd_r2r(mm5, mm4); /* 5 ; a3-b3 a2-b2\r */
\r
- psrad_i2r(SHIFT_INV_ROW, mm4); // y4=a3-b3 y5=a2-b2\r
- psrad_i2r(SHIFT_INV_ROW, mm0); // y3=a3+b3 y2=a2+b2\r
+ psrad_i2r(SHIFT_INV_ROW, mm4); /* y4=a3-b3 y5=a2-b2\r */
+ psrad_i2r(SHIFT_INV_ROW, mm0); /* y3=a3+b3 y2=a2+b2\r */
\r
- packssdw_r2r(mm3, mm4); // 3 ; y6 y7 y4 y5\r
+ packssdw_r2r(mm3, mm4); /* 3 ; y6 y7 y4 y5\r */
\r
- packssdw_r2r(mm0, mm1); // 0 ; y3 y2 y1 y0\r
- movq_r2r(mm4, mm7); // 7 ; y6 y7 y4 y5\r
+ packssdw_r2r(mm0, mm1); /* 0 ; y3 y2 y1 y0\r */
+ movq_r2r(mm4, mm7); /* 7 ; y6 y7 y4 y5\r */
\r
- psrld_i2r(16, mm4); // 0 y6 0 y4\r
+ psrld_i2r(16, mm4); /* 0 y6 0 y4\r */
\r
- movq_r2m(mm1, *(out)); // 1 ; save y3 y2 y1 y0\r
- pslld_i2r(16, mm7); // y7 0 y5 0\r
+ movq_r2m(mm1, *(out)); /* 1 ; save y3 y2 y1 y0\r */
+ pslld_i2r(16, mm7); /* y7 0 y5 0\r */
\r
- por_r2r(mm4, mm7); // 4 ; y7 y6 y5 y4\r
+ por_r2r(mm4, mm7); /* 4 ; y7 y6 y5 y4\r */
\r
- // begin processing row 1\r
- movq_r2m(mm7, *(out+4)); // 7 ; save y7 y6 y5 y4\r
+ /* begin processing row 1\r */
+ movq_r2m(mm7, *(out+4)); /* 7 ; save y7 y6 y5 y4\r */
\r
inptr += 8;\r
out += 8;\r
}\r
\r
\r
- // done with the iDCT row-transformation\r
+ /* done with the iDCT row-transformation\r */
\r
- // now we have to transpose the output 8x8 matrix\r
- // 8x8 (OUT) -> 8x8't' (IN)\r
- // the transposition is implemented as 4 sub-operations.\r
- // 1) transpose upper-left quad\r
- // 2) transpose lower-right quad\r
- // 3) transpose lower-left quad\r
- // 4) transpose upper-right quad\r
+ /* now we have to transpose the output 8x8 matrix\r */
+ /* 8x8 (OUT) -> 8x8't' (IN)\r */
+ /* the transposition is implemented as 4 sub-operations.\r */
+ /* 1) transpose upper-left quad\r */
+ /* 2) transpose lower-right quad\r */
+ /* 3) transpose lower-left quad\r */
+ /* 4) transpose upper-right quad\r */
\r
\r
- // mm0 = 1st row [ A B C D ] row1\r
- // mm1 = 2nd row [ E F G H ] 2\r
- // mm2 = 3rd row [ I J K L ] 3\r
- // mm3 = 4th row [ M N O P ] 4\r
+ /* mm0 = 1st row [ A B C D ] row1\r */
+ /* mm1 = 2nd row [ E F G H ] 2\r */
+ /* mm2 = 3rd row [ I J K L ] 3\r */
+ /* mm3 = 4th row [ M N O P ] 4\r */
\r
- // 1) transpose upper-left quad\r
+ /* 1) transpose upper-left quad\r */
out = &qwTemp[0];\r
\r
movq_m2r(*(out + ROW_STRIDE * 0), mm0);\r
\r
movq_m2r(*(out + ROW_STRIDE * 1), mm1);\r
- movq_r2r(mm0, mm4); // mm4 = copy of row1[A B C D]\r
+ movq_r2r(mm0, mm4); /* mm4 = copy of row1[A B C D]\r */
\r
movq_m2r(*(out + ROW_STRIDE * 2), mm2);\r
- punpcklwd_r2r(mm1, mm0); // mm0 = [ 0 4 1 5]\r
+ punpcklwd_r2r(mm1, mm0); /* mm0 = [ 0 4 1 5]\r */
\r
movq_m2r(*(out + ROW_STRIDE * 3), mm3);\r
- punpckhwd_r2r(mm1, mm4); // mm4 = [ 2 6 3 7]\r
+ punpckhwd_r2r(mm1, mm4); /* mm4 = [ 2 6 3 7]\r */
\r
movq_r2r(mm2, mm6);\r
- punpcklwd_r2r(mm3, mm2); // mm2 = [ 8 12 9 13]\r
+ punpcklwd_r2r(mm3, mm2); /* mm2 = [ 8 12 9 13]\r */
\r
- punpckhwd_r2r(mm3, mm6); // mm6 = 10 14 11 15]\r
- movq_r2r(mm0, mm1); // mm1 = [ 0 4 1 5]\r
+ punpckhwd_r2r(mm3, mm6); /* mm6 = 10 14 11 15]\r */
+ movq_r2r(mm0, mm1); /* mm1 = [ 0 4 1 5]\r */
\r
inptr = blk;\r
\r
- punpckldq_r2r(mm2, mm0); // final result mm0 = row1 [0 4 8 12]\r
+ punpckldq_r2r(mm2, mm0); /* final result mm0 = row1 [0 4 8 12]\r */
\r
- movq_r2r(mm4, mm3); // mm3 = [ 2 6 3 7]\r
- punpckhdq_r2r(mm2, mm1); // mm1 = final result mm1 = row2 [1 5 9 13]\r
+ movq_r2r(mm4, mm3); /* mm3 = [ 2 6 3 7]\r */
+ punpckhdq_r2r(mm2, mm1); /* mm1 = final result mm1 = row2 [1 5 9 13]\r */
\r
- movq_r2m(mm0, *(inptr + ROW_STRIDE * 0)); // store row 1\r
- punpckldq_r2r(mm6, mm4); // final result mm4 = row3 [2 6 10 14]\r
+ movq_r2m(mm0, *(inptr + ROW_STRIDE * 0)); /* store row 1\r */
+ punpckldq_r2r(mm6, mm4); /* final result mm4 = row3 [2 6 10 14]\r */
\r
-// begin reading next quadrant (lower-right)\r
+/* begin reading next quadrant (lower-right)\r */
movq_m2r(*(out + ROW_STRIDE*4 + 4), mm0); \r
- punpckhdq_r2r(mm6, mm3); // final result mm3 = row4 [3 7 11 15]\r
+ punpckhdq_r2r(mm6, mm3); /* final result mm3 = row4 [3 7 11 15]\r */
\r
- movq_r2m(mm4, *(inptr + ROW_STRIDE * 2)); // store row 3\r
- movq_r2r(mm0, mm4); // mm4 = copy of row1[A B C D]\r
+ movq_r2m(mm4, *(inptr + ROW_STRIDE * 2)); /* store row 3\r */
+ movq_r2r(mm0, mm4); /* mm4 = copy of row1[A B C D]\r */
\r
- movq_r2m(mm1, *(inptr + ROW_STRIDE * 1)); // store row 2\r
+ movq_r2m(mm1, *(inptr + ROW_STRIDE * 1)); /* store row 2\r */
\r
movq_m2r(*(out + ROW_STRIDE*5 + 4), mm1);\r
\r
- movq_r2m(mm3, *(inptr + ROW_STRIDE * 3)); // store row 4\r
- punpcklwd_r2r(mm1, mm0); // mm0 = [ 0 4 1 5]\r
+ movq_r2m(mm3, *(inptr + ROW_STRIDE * 3)); /* store row 4\r */
+ punpcklwd_r2r(mm1, mm0); /* mm0 = [ 0 4 1 5]\r */
\r
- // 2) transpose lower-right quadrant\r
+ /* 2) transpose lower-right quadrant\r */
\r
-// movq mm0, qword ptr [OUT + ROW_STRIDE*4 + 8]\r
+/* movq mm0, qword ptr [OUT + ROW_STRIDE*4 + 8]\r */
\r
-// movq mm1, qword ptr [OUT + ROW_STRIDE*5 + 8]\r
-// movq mm4, mm0; // mm4 = copy of row1[A B C D]\r
+/* movq mm1, qword ptr [OUT + ROW_STRIDE*5 + 8]\r */
+/* movq mm4, mm0; // mm4 = copy of row1[A B C D]\r */
\r
movq_m2r(*(out + ROW_STRIDE*6 + 4), mm2);\r
-// punpcklwd mm0, mm1; // mm0 = [ 0 4 1 5]\r
- punpckhwd_r2r(mm1, mm4); // mm4 = [ 2 6 3 7]\r
+/* punpcklwd mm0, mm1; // mm0 = [ 0 4 1 5]\r */
+ punpckhwd_r2r(mm1, mm4); /* mm4 = [ 2 6 3 7]\r */
\r
movq_m2r(*(out + ROW_STRIDE*7 + 4), mm3);\r
movq_r2r(mm2, mm6);\r
\r
- punpcklwd_r2r(mm3, mm2); // mm2 = [ 8 12 9 13]\r
- movq_r2r(mm0, mm1); // mm1 = [ 0 4 1 5]\r
+ punpcklwd_r2r(mm3, mm2); /* mm2 = [ 8 12 9 13]\r */
+ movq_r2r(mm0, mm1); /* mm1 = [ 0 4 1 5]\r */
\r
- punpckhwd_r2r(mm3, mm6); // mm6 = 10 14 11 15]\r
- movq_r2r(mm4, mm3); // mm3 = [ 2 6 3 7]\r
+ punpckhwd_r2r(mm3, mm6); /* mm6 = 10 14 11 15]\r */
+ movq_r2r(mm4, mm3); /* mm3 = [ 2 6 3 7]\r */
\r
- punpckldq_r2r(mm2, mm0); // final result mm0 = row1 [0 4 8 12]\r
+ punpckldq_r2r(mm2, mm0); /* final result mm0 = row1 [0 4 8 12]\r */
\r
- punpckhdq_r2r(mm2, mm1); // mm1 = final result mm1 = row2 [1 5 9 13]\r
- ; // slot\r
+ punpckhdq_r2r(mm2, mm1); /* mm1 = final result mm1 = row2 [1 5 9 13]\r */
+ ; /* slot\r */
\r
- movq_r2m(mm0, *(inptr + ROW_STRIDE*4 + 4)); // store row 1\r
- punpckldq_r2r(mm6, mm4); // final result mm4 = row3 [2 6 10 14]\r
+ movq_r2m(mm0, *(inptr + ROW_STRIDE*4 + 4)); /* store row 1\r */
+ punpckldq_r2r(mm6, mm4); /* final result mm4 = row3 [2 6 10 14]\r */
\r
movq_m2r(*(out + ROW_STRIDE * 4 ), mm0);\r
- punpckhdq_r2r(mm6, mm3); // final result mm3 = row4 [3 7 11 15]\r
+ punpckhdq_r2r(mm6, mm3); /* final result mm3 = row4 [3 7 11 15]\r */
\r
- movq_r2m(mm4, *(inptr + ROW_STRIDE*6 + 4)); // store row 3\r
- movq_r2r(mm0, mm4); // mm4 = copy of row1[A B C D]\r
+ movq_r2m(mm4, *(inptr + ROW_STRIDE*6 + 4)); /* store row 3\r */
+ movq_r2r(mm0, mm4); /* mm4 = copy of row1[A B C D]\r */
\r
- movq_r2m(mm1, *(inptr + ROW_STRIDE*5 + 4)); // store row 2\r
- ; // slot\r
+ movq_r2m(mm1, *(inptr + ROW_STRIDE*5 + 4)); /* store row 2\r */
+ ; /* slot\r */
\r
movq_m2r(*(out + ROW_STRIDE * 5 ), mm1);\r
- ; // slot\r
+ ; /* slot\r */
\r
- movq_r2m(mm3, *(inptr + ROW_STRIDE*7 + 4)); // store row 4\r
- punpcklwd_r2r(mm1, mm0); // mm0 = [ 0 4 1 5]\r
+ movq_r2m(mm3, *(inptr + ROW_STRIDE*7 + 4)); /* store row 4\r */
+ punpcklwd_r2r(mm1, mm0); /* mm0 = [ 0 4 1 5]\r */
\r
- // 3) transpose lower-left\r
-// movq mm0, qword ptr [OUT + ROW_STRIDE * 4 ]\r
+ /* 3) transpose lower-left\r */
+/* movq mm0, qword ptr [OUT + ROW_STRIDE * 4 ]\r */
\r
-// movq mm1, qword ptr [OUT + ROW_STRIDE * 5 ]\r
-// movq mm4, mm0; // mm4 = copy of row1[A B C D]\r
+/* movq mm1, qword ptr [OUT + ROW_STRIDE * 5 ]\r */
+/* movq mm4, mm0; // mm4 = copy of row1[A B C D]\r */
\r
movq_m2r(*(out + ROW_STRIDE * 6 ), mm2);\r
-// punpcklwd mm0, mm1; // mm0 = [ 0 4 1 5]\r
- punpckhwd_r2r(mm1, mm4); // mm4 = [ 2 6 3 7]\r
+/* punpcklwd mm0, mm1; // mm0 = [ 0 4 1 5]\r */
+ punpckhwd_r2r(mm1, mm4); /* mm4 = [ 2 6 3 7]\r */
\r
movq_m2r(*(out + ROW_STRIDE * 7 ), mm3);\r
movq_r2r(mm2, mm6);\r
\r
- punpcklwd_r2r(mm3, mm2); // mm2 = [ 8 12 9 13]\r
- movq_r2r(mm0, mm1); // mm1 = [ 0 4 1 5]\r
+ punpcklwd_r2r(mm3, mm2); /* mm2 = [ 8 12 9 13]\r */
+ movq_r2r(mm0, mm1); /* mm1 = [ 0 4 1 5]\r */
\r
- punpckhwd_r2r(mm3, mm6); // mm6 = 10 14 11 15]\r
- movq_r2r(mm4, mm3); // mm3 = [ 2 6 3 7]\r
+ punpckhwd_r2r(mm3, mm6); /* mm6 = 10 14 11 15]\r */
+ movq_r2r(mm4, mm3); /* mm3 = [ 2 6 3 7]\r */
\r
- punpckldq_r2r(mm2, mm0); // final result mm0 = row1 [0 4 8 12]\r
+ punpckldq_r2r(mm2, mm0); /* final result mm0 = row1 [0 4 8 12]\r */
\r
- punpckhdq_r2r(mm2, mm1); // mm1 = final result mm1 = row2 [1 5 9 13]\r
- ;//slot\r
+ punpckhdq_r2r(mm2, mm1); /* mm1 = final result mm1 = row2 [1 5 9 13]\r */
+ ;/*slot\r */
\r
- movq_r2m(mm0, *(inptr + ROW_STRIDE * 0 + 4 )); // store row 1\r
- punpckldq_r2r(mm6, mm4); // final result mm4 = row3 [2 6 10 14]\r
+ movq_r2m(mm0, *(inptr + ROW_STRIDE * 0 + 4 )); /* store row 1\r */
+ punpckldq_r2r(mm6, mm4); /* final result mm4 = row3 [2 6 10 14]\r */
\r
-// begin reading next quadrant (upper-right)\r
+/* begin reading next quadrant (upper-right)\r */
movq_m2r(*(out + ROW_STRIDE*0 + 4), mm0);\r
- punpckhdq_r2r(mm6, mm3); // final result mm3 = row4 [3 7 11 15]\r
+ punpckhdq_r2r(mm6, mm3); /* final result mm3 = row4 [3 7 11 15]\r */
\r
- movq_r2m(mm4, *(inptr + ROW_STRIDE * 2 + 4)); // store row 3\r
- movq_r2r(mm0, mm4); // mm4 = copy of row1[A B C D]\r
+ movq_r2m(mm4, *(inptr + ROW_STRIDE * 2 + 4)); /* store row 3\r */
+ movq_r2r(mm0, mm4); /* mm4 = copy of row1[A B C D]\r */
\r
- movq_r2m(mm1, *(inptr + ROW_STRIDE * 1 + 4)); // store row 2\r
+ movq_r2m(mm1, *(inptr + ROW_STRIDE * 1 + 4)); /* store row 2\r */
movq_m2r(*(out + ROW_STRIDE*1 + 4), mm1);\r
\r
- movq_r2m(mm3, *(inptr + ROW_STRIDE * 3 + 4)); // store row 4\r
- punpcklwd_r2r(mm1, mm0); // mm0 = [ 0 4 1 5]\r
+ movq_r2m(mm3, *(inptr + ROW_STRIDE * 3 + 4)); /* store row 4\r */
+ punpcklwd_r2r(mm1, mm0); /* mm0 = [ 0 4 1 5]\r */
\r
\r
- // 2) transpose lower-right quadrant\r
+ /* 2) transpose lower-right quadrant\r */
\r
-// movq mm0, qword ptr [OUT + ROW_STRIDE*4 + 8]\r
+/* movq mm0, qword ptr [OUT + ROW_STRIDE*4 + 8]\r */
\r
-// movq mm1, qword ptr [OUT + ROW_STRIDE*5 + 8]\r
-// movq mm4, mm0; // mm4 = copy of row1[A B C D]\r
+/* movq mm1, qword ptr [OUT + ROW_STRIDE*5 + 8]\r */
+/* movq mm4, mm0; // mm4 = copy of row1[A B C D]\r */
\r
movq_m2r(*(out + ROW_STRIDE*2 + 4), mm2);\r
-// punpcklwd mm0, mm1; // mm0 = [ 0 4 1 5]\r
- punpckhwd_r2r(mm1, mm4); // mm4 = [ 2 6 3 7]\r
+/* punpcklwd mm0, mm1; // mm0 = [ 0 4 1 5]\r */
+ punpckhwd_r2r(mm1, mm4); /* mm4 = [ 2 6 3 7]\r */
\r
movq_m2r(*(out + ROW_STRIDE*3 + 4), mm3);\r
movq_r2r(mm2, mm6);\r
\r
- punpcklwd_r2r(mm3, mm2); // mm2 = [ 8 12 9 13]\r
- movq_r2r(mm0, mm1); // mm1 = [ 0 4 1 5]\r
+ punpcklwd_r2r(mm3, mm2); /* mm2 = [ 8 12 9 13]\r */
+ movq_r2r(mm0, mm1); /* mm1 = [ 0 4 1 5]\r */
\r
- punpckhwd_r2r(mm3, mm6); // mm6 = 10 14 11 15]\r
- movq_r2r(mm4, mm3); // mm3 = [ 2 6 3 7]\r
+ punpckhwd_r2r(mm3, mm6); /* mm6 = 10 14 11 15]\r */
+ movq_r2r(mm4, mm3); /* mm3 = [ 2 6 3 7]\r */
\r
- punpckldq_r2r(mm2, mm0); // final result mm0 = row1 [0 4 8 12]\r
+ punpckldq_r2r(mm2, mm0); /* final result mm0 = row1 [0 4 8 12]\r */
\r
- punpckhdq_r2r(mm2, mm1); // mm1 = final result mm1 = row2 [1 5 9 13]\r
- ; // slot\r
+ punpckhdq_r2r(mm2, mm1); /* mm1 = final result mm1 = row2 [1 5 9 13]\r */
+ ; /* slot\r */
\r
- movq_r2m(mm0, *(inptr + ROW_STRIDE*4)); // store row 1\r
- punpckldq_r2r(mm6, mm4); // final result mm4 = row3 [2 6 10 14]\r
+ movq_r2m(mm0, *(inptr + ROW_STRIDE*4)); /* store row 1\r */
+ punpckldq_r2r(mm6, mm4); /* final result mm4 = row3 [2 6 10 14]\r */
\r
- movq_r2m(mm1, *(inptr + ROW_STRIDE*5)); // store row 2\r
- punpckhdq_r2r(mm6, mm3); // final result mm3 = row4 [3 7 11 15]\r
+ movq_r2m(mm1, *(inptr + ROW_STRIDE*5)); /* store row 2\r */
+ punpckhdq_r2r(mm6, mm3); /* final result mm3 = row4 [3 7 11 15]\r */
\r
- movq_r2m(mm4, *(inptr + ROW_STRIDE*6)); // store row 3\r
- ; // slot\r
+ movq_r2m(mm4, *(inptr + ROW_STRIDE*6)); /* store row 3\r */
+ ; /* slot\r */
\r
- movq_r2m(mm3, *(inptr + ROW_STRIDE*7)); // store row 4\r
- ; // slot\r
+ movq_r2m(mm3, *(inptr + ROW_STRIDE*7)); /* store row 4\r */
+ ; /* slot\r */
\r
}\r
\r
\r
static void \r
-idct_mmx32_cols( short *blk ) // transform all 8 cols of 8x8 iDCT block\r
+idct_mmx32_cols( short *blk ) /* transform all 8 cols of 8x8 iDCT block\r */
{\r
int x;\r
short *inptr = blk;\r
\r
- // Despite the function's name, the matrix is transformed\r
- // row by row. This function is identical to idct_mmx32_rows(),\r
- // except for the SHIFT amount and ROUND_INV amount.\r
+ /* Despite the function's name, the matrix is transformed\r */
+ /* row by row. This function is identical to idct_mmx32_rows(),\r */
+ /* except for the SHIFT amount and ROUND_INV amount.\r */
\r
- // this subroutine performs two operations\r
- // 1) iDCT row transform\r
- // for( i = 0; i < 8; ++ i)\r
- // DCT_8_INV_ROW_1( blk[i*8], qwTemp[i] );\r
- //\r
- // 2) transpose the matrix (which was stored in qwTemp[])\r
- // qwTemp[] -> [8x8 matrix transpose] -> blk[]\r
+ /* this subroutine performs two operations\r */
+ /* 1) iDCT row transform\r */
+ /* for( i = 0; i < 8; ++ i)\r */
+ /* DCT_8_INV_ROW_1( blk[i*8], qwTemp[i] );\r */
+ /*\r */
+ /* 2) transpose the matrix (which was stored in qwTemp[])\r */
+ /* qwTemp[] -> [8x8 matrix transpose] -> blk[]\r */
\r
\r
- for (x=0; x<8; x++) { // transform one row per iteration\r
+ for (x=0; x<8; x++) { /* transform one row per iteration\r */
\r
- movq_m2r(*(inptr), mm0); // 0 ; x3 x2 x1 x0\r
+ movq_m2r(*(inptr), mm0); /* 0 ; x3 x2 x1 x0\r */
\r
- movq_m2r(*(inptr+4), mm1); // 1 ; x7 x6 x5 x4\r
- movq_r2r(mm0, mm2); // 2 ; x3 x2 x1 x0\r
+ movq_m2r(*(inptr+4), mm1); /* 1 ; x7 x6 x5 x4\r */
+ movq_r2r(mm0, mm2); /* 2 ; x3 x2 x1 x0\r */
\r
- movq_m2r(*(tab_i_01234567), mm3); // 3 ; w06 w04 w02 w00\r
- punpcklwd_r2r(mm1, mm0); // x5 x1 x4 x0\r
+ movq_m2r(*(tab_i_01234567), mm3); /* 3 ; w06 w04 w02 w00\r */
+ punpcklwd_r2r(mm1, mm0); /* x5 x1 x4 x0\r */
\r
-// ----------\r
- movq_r2r(mm0, mm5); // 5 ; x5 x1 x4 x0\r
- punpckldq_r2r(mm0, mm0); // x4 x0 x4 x0\r
+/* ----------\r */
+ movq_r2r(mm0, mm5); /* 5 ; x5 x1 x4 x0\r */
+ punpckldq_r2r(mm0, mm0); /* x4 x0 x4 x0\r */
\r
- movq_m2r(*(tab_i_01234567+4), mm4); // 4 ; w07 w05 w03 w01\r
- punpckhwd_r2r(mm1, mm2); // 1 ; x7 x3 x6 x2\r
+ movq_m2r(*(tab_i_01234567+4), mm4); /* 4 ; w07 w05 w03 w01\r */
+ punpckhwd_r2r(mm1, mm2); /* 1 ; x7 x3 x6 x2\r */
\r
- pmaddwd_r2r(mm0, mm3); // x4*w06+x0*w04 x4*w02+x0*w00\r
- movq_r2r(mm2, mm6); // 6 ; x7 x3 x6 x2\r
+ pmaddwd_r2r(mm0, mm3); /* x4*w06+x0*w04 x4*w02+x0*w00\r */
+ movq_r2r(mm2, mm6); /* 6 ; x7 x3 x6 x2\r */
\r
- movq_m2r(*(tab_i_01234567+16), mm1);// 1 ; w22 w20 w18 w16\r
- punpckldq_r2r(mm2, mm2); // x6 x2 x6 x2\r
+ movq_m2r(*(tab_i_01234567+16), mm1);/* 1 ; w22 w20 w18 w16\r */
+ punpckldq_r2r(mm2, mm2); /* x6 x2 x6 x2\r */
\r
- pmaddwd_r2r(mm2, mm4); // x6*w07+x2*w05 x6*w03+x2*w01\r
- punpckhdq_r2r(mm5, mm5); // x5 x1 x5 x1\r
+ pmaddwd_r2r(mm2, mm4); /* x6*w07+x2*w05 x6*w03+x2*w01\r */
+ punpckhdq_r2r(mm5, mm5); /* x5 x1 x5 x1\r */
\r
- pmaddwd_m2r(*(tab_i_01234567+8), mm0);// x4*w14+x0*w12 x4*w10+x0*w08\r
- punpckhdq_r2r(mm6, mm6); // x7 x3 x7 x3\r
+ pmaddwd_m2r(*(tab_i_01234567+8), mm0);/* x4*w14+x0*w12 x4*w10+x0*w08\r */
+ punpckhdq_r2r(mm6, mm6); /* x7 x3 x7 x3\r */
\r
- movq_m2r(*(tab_i_01234567+20), mm7);// 7 ; w23 w21 w19 w17\r
- pmaddwd_r2r(mm5, mm1); // x5*w22+x1*w20 x5*w18+x1*w16\r
+ movq_m2r(*(tab_i_01234567+20), mm7);/* 7 ; w23 w21 w19 w17\r */
+ pmaddwd_r2r(mm5, mm1); /* x5*w22+x1*w20 x5*w18+x1*w16\r */
\r
- paddd_m2r(*(r_inv_col), mm3);// +rounder\r
- pmaddwd_r2r(mm6, mm7); // x7*w23+x3*w21 x7*w19+x3*w17\r
+ paddd_m2r(*(r_inv_col), mm3);/* +rounder\r */
+ pmaddwd_r2r(mm6, mm7); /* x7*w23+x3*w21 x7*w19+x3*w17\r */
\r
- pmaddwd_m2r(*(tab_i_01234567+12), mm2);// x6*w15+x2*w13 x6*w11+x2*w09\r
- paddd_r2r(mm4, mm3); // 4 ; a1=sum(even1) a0=sum(even0)\r
+ pmaddwd_m2r(*(tab_i_01234567+12), mm2);/* x6*w15+x2*w13 x6*w11+x2*w09\r */
+ paddd_r2r(mm4, mm3); /* 4 ; a1=sum(even1) a0=sum(even0)\r */
\r
- pmaddwd_m2r(*(tab_i_01234567+24), mm5);// x5*w30+x1*w28 x5*w26+x1*w24\r
- movq_r2r(mm3, mm4); // 4 ; a1 a0\r
+ pmaddwd_m2r(*(tab_i_01234567+24), mm5);/* x5*w30+x1*w28 x5*w26+x1*w24\r */
+ movq_r2r(mm3, mm4); /* 4 ; a1 a0\r */
\r
- pmaddwd_m2r(*(tab_i_01234567+28), mm6);// x7*w31+x3*w29 x7*w27+x3*w25\r
- paddd_r2r(mm7, mm1); // 7 ; b1=sum(odd1) b0=sum(odd0)\r
+ pmaddwd_m2r(*(tab_i_01234567+28), mm6);/* x7*w31+x3*w29 x7*w27+x3*w25\r */
+ paddd_r2r(mm7, mm1); /* 7 ; b1=sum(odd1) b0=sum(odd0)\r */
\r
- paddd_m2r(*(r_inv_col), mm0);// +rounder\r
- psubd_r2r(mm1, mm3); // a1-b1 a0-b0\r
+ paddd_m2r(*(r_inv_col), mm0);/* +rounder\r */
+ psubd_r2r(mm1, mm3); /* a1-b1 a0-b0\r */
\r
- psrad_i2r(SHIFT_INV_COL, mm3); // y6=a1-b1 y7=a0-b0\r
- paddd_r2r(mm4, mm1); // 4 ; a1+b1 a0+b0\r
+ psrad_i2r(SHIFT_INV_COL, mm3); /* y6=a1-b1 y7=a0-b0\r */
+ paddd_r2r(mm4, mm1); /* 4 ; a1+b1 a0+b0\r */
\r
- paddd_r2r(mm2, mm0); // 2 ; a3=sum(even3) a2=sum(even2)\r
- psrad_i2r(SHIFT_INV_COL, mm1); // y1=a1+b1 y0=a0+b0\r
+ paddd_r2r(mm2, mm0); /* 2 ; a3=sum(even3) a2=sum(even2)\r */
+ psrad_i2r(SHIFT_INV_COL, mm1); /* y1=a1+b1 y0=a0+b0\r */
\r
- paddd_r2r(mm6, mm5); // 6 ; b3=sum(odd3) b2=sum(odd2)\r
- movq_r2r(mm0, mm4); // 4 ; a3 a2\r
+ paddd_r2r(mm6, mm5); /* 6 ; b3=sum(odd3) b2=sum(odd2)\r */
+ movq_r2r(mm0, mm4); /* 4 ; a3 a2\r */
\r
- paddd_r2r(mm5, mm0); // a3+b3 a2+b2\r
- psubd_r2r(mm5, mm4); // 5 ; a3-b3 a2-b2\r
+ paddd_r2r(mm5, mm0); /* a3+b3 a2+b2\r */
+ psubd_r2r(mm5, mm4); /* 5 ; a3-b3 a2-b2\r */
\r
\r
- psrad_i2r(SHIFT_INV_COL, mm4); // y4=a3-b3 y5=a2-b2\r
- psrad_i2r(SHIFT_INV_COL, mm0); // y3=a3+b3 y2=a2+b2\r
+ psrad_i2r(SHIFT_INV_COL, mm4); /* y4=a3-b3 y5=a2-b2\r */
+ psrad_i2r(SHIFT_INV_COL, mm0); /* y3=a3+b3 y2=a2+b2\r */
\r
- packssdw_r2r(mm3, mm4); // 3 ; y6 y7 y4 y5\r
+ packssdw_r2r(mm3, mm4); /* 3 ; y6 y7 y4 y5\r */
\r
- packssdw_r2r(mm0, mm1); // 0 ; y3 y2 y1 y0\r
- movq_r2r(mm4, mm7); // 7 ; y6 y7 y4 y5\r
+ packssdw_r2r(mm0, mm1); /* 0 ; y3 y2 y1 y0\r */
+ movq_r2r(mm4, mm7); /* 7 ; y6 y7 y4 y5\r */
\r
- psrld_i2r(16, mm4); // 0 y6 0 y4\r
+ psrld_i2r(16, mm4); /* 0 y6 0 y4\r */
\r
- movq_r2m(mm1, *(inptr)); // 1 ; save y3 y2 y1 y0\r
- pslld_i2r(16, mm7); // y7 0 y5 0\r
+ movq_r2m(mm1, *(inptr)); /* 1 ; save y3 y2 y1 y0\r */
+ pslld_i2r(16, mm7); /* y7 0 y5 0\r */
\r
- por_r2r(mm4, mm7); // 4 ; y7 y6 y5 y4\r
+ por_r2r(mm4, mm7); /* 4 ; y7 y6 y5 y4\r */
\r
- // begin processing row 1\r
- movq_r2m(mm7, *(inptr+4)); // 7 ; save y7 y6 y5 y4\r
+ /* begin processing row 1\r */
+ movq_r2m(mm7, *(inptr+4)); /* 7 ; save y7 y6 y5 y4\r */
\r
inptr += 8;\r
}\r
- // done with the iDCT column-transformation\r
+ /* done with the iDCT column-transformation\r */
}\r
\r
-// \r
-// public interface to MMX32 IDCT 8x8 operation\r
-//\r
+/* \r */
+/* public interface to MMX32 IDCT 8x8 operation\r */
+/*\r */
void\r
gst_idct_mmx32_idct( short *blk )\r
{\r
- // 1) iDCT row transformation\r
- idct_mmx32_rows( blk ); // 1) transform iDCT row, and transpose\r
+ /* 1) iDCT row transformation\r */
+ idct_mmx32_rows( blk ); /* 1) transform iDCT row, and transpose\r */
\r
- // 2) iDCT column transformation\r
- idct_mmx32_cols( blk ); // 2) transform iDCT row, and transpose\r
+ /* 2) iDCT column transformation\r */
+ idct_mmx32_cols( blk ); /* 2) transform iDCT row, and transpose\r */
\r
- emms(); // restore processor state\r
- // all done\r
+ emms(); /* restore processor state\r */
+ /* all done\r */
}\r