• Main Page
  • Related Pages
  • Modules
  • Data Structures
  • Files
  • Examples
  • File List
  • Globals

libavcodec/x86/proresdsp-init.c

Go to the documentation of this file.
00001 /*
00002  * Apple ProRes compatible decoder
00003  *
00004  * Copyright (c) 2010-2011 Maxim Poliakovski
00005  *
00006  * This file is part of Libav.
00007  *
00008  * Libav is free software; you can redistribute it and/or
00009  * modify it under the terms of the GNU Lesser General Public
00010  * License as published by the Free Software Foundation; either
00011  * version 2.1 of the License, or (at your option) any later version.
00012  *
00013  * Libav is distributed in the hope that it will be useful,
00014  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00015  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00016  * Lesser General Public License for more details.
00017  *
00018  * You should have received a copy of the GNU Lesser General Public
00019  * License along with Libav; if not, write to the Free Software
00020  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
00021  */
00022 
00023 #include "libavcodec/proresdsp.h"
00024 
00025 void ff_prores_idct_put_10_sse2(uint16_t *dst, int linesize,
00026                                 DCTELEM *block, const int16_t *qmat);
00027 void ff_prores_idct_put_10_sse4(uint16_t *dst, int linesize,
00028                                 DCTELEM *block, const int16_t *qmat);
00029 void ff_prores_idct_put_10_avx (uint16_t *dst, int linesize,
00030                                 DCTELEM *block, const int16_t *qmat);
00031 
00032 void ff_proresdsp_x86_init(ProresDSPContext *dsp)
00033 {
00034 #if ARCH_X86_64 && HAVE_YASM
00035     int flags = av_get_cpu_flags();
00036 
00037     if (flags & AV_CPU_FLAG_SSE2) {
00038         dsp->idct_permutation_type = FF_TRANSPOSE_IDCT_PERM;
00039         dsp->idct_put = ff_prores_idct_put_10_sse2;
00040     }
00041 
00042     if (flags & AV_CPU_FLAG_SSE4) {
00043         dsp->idct_permutation_type = FF_TRANSPOSE_IDCT_PERM;
00044         dsp->idct_put = ff_prores_idct_put_10_sse4;
00045     }
00046 
00047 #if HAVE_AVX
00048     if (flags & AV_CPU_FLAG_AVX) {
00049         dsp->idct_permutation_type = FF_TRANSPOSE_IDCT_PERM;
00050         dsp->idct_put = ff_prores_idct_put_10_avx;
00051     }
00052 #endif /* HAVE_AVX */
00053 #endif /* ARCH_X86_64 && HAVE_YASM */
00054 }
Generated on Thu Jan 24 2013 17:08:54 for Libav by doxygen 1.7.1