mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-12-22 06:50:12 +01:00
Before this commit, the (32-bit only) simple idct came in three versions: A pure MMX IDCT and idct-put and idct-add versions which use SSE2 at the put and add stage, but still use pure MMX for the actual IDCT. This commit ports said IDCT to SSE2; this was entirely trivial for the IDCT1-5 and IDCT7 parts (where one can directly use the full register width) and was easy for IDCT6 and IDCT8 (involving a few movhps and pshufds). Unfortunately, DC_COND_INIT and Z_COND_INIT still use only the lower half of the registers. This saved 4658B here; the benchmarking option of the dct test tool showed a 15% speedup. Reviewed-by: Lynne <dev@lynne.ee> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
51 lines
2.0 KiB
C
51 lines
2.0 KiB
C
/*
|
|
* This file is part of FFmpeg.
|
|
*
|
|
* FFmpeg is free software; you can redistribute it and/or
|
|
* 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.
|
|
*
|
|
* FFmpeg is distributed in the hope that it will be useful,
|
|
* 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
|
|
* License along with FFmpeg; if not, write to the Free Software
|
|
* 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 <stddef.h>
|
|
#include <stdint.h>
|
|
|
|
void ff_simple_idct_sse2(int16_t *block);
|
|
void ff_simple_idct_add_sse2(uint8_t *dest, ptrdiff_t line_size, int16_t *block);
|
|
void ff_simple_idct_put_sse2(uint8_t *dest, ptrdiff_t line_size, int16_t *block);
|
|
|
|
void ff_simple_idct8_sse2(int16_t *block);
|
|
void ff_simple_idct8_avx(int16_t *block);
|
|
|
|
void ff_simple_idct8_put_sse2(uint8_t *dest, ptrdiff_t line_size, int16_t *block);
|
|
void ff_simple_idct8_put_avx(uint8_t *dest, ptrdiff_t line_size, int16_t *block);
|
|
|
|
void ff_simple_idct8_add_sse2(uint8_t *dest, ptrdiff_t line_size, int16_t *block);
|
|
void ff_simple_idct8_add_avx(uint8_t *dest, ptrdiff_t line_size, int16_t *block);
|
|
|
|
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, ptrdiff_t line_size, int16_t *block);
|
|
void ff_simple_idct10_put_avx(uint8_t *dest, ptrdiff_t line_size, int16_t *block);
|
|
|
|
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, ptrdiff_t line_size, int16_t *block);
|
|
void ff_simple_idct12_put_avx(uint8_t *dest, ptrdiff_t line_size, int16_t *block);
|
|
|
|
#endif /* AVCODEC_X86_SIMPLE_IDCT_H */
|