706bd8ea19
* qatar/master: (35 commits) h264_idct_10bit: port x86 assembly to cpuflags. x86inc: clip num_args to 7 on x86-32. x86inc: sync to latest version from x264. fft: rename "z" to "zc" to prevent name collision. wv: return meaningful error codes. wv: return AVERROR_EOF on EOF, not EIO. mp3dec: forward errors for av_get_packet(). mp3dec: remove a pointless local variable. mp3dec: remove commented out cruft. lavfi: bump minor to mark stabilizing the ABI. FATE: add tests for yadif. FATE: add a test for delogo video filter. FATE: add a test for amix audio filter. audiogen: allow specifying random seed as a commandline parameter. vc1dec: Override invalid macroblock quantizer vc1: avoid reading beyond the last line in vc1_draw_sprites() vc1dec: check that coded slice positions and interlacing match. vc1dec: Do not ignore ff_vc1_parse_frame_header_adv return value configure: Move parts that should not be user-selectable to CONFIG_EXTRA lavf: remove commented out cruft in avformat_find_stream_info() ... Conflicts: Makefile configure libavcodec/vc1dec.c libavcodec/x86/h264_deblock.asm libavcodec/x86/h264_deblock_10bit.asm libavcodec/x86/h264dsp_mmx.c libavfilter/version.h libavformat/mp3dec.c libavformat/utils.c libavformat/wv.c libavutil/x86/x86inc.asm Merged-by: Michael Niedermayer <michaelni@gmx.at>
51 lines
1.7 KiB
C
51 lines
1.7 KiB
C
/*
|
|
* VP6 MMX/SSE2 optimizations
|
|
* Copyright (C) 2009 Sebastien Lucas <sebastien.lucas@gmail.com>
|
|
* Copyright (C) 2009 Zuxy Meng <zuxy.meng@gmail.com>
|
|
*
|
|
* 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
|
|
*/
|
|
|
|
#include "libavutil/cpu.h"
|
|
#include "libavutil/x86_cpu.h"
|
|
#include "libavcodec/dsputil.h"
|
|
#include "libavcodec/vp56dsp.h"
|
|
|
|
void ff_vp6_filter_diag4_mmx(uint8_t *dst, uint8_t *src, int stride,
|
|
const int16_t *h_weights,const int16_t *v_weights);
|
|
void ff_vp6_filter_diag4_sse2(uint8_t *dst, uint8_t *src, int stride,
|
|
const int16_t *h_weights,const int16_t *v_weights);
|
|
|
|
av_cold void ff_vp56dsp_init_x86(VP56DSPContext* c, enum CodecID codec)
|
|
{
|
|
#if HAVE_YASM
|
|
int mm_flags = av_get_cpu_flags();
|
|
|
|
if (CONFIG_VP6_DECODER && codec == CODEC_ID_VP6) {
|
|
#if ARCH_X86_32
|
|
if (mm_flags & AV_CPU_FLAG_MMX) {
|
|
c->vp6_filter_diag4 = ff_vp6_filter_diag4_mmx;
|
|
}
|
|
#endif
|
|
|
|
if (mm_flags & AV_CPU_FLAG_SSE2) {
|
|
c->vp6_filter_diag4 = ff_vp6_filter_diag4_sse2;
|
|
}
|
|
}
|
|
#endif
|
|
}
|