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

libavcodec/x86/rv34dsp_init.c

Go to the documentation of this file.
00001 /*
00002  * RV30/40 MMX/SSE2 optimizations
00003  * Copyright (C) 2012 Christophe Gisquet <christophe.gisquet@gmail.com>
00004  *
00005  * This file is part of Libav.
00006  *
00007  * Libav is free software; you can redistribute it and/or
00008  * modify it under the terms of the GNU Lesser General Public
00009  * License as published by the Free Software Foundation; either
00010  * version 2.1 of the License, or (at your option) any later version.
00011  *
00012  * Libav is distributed in the hope that it will be useful,
00013  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00014  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00015  * Lesser General Public License for more details.
00016  *
00017  * You should have received a copy of the GNU Lesser General Public
00018  * License along with Libav; if not, write to the Free Software
00019  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
00020  */
00021 
00022 #include "libavutil/cpu.h"
00023 #include "libavutil/x86_cpu.h"
00024 #include "libavcodec/dsputil.h"
00025 #include "libavcodec/rv34dsp.h"
00026 
00027 void ff_rv34_idct_dc_mmx2(DCTELEM *block);
00028 void ff_rv34_idct_dc_noround_mmx2(DCTELEM *block);
00029 void ff_rv34_idct_dc_add_mmx(uint8_t *dst, int stride, int dc);
00030 void ff_rv34_idct_dc_add_sse4(uint8_t *dst, int stride, int dc);
00031 
00032 av_cold void ff_rv34dsp_init_x86(RV34DSPContext* c, DSPContext *dsp)
00033 {
00034 #if HAVE_YASM
00035     int mm_flags = av_get_cpu_flags();
00036 
00037     if (mm_flags & AV_CPU_FLAG_MMX)
00038         c->rv34_idct_dc_add = ff_rv34_idct_dc_add_mmx;
00039     if (mm_flags & AV_CPU_FLAG_MMX2) {
00040         c->rv34_inv_transform_dc = ff_rv34_idct_dc_noround_mmx2;
00041     }
00042     if (mm_flags & AV_CPU_FLAG_SSE4)
00043         c->rv34_idct_dc_add = ff_rv34_idct_dc_add_sse4;
00044 #endif
00045 }
Generated on Thu Jul 11 2013 15:38:22 for Libav by doxygen 1.7.1