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

Side by Side Diff: source/patched-ffmpeg-mt/libavcodec/motion-test.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 * (c) 2001 Fabrice Bellard 2 * (c) 2001 Fabrice Bellard
3 * 3 *
4 * This file is part of FFmpeg. 4 * This file is part of FFmpeg.
5 * 5 *
6 * FFmpeg is free software; you can redistribute it and/or 6 * FFmpeg is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public 7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version. 9 * version 2.1 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 (double)NB_ITS * (WIDTH - 16) * (HEIGHT - 16) / 121 (double)NB_ITS * (WIDTH - 16) * (HEIGHT - 16) /
122 (double)(ti / 1000.0)); 122 (double)(ti / 1000.0));
123 } 123 }
124 124
125 125
126 int main(int argc, char **argv) 126 int main(int argc, char **argv)
127 { 127 {
128 AVCodecContext *ctx; 128 AVCodecContext *ctx;
129 int c; 129 int c;
130 DSPContext cctx, mmxctx; 130 DSPContext cctx, mmxctx;
131 int flags[2] = { FF_MM_MMX, FF_MM_MMX2 }; 131 int flags[2] = { AV_CPU_FLAG_MMX, AV_CPU_FLAG_MMX2 };
132 int flags_size = HAVE_MMX2 ? 2 : 1; 132 int flags_size = HAVE_MMX2 ? 2 : 1;
133 133
134 for(;;) { 134 for(;;) {
135 c = getopt(argc, argv, "h"); 135 c = getopt(argc, argv, "h");
136 if (c == -1) 136 if (c == -1)
137 break; 137 break;
138 switch(c) { 138 switch(c) {
139 case 'h': 139 case 'h':
140 help(); 140 help();
141 break; 141 break;
142 } 142 }
143 } 143 }
144 144
145 printf("ffmpeg motion test\n"); 145 printf("ffmpeg motion test\n");
146 146
147 ctx = avcodec_alloc_context(); 147 ctx = avcodec_alloc_context();
148 ctx->dsp_mask = FF_MM_FORCE; 148 ctx->dsp_mask = AV_CPU_FLAG_FORCE;
149 dsputil_init(&cctx, ctx); 149 dsputil_init(&cctx, ctx);
150 for (c = 0; c < flags_size; c++) { 150 for (c = 0; c < flags_size; c++) {
151 int x; 151 int x;
152 ctx->dsp_mask = FF_MM_FORCE | flags[c]; 152 ctx->dsp_mask = AV_CPU_FLAG_FORCE | flags[c];
153 dsputil_init(&mmxctx, ctx); 153 dsputil_init(&mmxctx, ctx);
154 154
155 for (x = 0; x < 2; x++) { 155 for (x = 0; x < 2; x++) {
156 printf("%s for %dx%d pixels\n", c ? "mmx2" : "mmx", 156 printf("%s for %dx%d pixels\n", c ? "mmx2" : "mmx",
157 x ? 8 : 16, x ? 8 : 16); 157 x ? 8 : 16, x ? 8 : 16);
158 test_motion("mmx", mmxctx.pix_abs[x][0], cctx.pix_abs[x][0]); 158 test_motion("mmx", mmxctx.pix_abs[x][0], cctx.pix_abs[x][0]);
159 test_motion("mmx_x2", mmxctx.pix_abs[x][1], cctx.pix_abs[x][1]); 159 test_motion("mmx_x2", mmxctx.pix_abs[x][1], cctx.pix_abs[x][1]);
160 test_motion("mmx_y2", mmxctx.pix_abs[x][2], cctx.pix_abs[x][2]); 160 test_motion("mmx_y2", mmxctx.pix_abs[x][2], cctx.pix_abs[x][2]);
161 test_motion("mmx_xy2", mmxctx.pix_abs[x][3], cctx.pix_abs[x][3]); 161 test_motion("mmx_xy2", mmxctx.pix_abs[x][3], cctx.pix_abs[x][3]);
162 } 162 }
163 } 163 }
164 av_free(ctx); 164 av_free(ctx);
165 165
166 return 0; 166 return 0;
167 } 167 }
OLDNEW
« no previous file with comments | « source/patched-ffmpeg-mt/libavcodec/mjpegdec.c ('k') | source/patched-ffmpeg-mt/libavcodec/mpegvideo.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698