| OLD | NEW |
| 1 /* | 1 /* |
| 2 * MPEG video MMX templates | 2 * MPEG video MMX templates |
| 3 * | 3 * |
| 4 * Copyright (c) 2002 Michael Niedermayer <michaelni@gmx.at> | 4 * Copyright (c) 2002 Michael Niedermayer <michaelni@gmx.at> |
| 5 * | 5 * |
| 6 * This file is part of FFmpeg. | 6 * This file is part of FFmpeg. |
| 7 * | 7 * |
| 8 * FFmpeg is free software; you can redistribute it and/or | 8 * FFmpeg is free software; you can redistribute it and/or |
| 9 * modify it under the terms of the GNU Lesser General Public | 9 * modify it under the terms of the GNU Lesser General Public |
| 10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 "psubw "a", "b" \n\t" // out=((ABS(block[i])*qmat[0] - b
ias[0]*qmat[0])>>16)*sign(block[i]) | 91 "psubw "a", "b" \n\t" // out=((ABS(block[i])*qmat[0] - b
ias[0]*qmat[0])>>16)*sign(block[i]) |
| 92 #endif | 92 #endif |
| 93 | 93 |
| 94 static int RENAME(dct_quantize)(MpegEncContext *s, | 94 static int RENAME(dct_quantize)(MpegEncContext *s, |
| 95 DCTELEM *block, int n, | 95 DCTELEM *block, int n, |
| 96 int qscale, int *overflow) | 96 int qscale, int *overflow) |
| 97 { | 97 { |
| 98 x86_reg last_non_zero_p1; | 98 x86_reg last_non_zero_p1; |
| 99 int level=0, q; //=0 is because gcc says uninitialized ... | 99 int level=0, q; //=0 is because gcc says uninitialized ... |
| 100 const uint16_t *qmat, *bias; | 100 const uint16_t *qmat, *bias; |
| 101 DECLARE_ALIGNED_16(int16_t, temp_block)[64]; | 101 DECLARE_ALIGNED(16, int16_t, temp_block)[64]; |
| 102 | 102 |
| 103 assert((7&(int)(&temp_block[0])) == 0); //did gcc align it correctly? | 103 assert((7&(int)(&temp_block[0])) == 0); //did gcc align it correctly? |
| 104 | 104 |
| 105 //s->fdct (block); | 105 //s->fdct (block); |
| 106 RENAMEl(ff_fdct) (block); //cannot be anything else ... | 106 RENAMEl(ff_fdct) (block); //cannot be anything else ... |
| 107 | 107 |
| 108 if(s->dct_error_sum) | 108 if(s->dct_error_sum) |
| 109 s->denoise_dct(s, block); | 109 s->denoise_dct(s, block); |
| 110 | 110 |
| 111 if (s->mb_intra) { | 111 if (s->mb_intra) { |
| (...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 367 /* | 367 /* |
| 368 for(i=0; i<last_non_zero_p1; i++) | 368 for(i=0; i<last_non_zero_p1; i++) |
| 369 { | 369 { |
| 370 int j= zigzag_direct_noperm[i]; | 370 int j= zigzag_direct_noperm[i]; |
| 371 block[block_permute_op(j)]= temp_block[j]; | 371 block[block_permute_op(j)]= temp_block[j]; |
| 372 } | 372 } |
| 373 */ | 373 */ |
| 374 | 374 |
| 375 return last_non_zero_p1 - 1; | 375 return last_non_zero_p1 - 1; |
| 376 } | 376 } |
| OLD | NEW |