Mercurial > libavcodec.hg
comparison motion-test.c @ 12456:a5ddb39627fd libavcodec
Rename FF_MM_ symbols related to CPU features flags as AV_CPU_FLAG_
symbols, and move them from libavcodec/avcodec.h to libavutil/cpu.h.
author | stefano |
---|---|
date | Sat, 04 Sep 2010 09:59:08 +0000 |
parents | 7dd2a45249a9 |
children |
comparison
equal
deleted
inserted
replaced
12455:14f85520cd02 | 12456:a5ddb39627fd |
---|---|
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) |
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); |