libavcodec/x86/v210-init.c

Go to the documentation of this file.
00001 /*
00002  * This file is part of Libav.
00003  *
00004  * Libav is free software; you can redistribute it and/or
00005  * modify it under the terms of the GNU Lesser General Public
00006  * License as published by the Free Software Foundation; either
00007  * version 2.1 of the License, or (at your option) any later version.
00008  *
00009  * Libav is distributed in the hope that it will be useful,
00010  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
00012  * Lesser General Public License for more details.
00013  *
00014  * You should have received a copy of the GNU Lesser General Public
00015  * License along with Libav; if not, write to the Free Software
00016  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
00017  */
00018 
00019 #include "libavutil/cpu.h"
00020 #include "libavcodec/v210dec.h"
00021 
00022 extern void ff_v210_planar_unpack_unaligned_ssse3(const uint32_t *src, uint16_t *y, uint16_t *u, uint16_t *v, int width);
00023 extern void ff_v210_planar_unpack_unaligned_avx(const uint32_t *src, uint16_t *y, uint16_t *u, uint16_t *v, int width);
00024 
00025 extern void ff_v210_planar_unpack_aligned_ssse3(const uint32_t *src, uint16_t *y, uint16_t *u, uint16_t *v, int width);
00026 extern void ff_v210_planar_unpack_aligned_avx(const uint32_t *src, uint16_t *y, uint16_t *u, uint16_t *v, int width);
00027 
00028 av_cold void v210_x86_init(V210DecContext *s)
00029 {
00030 int cpu_flags = av_get_cpu_flags();
00031 
00032 #if HAVE_YASM
00033 if (s->aligned_input) {
00034 if (cpu_flags & AV_CPU_FLAG_SSSE3)
00035 s->unpack_frame = ff_v210_planar_unpack_aligned_ssse3;
00036 
00037 if (HAVE_AVX && cpu_flags & AV_CPU_FLAG_AVX)
00038 s->unpack_frame = ff_v210_planar_unpack_aligned_avx;
00039 }
00040 else {
00041 if (cpu_flags & AV_CPU_FLAG_SSSE3)
00042 s->unpack_frame = ff_v210_planar_unpack_unaligned_ssse3;
00043 
00044 if (HAVE_AVX && cpu_flags & AV_CPU_FLAG_AVX)
00045 s->unpack_frame = ff_v210_planar_unpack_unaligned_avx;
00046 }
00047 #endif
00048 }

Generated on Fri Oct 26 02:43:40 2012 for FFmpeg by doxygen 1.5.8

AltStyle によって変換されたページ (->オリジナル) /