19 |
* along with this program ; if not, write to the Free Software |
* along with this program ; if not, write to the Free Software |
20 |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
21 |
* |
* |
22 |
* $Id: mem_transfer.c,v 1.9.2.2 2003-06-09 13:55:42 edgomez Exp $ |
* $Id: mem_transfer.c,v 1.9.2.3 2003-11-09 20:47:14 edgomez Exp $ |
23 |
* |
* |
24 |
****************************************************************************/ |
****************************************************************************/ |
25 |
|
|
166 |
* |
* |
167 |
* R1 (8bit) = R1 |
* R1 (8bit) = R1 |
168 |
* R2 (8bit) = R2 |
* R2 (8bit) = R2 |
169 |
* C (8bit) = C |
* R (temp) = min((R1 + R2)/2, 255) |
170 |
* DCT (16bit)= C - min((R1 + R2)/2, 255) |
* DCT (16bit)= C - R |
171 |
|
* C (8bit) = R |
172 |
*/ |
*/ |
173 |
void |
void |
174 |
transfer_8to16sub2_c(int16_t * const dct, |
transfer_8to16sub2_c(int16_t * const dct, |
187 |
if (r > 255) { |
if (r > 255) { |
188 |
r = 255; |
r = 255; |
189 |
} |
} |
190 |
/* cur[j * stride + i] = r; */ |
cur[j * stride + i] = r; |
191 |
dct[j * 8 + i] = (int16_t) c - (int16_t) r; |
dct[j * 8 + i] = (int16_t) c - (int16_t) r; |
192 |
} |
} |
193 |
} |
} |