Mercurial > libavcodec.hg
comparison jfdctint.c @ 10446:f522171a5d3d libavcodec
Remove SHIFT_TEMPS from jfdct code.
Patch by avcoder: our_beloved_project AT gmail DOT com
See thread [FFmpeg-devel] Patch: remove useless SHIFT_TEMPS definition
Date: Tue, 20 Oct 2009 14:29:05 +0800
author | benoit |
---|---|
date | Tue, 20 Oct 2009 11:19:54 +0000 |
parents | e9d9d946f213 |
children | 7dd2a45249a9 |
comparison
equal
deleted
inserted
replaced
10445:4863889843ef | 10446:f522171a5d3d |
---|---|
64 #include <stdlib.h> | 64 #include <stdlib.h> |
65 #include <stdio.h> | 65 #include <stdio.h> |
66 #include "libavutil/common.h" | 66 #include "libavutil/common.h" |
67 #include "dsputil.h" | 67 #include "dsputil.h" |
68 | 68 |
69 #define SHIFT_TEMPS | |
70 #define DCTSIZE 8 | 69 #define DCTSIZE 8 |
71 #define BITS_IN_JSAMPLE 8 | 70 #define BITS_IN_JSAMPLE 8 |
72 #define GLOBAL(x) x | 71 #define GLOBAL(x) x |
73 #define RIGHT_SHIFT(x, n) ((x) >> (n)) | 72 #define RIGHT_SHIFT(x, n) ((x) >> (n)) |
74 #define MULTIPLY16C16(var,const) ((var)*(const)) | 73 #define MULTIPLY16C16(var,const) ((var)*(const)) |
185 int_fast32_t tmp0, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6, tmp7; | 184 int_fast32_t tmp0, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6, tmp7; |
186 int_fast32_t tmp10, tmp11, tmp12, tmp13; | 185 int_fast32_t tmp10, tmp11, tmp12, tmp13; |
187 int_fast32_t z1, z2, z3, z4, z5; | 186 int_fast32_t z1, z2, z3, z4, z5; |
188 DCTELEM *dataptr; | 187 DCTELEM *dataptr; |
189 int ctr; | 188 int ctr; |
190 SHIFT_TEMPS | |
191 | 189 |
192 /* Pass 1: process rows. */ | 190 /* Pass 1: process rows. */ |
193 /* Note results are scaled up by sqrt(8) compared to a true DCT; */ | 191 /* Note results are scaled up by sqrt(8) compared to a true DCT; */ |
194 /* furthermore, we scale the results by 2**PASS1_BITS. */ | 192 /* furthermore, we scale the results by 2**PASS1_BITS. */ |
195 | 193 |
264 int_fast32_t tmp0, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6, tmp7; | 262 int_fast32_t tmp0, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6, tmp7; |
265 int_fast32_t tmp10, tmp11, tmp12, tmp13; | 263 int_fast32_t tmp10, tmp11, tmp12, tmp13; |
266 int_fast32_t z1, z2, z3, z4, z5; | 264 int_fast32_t z1, z2, z3, z4, z5; |
267 DCTELEM *dataptr; | 265 DCTELEM *dataptr; |
268 int ctr; | 266 int ctr; |
269 SHIFT_TEMPS | |
270 | 267 |
271 row_fdct(data); | 268 row_fdct(data); |
272 | 269 |
273 /* Pass 2: process columns. | 270 /* Pass 2: process columns. |
274 * We remove the PASS1_BITS scaling, but leave the results scaled up | 271 * We remove the PASS1_BITS scaling, but leave the results scaled up |
351 int_fast32_t tmp0, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6, tmp7; | 348 int_fast32_t tmp0, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6, tmp7; |
352 int_fast32_t tmp10, tmp11, tmp12, tmp13; | 349 int_fast32_t tmp10, tmp11, tmp12, tmp13; |
353 int_fast32_t z1; | 350 int_fast32_t z1; |
354 DCTELEM *dataptr; | 351 DCTELEM *dataptr; |
355 int ctr; | 352 int ctr; |
356 SHIFT_TEMPS | |
357 | 353 |
358 row_fdct(data); | 354 row_fdct(data); |
359 | 355 |
360 /* Pass 2: process columns. | 356 /* Pass 2: process columns. |
361 * We remove the PASS1_BITS scaling, but leave the results scaled up | 357 * We remove the PASS1_BITS scaling, but leave the results scaled up |