Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(87)

Side by Side Diff: source/patched-ffmpeg-mt/libavcodec/x86/snowdsp_mmx.c

Issue 3384002: ffmpeg source update for sep 09 (Closed) Base URL: svn://chrome-svn/chrome/trunk/deps/third_party/ffmpeg/
Patch Set: Created 10 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * MMX and SSE2 optimized snow DSP utils 2 * MMX and SSE2 optimized snow DSP utils
3 * Copyright (c) 2005-2006 Robert Edele <yartrebo@earthlink.net> 3 * Copyright (c) 2005-2006 Robert Edele <yartrebo@earthlink.net>
4 * 4 *
5 * This file is part of FFmpeg. 5 * This file is part of FFmpeg.
6 * 6 *
7 * FFmpeg is free software; you can redistribute it and/or 7 * FFmpeg is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public 8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either 9 * License as published by the Free Software Foundation; either
10 * version 2.1 of the License, or (at your option) any later version. 10 * version 2.1 of the License, or (at your option) any later version.
11 * 11 *
12 * FFmpeg is distributed in the hope that it will be useful, 12 * FFmpeg is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details. 15 * Lesser General Public License for more details.
16 * 16 *
17 * You should have received a copy of the GNU Lesser General Public 17 * You should have received a copy of the GNU Lesser General Public
18 * License along with FFmpeg; if not, write to the Free Software 18 * License along with FFmpeg; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20 */ 20 */
21 21
22 #include "libavutil/cpu.h"
22 #include "libavutil/x86_cpu.h" 23 #include "libavutil/x86_cpu.h"
23 #include "libavcodec/avcodec.h" 24 #include "libavcodec/avcodec.h"
24 #include "libavcodec/snow.h" 25 #include "libavcodec/snow.h"
25 #include "libavcodec/dwt.h" 26 #include "libavcodec/dwt.h"
26 #include "dsputil_mmx.h" 27 #include "dsputil_mmx.h"
27 28
28 static void ff_snow_horizontal_compose97i_sse2(IDWTELEM *b, int width){ 29 static void ff_snow_horizontal_compose97i_sse2(IDWTELEM *b, int width){
29 const int w2= (width+1)>>1; 30 const int w2= (width+1)>>1;
30 DECLARE_ALIGNED(16, IDWTELEM, temp)[width>>1]; 31 DECLARE_ALIGNED(16, IDWTELEM, temp)[width>>1];
31 const int w_l= (width>>1); 32 const int w_l= (width>>1);
(...skipping 835 matching lines...) Expand 10 before | Expand all | Expand 10 after
867 if (b_w == 16) 868 if (b_w == 16)
868 inner_add_yblock_bw_16_obmc_32_mmx(obmc, obmc_stride, block, b_w, b_h, s rc_x,src_y, src_stride, sb, add, dst8); 869 inner_add_yblock_bw_16_obmc_32_mmx(obmc, obmc_stride, block, b_w, b_h, s rc_x,src_y, src_stride, sb, add, dst8);
869 else if (b_w == 8 && obmc_stride == 16) 870 else if (b_w == 8 && obmc_stride == 16)
870 inner_add_yblock_bw_8_obmc_16_mmx(obmc, obmc_stride, block, b_w, b_h, sr c_x,src_y, src_stride, sb, add, dst8); 871 inner_add_yblock_bw_8_obmc_16_mmx(obmc, obmc_stride, block, b_w, b_h, sr c_x,src_y, src_stride, sb, add, dst8);
871 else 872 else
872 ff_snow_inner_add_yblock(obmc, obmc_stride, block, b_w, b_h, src_x,src_y , src_stride, sb, add, dst8); 873 ff_snow_inner_add_yblock(obmc, obmc_stride, block, b_w, b_h, src_x,src_y , src_stride, sb, add, dst8);
873 } 874 }
874 875
875 void ff_dwt_init_x86(DWTContext *c) 876 void ff_dwt_init_x86(DWTContext *c)
876 { 877 {
877 mm_flags = mm_support(); 878 int mm_flags = av_get_cpu_flags();
878 879
879 if (mm_flags & FF_MM_MMX) { 880 if (mm_flags & AV_CPU_FLAG_MMX) {
880 if(mm_flags & FF_MM_SSE2 & 0){ 881 if(mm_flags & AV_CPU_FLAG_SSE2 & 0){
881 c->horizontal_compose97i = ff_snow_horizontal_compose97i_sse2; 882 c->horizontal_compose97i = ff_snow_horizontal_compose97i_sse2;
882 #if HAVE_7REGS 883 #if HAVE_7REGS
883 c->vertical_compose97i = ff_snow_vertical_compose97i_sse2; 884 c->vertical_compose97i = ff_snow_vertical_compose97i_sse2;
884 #endif 885 #endif
885 c->inner_add_yblock = ff_snow_inner_add_yblock_sse2; 886 c->inner_add_yblock = ff_snow_inner_add_yblock_sse2;
886 } 887 }
887 else{ 888 else{
888 if(mm_flags & FF_MM_MMX2){ 889 if(mm_flags & AV_CPU_FLAG_MMX2){
889 c->horizontal_compose97i = ff_snow_horizontal_compose97i_mmx; 890 c->horizontal_compose97i = ff_snow_horizontal_compose97i_mmx;
890 #if HAVE_7REGS 891 #if HAVE_7REGS
891 c->vertical_compose97i = ff_snow_vertical_compose97i_mmx; 892 c->vertical_compose97i = ff_snow_vertical_compose97i_mmx;
892 #endif 893 #endif
893 } 894 }
894 c->inner_add_yblock = ff_snow_inner_add_yblock_mmx; 895 c->inner_add_yblock = ff_snow_inner_add_yblock_mmx;
895 } 896 }
896 } 897 }
897 } 898 }
OLDNEW
« no previous file with comments | « source/patched-ffmpeg-mt/libavcodec/x86/simple_idct_mmx.c ('k') | source/patched-ffmpeg-mt/libavcodec/x86/vc1dsp_mmx.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698