[cvs] / xvidcore / src / dct / fdct.c Repository:
ViewVC logotype

Diff of /xvidcore/src/dct/fdct.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1, Fri Mar 8 02:44:39 2002 UTC revision 1.2, Wed Jun 12 20:38:40 2002 UTC
# Line 115  Line 115 
115   * Perform an integer forward DCT on one block of samples.   * Perform an integer forward DCT on one block of samples.
116   */   */
117    
118  void fdct_int32(short * const block)  void
119    fdct_int32(short *const block)
120  {  {
121    int tmp0, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6, tmp7;    int tmp0, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6, tmp7;
122    int tmp10, tmp11, tmp12, tmp13;    int tmp10, tmp11, tmp12, tmp13;
# Line 131  Line 132 
132    
133    dataptr = data;    dataptr = data;
134    blkptr = block;    blkptr = block;
135    for (i = 0; i < 8; i++)          for (i = 0; i < 8; i++) {
   {  
136      tmp0 = blkptr[0] + blkptr[7];      tmp0 = blkptr[0] + blkptr[7];
137      tmp7 = blkptr[0] - blkptr[7];      tmp7 = blkptr[0] - blkptr[7];
138      tmp1 = blkptr[1] + blkptr[6];      tmp1 = blkptr[1] + blkptr[6];
# Line 155  Line 155 
155      dataptr[4] = (tmp10 - tmp11) << PASS1_BITS;      dataptr[4] = (tmp10 - tmp11) << PASS1_BITS;
156    
157      z1 = (tmp12 + tmp13) * FIX_0_541196100;      z1 = (tmp12 + tmp13) * FIX_0_541196100;
158      dataptr[2] = DESCALE(z1 + tmp13 * FIX_0_765366865, CONST_BITS - PASS1_BITS);                  dataptr[2] =
159      dataptr[6] = DESCALE(z1 + tmp12 * (-FIX_1_847759065), CONST_BITS - PASS1_BITS);                          DESCALE(z1 + tmp13 * FIX_0_765366865, CONST_BITS - PASS1_BITS);
160                    dataptr[6] =
161                            DESCALE(z1 + tmp12 * (-FIX_1_847759065), CONST_BITS - PASS1_BITS);
162    
163      /* Odd part per figure 8 --- note paper omits factor of sqrt(2).      /* Odd part per figure 8 --- note paper omits factor of sqrt(2).
164       * cK represents cos(K*pi/16).       * cK represents cos(K*pi/16).
# Line 196  Line 198 
198     */     */
199    
200    dataptr = data;    dataptr = data;
201    for (i = 0; i < 8; i++)          for (i = 0; i < 8; i++) {
   {  
202      tmp0 = dataptr[0] + dataptr[56];      tmp0 = dataptr[0] + dataptr[56];
203      tmp7 = dataptr[0] - dataptr[56];      tmp7 = dataptr[0] - dataptr[56];
204      tmp1 = dataptr[8] + dataptr[48];      tmp1 = dataptr[8] + dataptr[48];
# Line 220  Line 221 
221      dataptr[32] = DESCALE(tmp10 - tmp11, PASS1_BITS);      dataptr[32] = DESCALE(tmp10 - tmp11, PASS1_BITS);
222    
223      z1 = (tmp12 + tmp13) * FIX_0_541196100;      z1 = (tmp12 + tmp13) * FIX_0_541196100;
224      dataptr[16] = DESCALE(z1 + tmp13 * FIX_0_765366865, CONST_BITS + PASS1_BITS);                  dataptr[16] =
225      dataptr[48] = DESCALE(z1 + tmp12 * (-FIX_1_847759065), CONST_BITS + PASS1_BITS);                          DESCALE(z1 + tmp13 * FIX_0_765366865, CONST_BITS + PASS1_BITS);
226                    dataptr[48] =
227                            DESCALE(z1 + tmp12 * (-FIX_1_847759065), CONST_BITS + PASS1_BITS);
228    
229      /* Odd part per figure 8 --- note paper omits factor of sqrt(2).      /* Odd part per figure 8 --- note paper omits factor of sqrt(2).
230       * cK represents cos(K*pi/16).       * cK represents cos(K*pi/16).
# Line 257  Line 260 
260    for (i = 0; i < 64; i++)    for (i = 0; i < 64; i++)
261      block[i] = (short int) DESCALE(data[i], 3);      block[i] = (short int) DESCALE(data[i], 3);
262  }  }
   

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

No admin address has been configured
ViewVC Help
Powered by ViewVC 1.0.4