You've already forked FFmpeg
							
							
				mirror of
				https://github.com/FFmpeg/FFmpeg.git
				synced 2025-10-30 23:18:11 +02:00 
			
		
		
		
	diracdsp: Make x86 files/functions names consistent
This commit is contained in:
		| @@ -20,7 +20,6 @@ | ||||
|  | ||||
| #include "avcodec.h" | ||||
| #include "diracdsp.h" | ||||
| #include "libavcodec/x86/diracdsp_mmx.h" | ||||
|  | ||||
| #define FILTER(src, stride)                                     \ | ||||
|     ((21*((src)[ 0*stride] + (src)[1*stride])                   \ | ||||
| @@ -222,5 +221,6 @@ av_cold void ff_diracdsp_init(DiracDSPContext *c) | ||||
|     PIXFUNC(avg, 16); | ||||
|     PIXFUNC(avg, 32); | ||||
|  | ||||
|     if (HAVE_MMX && HAVE_YASM) ff_diracdsp_init_mmx(c); | ||||
|     if (ARCH_X86) | ||||
|         ff_diracdsp_init_x86(c); | ||||
| } | ||||
|   | ||||
| @@ -63,5 +63,6 @@ DECL_DIRAC_PIXOP(put, l4_c); | ||||
| DECL_DIRAC_PIXOP(avg, l4_c); | ||||
|  | ||||
| void ff_diracdsp_init(DiracDSPContext *c); | ||||
| void ff_diracdsp_init_x86(DiracDSPContext* c); | ||||
|  | ||||
| #endif /* AVCODEC_DIRACDSP_H */ | ||||
|   | ||||
| @@ -6,6 +6,7 @@ OBJS-$(CONFIG_AUDIODSP)                += x86/audiodsp_init.o | ||||
| OBJS-$(CONFIG_BLOCKDSP)                += x86/blockdsp_init.o | ||||
| OBJS-$(CONFIG_BSWAPDSP)                += x86/bswapdsp_init.o | ||||
| OBJS-$(CONFIG_DCT)                     += x86/dct_init.o | ||||
| OBJS-$(CONFIG_DIRAC_DECODER)           += x86/diracdsp_init.o | ||||
| OBJS-$(CONFIG_FDCTDSP)                 += x86/fdctdsp_init.o | ||||
| OBJS-$(CONFIG_FFT)                     += x86/fft_init.o | ||||
| OBJS-$(CONFIG_FLACDSP)                 += x86/flacdsp_init.o | ||||
| @@ -133,7 +134,7 @@ YASM-OBJS-$(CONFIG_ADPCM_G722_ENCODER) += x86/g722dsp.o | ||||
| YASM-OBJS-$(CONFIG_ALAC_DECODER)       += x86/alacdsp.o | ||||
| YASM-OBJS-$(CONFIG_APNG_DECODER)       += x86/pngdsp.o | ||||
| YASM-OBJS-$(CONFIG_DCA_DECODER)        += x86/synth_filter.o | ||||
| YASM-OBJS-$(CONFIG_DIRAC_DECODER)      += x86/diracdsp_mmx.o x86/diracdsp_yasm.o \ | ||||
| YASM-OBJS-$(CONFIG_DIRAC_DECODER)      += x86/diracdsp.o                \ | ||||
|                                           x86/dwt_yasm.o | ||||
| YASM-OBJS-$(CONFIG_DNXHD_ENCODER)      += x86/dnxhdenc.o | ||||
| YASM-OBJS-$(CONFIG_FLAC_DECODER)       += x86/flacdsp.o | ||||
|   | ||||
| @@ -19,14 +19,35 @@ | ||||
|  */ | ||||
| 
 | ||||
| #include "libavutil/x86/cpu.h" | ||||
| #include "diracdsp_mmx.h" | ||||
| #include "libavcodec/diracdsp.h" | ||||
| #include "fpel.h" | ||||
| 
 | ||||
| DECL_DIRAC_PIXOP(put, mmx); | ||||
| DECL_DIRAC_PIXOP(avg, mmx); | ||||
| DECL_DIRAC_PIXOP(avg, mmxext); | ||||
| 
 | ||||
| void ff_put_dirac_pixels16_sse2(uint8_t *dst, const uint8_t *src[5], int stride, int h); | ||||
| void ff_avg_dirac_pixels16_sse2(uint8_t *dst, const uint8_t *src[5], int stride, int h); | ||||
| void ff_put_dirac_pixels32_sse2(uint8_t *dst, const uint8_t *src[5], int stride, int h); | ||||
| void ff_avg_dirac_pixels32_sse2(uint8_t *dst, const uint8_t *src[5], int stride, int h); | ||||
| 
 | ||||
| void ff_add_rect_clamped_mmx(uint8_t *, const uint16_t *, int, const int16_t *, int, int, int); | ||||
| void ff_add_rect_clamped_sse2(uint8_t *, const uint16_t *, int, const int16_t *, int, int, int); | ||||
| 
 | ||||
| void ff_add_dirac_obmc8_mmx(uint16_t *dst, const uint8_t *src, int stride, const uint8_t *obmc_weight, int yblen); | ||||
| void ff_add_dirac_obmc16_mmx(uint16_t *dst, const uint8_t *src, int stride, const uint8_t *obmc_weight, int yblen); | ||||
| void ff_add_dirac_obmc32_mmx(uint16_t *dst, const uint8_t *src, int stride, const uint8_t *obmc_weight, int yblen); | ||||
| 
 | ||||
| void ff_add_dirac_obmc16_sse2(uint16_t *dst, const uint8_t *src, int stride, const uint8_t *obmc_weight, int yblen); | ||||
| void ff_add_dirac_obmc32_sse2(uint16_t *dst, const uint8_t *src, int stride, const uint8_t *obmc_weight, int yblen); | ||||
| 
 | ||||
| void ff_put_rect_clamped_mmx(uint8_t *dst, int dst_stride, const int16_t *src, int src_stride, int width, int height); | ||||
| void ff_put_rect_clamped_sse2(uint8_t *dst, int dst_stride, const int16_t *src, int src_stride, int width, int height); | ||||
| void ff_put_signed_rect_clamped_mmx(uint8_t *dst, int dst_stride, const int16_t *src, int src_stride, int width, int height); | ||||
| void ff_put_signed_rect_clamped_sse2(uint8_t *dst, int dst_stride, const int16_t *src, int src_stride, int width, int height); | ||||
| 
 | ||||
| #if HAVE_YASM | ||||
| 
 | ||||
| #define HPEL_FILTER(MMSIZE, EXT)                                                             \ | ||||
|     void ff_dirac_hpel_filter_v_ ## EXT(uint8_t *, const uint8_t *, int, int);               \ | ||||
|     void ff_dirac_hpel_filter_h_ ## EXT(uint8_t *, const uint8_t *, int);                    \ | ||||
| @@ -47,11 +68,6 @@ void ff_put_signed_rect_clamped_sse2(uint8_t *dst, int dst_stride, const int16_t | ||||
|         }                                                                                    \ | ||||
|     } | ||||
| 
 | ||||
| #if !ARCH_X86_64 | ||||
| HPEL_FILTER(8, mmx) | ||||
| #endif | ||||
| HPEL_FILTER(16, sse2) | ||||
| 
 | ||||
| #define PIXFUNC(PFX, IDX, EXT)                                                   \ | ||||
|     /*MMXDISABLEDc->PFX ## _dirac_pixels_tab[0][IDX] = ff_ ## PFX ## _dirac_pixels8_ ## EXT;*/  \ | ||||
|     c->PFX ## _dirac_pixels_tab[1][IDX] = ff_ ## PFX ## _dirac_pixels16_ ## EXT; \ | ||||
| @@ -119,7 +135,22 @@ void ff_avg_dirac_pixels32_sse2(uint8_t *dst, const uint8_t *src[5], int stride, | ||||
|     } | ||||
| } | ||||
| 
 | ||||
| void ff_diracdsp_init_mmx(DiracDSPContext* c) | ||||
| #else // HAVE_YASM
 | ||||
| 
 | ||||
| #define HPEL_FILTER(MMSIZE, EXT)                                                     \ | ||||
|     void dirac_hpel_filter_ ## EXT(uint8_t *dsth, uint8_t *dstv, uint8_t *dstc,              \ | ||||
|                                    const uint8_t *src, int stride, int width, int height); | ||||
| 
 | ||||
| #define PIXFUNC(PFX, IDX, EXT) do {} while (0) | ||||
| 
 | ||||
| #endif // HAVE_YASM
 | ||||
| 
 | ||||
| #if !ARCH_X86_64 | ||||
| HPEL_FILTER(8, mmx) | ||||
| #endif | ||||
| HPEL_FILTER(16, sse2) | ||||
| 
 | ||||
| void ff_diracdsp_init_x86(DiracDSPContext* c) | ||||
| { | ||||
|     int mm_flags = av_get_cpu_flags(); | ||||
| 
 | ||||
| @@ -1,47 +0,0 @@ | ||||
| /* | ||||
|  * Copyright (c) 2010 David Conrad | ||||
|  * | ||||
|  * This file is part of FFmpeg. | ||||
|  * | ||||
|  * FFmpeg is free software; you can redistribute it and/or | ||||
|  * modify it under the terms of the GNU Lesser General Public | ||||
|  * License as published by the Free Software Foundation; either | ||||
|  * version 2.1 of the License, or (at your option) any later version. | ||||
|  * | ||||
|  * FFmpeg is distributed in the hope that it will be useful, | ||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU | ||||
|  * Lesser General Public License for more details. | ||||
|  * | ||||
|  * You should have received a copy of the GNU Lesser General Public | ||||
|  * License along with FFmpeg; if not, write to the Free Software | ||||
|  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | ||||
|  */ | ||||
|  | ||||
| #ifndef AVCODEC_X86_DIRACDSP_MMX_H | ||||
| #define AVCODEC_X86_DIRACDSP_MMX_H | ||||
|  | ||||
| #include "libavcodec/diracdsp.h" | ||||
|  | ||||
| void ff_diracdsp_init_mmx(DiracDSPContext* c); | ||||
|  | ||||
| DECL_DIRAC_PIXOP(put, mmx); | ||||
| DECL_DIRAC_PIXOP(avg, mmx); | ||||
| DECL_DIRAC_PIXOP(avg, mmxext); | ||||
|  | ||||
| void ff_put_dirac_pixels16_sse2(uint8_t *dst, const uint8_t *src[5], int stride, int h); | ||||
| void ff_avg_dirac_pixels16_sse2(uint8_t *dst, const uint8_t *src[5], int stride, int h); | ||||
| void ff_put_dirac_pixels32_sse2(uint8_t *dst, const uint8_t *src[5], int stride, int h); | ||||
| void ff_avg_dirac_pixels32_sse2(uint8_t *dst, const uint8_t *src[5], int stride, int h); | ||||
|  | ||||
| void ff_add_rect_clamped_mmx(uint8_t *, const uint16_t *, int, const int16_t *, int, int, int); | ||||
| void ff_add_rect_clamped_sse2(uint8_t *, const uint16_t *, int, const int16_t *, int, int, int); | ||||
|  | ||||
| void ff_add_dirac_obmc8_mmx(uint16_t *dst, const uint8_t *src, int stride, const uint8_t *obmc_weight, int yblen); | ||||
| void ff_add_dirac_obmc16_mmx(uint16_t *dst, const uint8_t *src, int stride, const uint8_t *obmc_weight, int yblen); | ||||
| void ff_add_dirac_obmc32_mmx(uint16_t *dst, const uint8_t *src, int stride, const uint8_t *obmc_weight, int yblen); | ||||
|  | ||||
| void ff_add_dirac_obmc16_sse2(uint16_t *dst, const uint8_t *src, int stride, const uint8_t *obmc_weight, int yblen); | ||||
| void ff_add_dirac_obmc32_sse2(uint16_t *dst, const uint8_t *src, int stride, const uint8_t *obmc_weight, int yblen); | ||||
|  | ||||
| #endif | ||||
		Reference in New Issue
	
	Block a user