rv40dsp.c
Go to the documentation of this file.
1 /*
2  * RV40 decoder motion compensation functions x86-optimised
3  * Copyright (c) 2008 Konstantin Shishkov
4  *
5  * This file is part of Libav.
6  *
7  * Libav is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU Lesser General Public
9  * License as published by the Free Software Foundation; either
10  * version 2.1 of the License, or (at your option) any later version.
11  *
12  * Libav is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15  * Lesser General Public License for more details.
16  *
17  * You should have received a copy of the GNU Lesser General Public
18  * License along with Libav; if not, write to the Free Software
19  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20  */
21 
27 #include "libavcodec/rv34dsp.h"
28 
29 void ff_put_rv40_chroma_mc8_mmx (uint8_t *dst, uint8_t *src,
30  int stride, int h, int x, int y);
31 void ff_avg_rv40_chroma_mc8_mmx2 (uint8_t *dst, uint8_t *src,
32  int stride, int h, int x, int y);
33 void ff_avg_rv40_chroma_mc8_3dnow(uint8_t *dst, uint8_t *src,
34  int stride, int h, int x, int y);
35 
36 void ff_put_rv40_chroma_mc4_mmx (uint8_t *dst, uint8_t *src,
37  int stride, int h, int x, int y);
38 void ff_avg_rv40_chroma_mc4_mmx2 (uint8_t *dst, uint8_t *src,
39  int stride, int h, int x, int y);
40 void ff_avg_rv40_chroma_mc4_3dnow(uint8_t *dst, uint8_t *src,
41  int stride, int h, int x, int y);
42 
44 {
45  av_unused int mm_flags = av_get_cpu_flags();
46 
47 #if HAVE_YASM
48  if (mm_flags & AV_CPU_FLAG_MMX) {
51  }
52  if (mm_flags & AV_CPU_FLAG_MMX2) {
55  } else if (mm_flags & AV_CPU_FLAG_3DNOW) {
58  }
59 #endif
60 }
#define AV_CPU_FLAG_MMX2
SSE integer functions or AMD MMX ext.
Definition: cpu.h:28
int stride
Definition: mace.c:143
void ff_avg_rv40_chroma_mc4_mmx2(uint8_t *dst, uint8_t *src, int stride, int h, int x, int y)
static DSPContext dsp
Definition: atrac3.c:135
RV30/40 decoder motion compensation functions.
#define AV_CPU_FLAG_3DNOW
AMD 3DNOW.
Definition: cpu.h:29
#define AV_CPU_FLAG_MMX
standard MMX
Definition: cpu.h:27
void ff_rv40dsp_init_x86(RV34DSPContext *c, DSPContext *dsp)
Definition: rv40dsp.c:43
int av_get_cpu_flags(void)
Return the flags which specify extensions supported by the CPU.
Definition: cpu.c:22
void ff_put_rv40_chroma_mc4_mmx(uint8_t *dst, uint8_t *src, int stride, int h, int x, int y)
void ff_avg_rv40_chroma_mc4_3dnow(uint8_t *dst, uint8_t *src, int stride, int h, int x, int y)
void ff_avg_rv40_chroma_mc8_mmx2(uint8_t *dst, uint8_t *src, int stride, int h, int x, int y)
h264_chroma_mc_func avg_chroma_pixels_tab[3]
Definition: rv34dsp.h:60
h264_chroma_mc_func put_chroma_pixels_tab[3]
Definition: rv34dsp.h:59
#define av_unused
Definition: attributes.h:95
DSPContext.
Definition: dsputil.h:226
void ff_avg_rv40_chroma_mc8_3dnow(uint8_t *dst, uint8_t *src, int stride, int h, int x, int y)
void ff_put_rv40_chroma_mc8_mmx(uint8_t *dst, uint8_t *src, int stride, int h, int x, int y)