OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2010 The WebM project authors. All Rights Reserved. | 2 * Copyright (c) 2010 The WebM project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
11 | 11 |
12 /* This is a simple program showing how to initialize the decoder in XMA mode */ | 12 /* This is a simple program showing how to initialize the decoder in XMA mode */ |
13 #include <stdio.h> | 13 #include <stdio.h> |
14 #include <stdlib.h> | 14 #include <stdlib.h> |
15 #include <stdarg.h> | 15 #include <stdarg.h> |
16 #include <string.h> | 16 #include <string.h> |
17 #define VPX_CODEC_DISABLE_COMPAT 1 | 17 #define VPX_CODEC_DISABLE_COMPAT 1 |
18 #include "vpx_config.h" | 18 #include "vpx_config.h" |
19 #include "vpx/vpx_decoder.h" | 19 #include "vpx/vpx_decoder.h" |
20 #include "vpx/vpx_integer.h" | 20 #include "vpx/vpx_integer.h" |
21 #if CONFIG_VP9_DECODER | 21 #if CONFIG_VP9_DECODER |
22 #include "vpx/vp8dx.h" | 22 #include "vpx/vp8dx.h" |
23 #endif | 23 #endif |
24 | 24 |
25 static char *exec_name; | 25 static char *exec_name; |
26 static int verbose = 0; | 26 static int verbose = 0; |
27 | 27 |
28 static const struct { | 28 static const struct { |
29 const char *name; | 29 const char *name; |
30 const vpx_codec_iface_t *iface; | 30 vpx_codec_iface_t *iface; |
31 } ifaces[] = { | 31 } ifaces[] = { |
32 #if CONFIG_VP9_DECODER | 32 #if CONFIG_VP9_DECODER |
33 {"vp9", &vpx_codec_vp8_dx_algo}, | 33 {"vp9", &vpx_codec_vp8_dx_algo}, |
34 #endif | 34 #endif |
35 }; | 35 }; |
36 | 36 |
37 static void usage_exit(void) { | 37 static void usage_exit(void) { |
38 int i; | 38 int i; |
39 | 39 |
40 printf("Usage: %s <options>\n\n" | 40 printf("Usage: %s <options>\n\n" |
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
184 return EXIT_FAILURE; | 184 return EXIT_FAILURE; |
185 } | 185 } |
186 } while (res != VPX_CODEC_LIST_END); | 186 } while (res != VPX_CODEC_LIST_END); |
187 | 187 |
188 printf("%s\n %d bytes external memory required for %dx%d.\n", | 188 printf("%s\n %d bytes external memory required for %dx%d.\n", |
189 decoder.name, alloc_sz, cfg.w, cfg.h); | 189 decoder.name, alloc_sz, cfg.w, cfg.h); |
190 vpx_codec_destroy(&decoder); | 190 vpx_codec_destroy(&decoder); |
191 return EXIT_SUCCESS; | 191 return EXIT_SUCCESS; |
192 | 192 |
193 } | 193 } |
OLD | NEW |