2014-02-18 13:20:01 +01:00
|
|
|
/*
|
2014-07-19 13:56:08 +02:00
|
|
|
* This file is part of FFmpeg.
|
2014-02-18 13:20:01 +01:00
|
|
|
*
|
2014-07-19 13:56:08 +02:00
|
|
|
* FFmpeg is free software; you can redistribute it and/or
|
2014-02-18 13:20:01 +01:00
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
|
|
|
*
|
2014-07-19 13:56:08 +02:00
|
|
|
* FFmpeg is distributed in the hope that it will be useful,
|
2014-02-18 13:20:01 +01:00
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
2014-07-19 13:56:08 +02:00
|
|
|
* License along with FFmpeg; if not, write to the Free Software
|
2014-02-18 13:20:01 +01:00
|
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef AVCODEC_X86_SIMPLE_IDCT_H
|
|
|
|
#define AVCODEC_X86_SIMPLE_IDCT_H
|
|
|
|
|
|
|
|
#include <stdint.h>
|
|
|
|
|
|
|
|
void ff_simple_idct_mmx(int16_t *block);
|
|
|
|
void ff_simple_idct_add_mmx(uint8_t *dest, int line_size, int16_t *block);
|
|
|
|
void ff_simple_idct_put_mmx(uint8_t *dest, int line_size, int16_t *block);
|
|
|
|
|
2015-10-12 19:37:47 +02:00
|
|
|
void ff_simple_idct10_sse2(int16_t *block);
|
|
|
|
void ff_simple_idct10_avx(int16_t *block);
|
|
|
|
|
|
|
|
void ff_simple_idct10_put_sse2(uint8_t *dest, int line_size, int16_t *block);
|
|
|
|
void ff_simple_idct10_put_avx(uint8_t *dest, int line_size, int16_t *block);
|
|
|
|
|
x86: simple_idct: 12bits versions
On 12 frames of a 444p 12 bits DNxHR sequence, _put function:
C: 78902 decicycles in idct, 262071 runs, 73 skips
avx: 32478 decicycles in idct, 262045 runs, 99 skips
Difference between the 2:
stddev: 0.39 PSNR:104.47 MAXDIFF: 2
This is unavoidable and due to the scale factors used in the x86
version, which cannot match the C ones.
In addition, the trick of adding an initial bias to the input of a
pass can overflow, as the input coefficients are already 15bits,
which is the maximum this function can handle.
Overall, however, the omse on 12 bits samples goes from 0.16916 to
0.16883. Reducing rowshift by 1 improves to 0.0908, but causes
overflows.
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-10-12 19:37:49 +02:00
|
|
|
void ff_simple_idct12_sse2(int16_t *block);
|
|
|
|
void ff_simple_idct12_avx(int16_t *block);
|
|
|
|
|
|
|
|
void ff_simple_idct12_put_sse2(uint8_t *dest, int line_size, int16_t *block);
|
|
|
|
void ff_simple_idct12_put_avx(uint8_t *dest, int line_size, int16_t *block);
|
|
|
|
|
2014-02-18 13:20:01 +01:00
|
|
|
#endif /* AVCODEC_X86_SIMPLE_IDCT_H */
|