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

libavcodec/x86/rv40dsp.c

Go to the documentation of this file.
00001 /*
00002  * RV40 decoder motion compensation functions x86-optimised
00003  * Copyright (c) 2008 Konstantin Shishkov
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 
00027 #include "libavcodec/rv34dsp.h"
00028 
00029 void ff_put_rv40_chroma_mc8_mmx  (uint8_t *dst, uint8_t *src,
00030                                   int stride, int h, int x, int y);
00031 void ff_avg_rv40_chroma_mc8_mmx2 (uint8_t *dst, uint8_t *src,
00032                                   int stride, int h, int x, int y);
00033 void ff_avg_rv40_chroma_mc8_3dnow(uint8_t *dst, uint8_t *src,
00034                                   int stride, int h, int x, int y);
00035 
00036 void ff_put_rv40_chroma_mc4_mmx  (uint8_t *dst, uint8_t *src,
00037                                   int stride, int h, int x, int y);
00038 void ff_avg_rv40_chroma_mc4_mmx2 (uint8_t *dst, uint8_t *src,
00039                                   int stride, int h, int x, int y);
00040 void ff_avg_rv40_chroma_mc4_3dnow(uint8_t *dst, uint8_t *src,
00041                                   int stride, int h, int x, int y);
00042 
00043 void ff_rv40dsp_init_x86(RV34DSPContext *c, DSPContext *dsp)
00044 {
00045     av_unused int mm_flags = av_get_cpu_flags();
00046 
00047 #if HAVE_YASM
00048     if (mm_flags & AV_CPU_FLAG_MMX) {
00049         c->put_chroma_pixels_tab[0] = ff_put_rv40_chroma_mc8_mmx;
00050         c->put_chroma_pixels_tab[1] = ff_put_rv40_chroma_mc4_mmx;
00051     }
00052     if (mm_flags & AV_CPU_FLAG_MMX2) {
00053         c->avg_chroma_pixels_tab[0] = ff_avg_rv40_chroma_mc8_mmx2;
00054         c->avg_chroma_pixels_tab[1] = ff_avg_rv40_chroma_mc4_mmx2;
00055     } else if (mm_flags & AV_CPU_FLAG_3DNOW) {
00056         c->avg_chroma_pixels_tab[0] = ff_avg_rv40_chroma_mc8_3dnow;
00057         c->avg_chroma_pixels_tab[1] = ff_avg_rv40_chroma_mc4_3dnow;
00058     }
00059 #endif
00060 }
Generated on Thu Jan 24 2013 17:08:53 for Libav by doxygen 1.7.1