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

Side by Side Diff: source/patched-ffmpeg-mt/libavcodec/x86/cavsdsp_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 * Chinese AVS video (AVS1-P2, JiZhun profile) decoder. 2 * Chinese AVS video (AVS1-P2, JiZhun profile) decoder.
3 * Copyright (c) 2006 Stefan Gehrer <stefan.gehrer@gmx.de> 3 * Copyright (c) 2006 Stefan Gehrer <stefan.gehrer@gmx.de>
4 * 4 *
5 * MMX-optimized DSP functions, based on H.264 optimizations by 5 * MMX-optimized DSP functions, based on H.264 optimizations by
6 * Michael Niedermayer and Loren Merritt 6 * Michael Niedermayer and Loren Merritt
7 * 7 *
8 * This file is part of FFmpeg. 8 * This file is part of FFmpeg.
9 * 9 *
10 * FFmpeg is free software; you can redistribute it and/or 10 * FFmpeg is free software; you can redistribute it and/or
11 * modify it under the terms of the GNU Lesser General Public 11 * modify it under the terms of the GNU Lesser General Public
12 * License as published by the Free Software Foundation; either 12 * License as published by the Free Software Foundation; either
13 * version 2.1 of the License, or (at your option) any later version. 13 * version 2.1 of the License, or (at your option) any later version.
14 * 14 *
15 * FFmpeg is distributed in the hope that it will be useful, 15 * FFmpeg is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 * Lesser General Public License for more details. 18 * Lesser General Public License for more details.
19 * 19 *
20 * You should have received a copy of the GNU Lesser General Public 20 * You should have received a copy of the GNU Lesser General Public
21 * License along with FFmpeg; if not, write to the Free Software 21 * License along with FFmpeg; if not, write to the Free Software
22 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 22 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
23 */ 23 */
24 24
25 #include "libavutil/common.h" 25 #include "libavutil/common.h"
26 #include "libavutil/cpu.h"
26 #include "libavutil/x86_cpu.h" 27 #include "libavutil/x86_cpu.h"
27 #include "libavcodec/dsputil.h" 28 #include "libavcodec/dsputil.h"
28 #include "libavcodec/cavsdsp.h" 29 #include "libavcodec/cavsdsp.h"
29 #include "dsputil_mmx.h" 30 #include "dsputil_mmx.h"
30 31
31 /***************************************************************************** 32 /*****************************************************************************
32 * 33 *
33 * inverse transform 34 * inverse transform
34 * 35 *
35 ****************************************************************************/ 36 ****************************************************************************/
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 "movq %%mm1, 48(%0) \n\t" 167 "movq %%mm1, 48(%0) \n\t"
167 "movq %%mm0, 64(%0) \n\t" 168 "movq %%mm0, 64(%0) \n\t"
168 "movq %%mm2, 80(%0) \n\t" 169 "movq %%mm2, 80(%0) \n\t"
169 "movq %%mm4, 96(%0) \n\t" 170 "movq %%mm4, 96(%0) \n\t"
170 "movq %%mm6, 112(%0) \n\t" 171 "movq %%mm6, 112(%0) \n\t"
171 :: "r"(b2+4*i) 172 :: "r"(b2+4*i)
172 : "memory" 173 : "memory"
173 ); 174 );
174 } 175 }
175 176
176 add_pixels_clamped_mmx(b2, dst, stride); 177 ff_add_pixels_clamped_mmx(b2, dst, stride);
177 } 178 }
178 179
179 /***************************************************************************** 180 /*****************************************************************************
180 * 181 *
181 * motion compensation 182 * motion compensation
182 * 183 *
183 ****************************************************************************/ 184 ****************************************************************************/
184 185
185 /* vertical filter [-1 -2 96 42 -7 0] */ 186 /* vertical filter [-1 -2 96 42 -7 0] */
186 #define QPEL_CAVSV1(A,B,C,D,E,F,OP,MUL2) \ 187 #define QPEL_CAVSV1(A,B,C,D,E,F,OP,MUL2) \
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after
465 dspfunc(put_cavs_qpel, 0, 16); 466 dspfunc(put_cavs_qpel, 0, 16);
466 dspfunc(put_cavs_qpel, 1, 8); 467 dspfunc(put_cavs_qpel, 1, 8);
467 dspfunc(avg_cavs_qpel, 0, 16); 468 dspfunc(avg_cavs_qpel, 0, 16);
468 dspfunc(avg_cavs_qpel, 1, 8); 469 dspfunc(avg_cavs_qpel, 1, 8);
469 #undef dspfunc 470 #undef dspfunc
470 c->cavs_idct8_add = cavs_idct8_add_mmx; 471 c->cavs_idct8_add = cavs_idct8_add_mmx;
471 } 472 }
472 473
473 void ff_cavsdsp_init_mmx(CAVSDSPContext *c, AVCodecContext *avctx) 474 void ff_cavsdsp_init_mmx(CAVSDSPContext *c, AVCodecContext *avctx)
474 { 475 {
475 int mm_flags = mm_support(); 476 int mm_flags = av_get_cpu_flags();
476 477
477 if (mm_flags & FF_MM_MMX2) ff_cavsdsp_init_mmx2 (c, avctx); 478 if (mm_flags & AV_CPU_FLAG_MMX2) ff_cavsdsp_init_mmx2 (c, avctx);
478 if (mm_flags & FF_MM_3DNOW) ff_cavsdsp_init_3dnow(c, avctx); 479 if (mm_flags & AV_CPU_FLAG_3DNOW) ff_cavsdsp_init_3dnow(c, avctx);
479 } 480 }
OLDNEW
« no previous file with comments | « source/patched-ffmpeg-mt/libavcodec/x86/Makefile ('k') | source/patched-ffmpeg-mt/libavcodec/x86/cpuid.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698