Merge "Bad cost tables used in ARNR filtering."
[libvpx.git] / wince_wmain_adapter.cpp
blob57f880a6ec13a04c0d3d0943cc1ce2dc67692958
1 /*
2 * Copyright (c) 2010 The WebM project authors. All Rights Reserved.
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
6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree.
9 */
12 /* This program is created to take command arguments and pass
13 * them to main() in example.c or example_xma.c, because the
14 * correspending part in example.c or example_xma.c does not
15 * work on Pocket PC platform.
16 * To modify the command arguments, go to "Property" page and
17 * fill in "Command arguments." For example:
18 * --codec vp6 --flipuv --progress _bnd.vp6
20 #include <stdio.h>
21 #include <stdlib.h>
22 #include <string.h>
24 #define MAX_NUM_ARG 64
25 #define MAX_SIZ_ARG 512
27 extern "C"
29 int main(int argc, char **argv);
32 int wmain(int argc, wchar_t **argv) {
33 char *cargv[MAX_NUM_ARG];
34 char chargv[MAX_SIZ_ARG];
35 int ret;
37 /* transform command line arguments from (wchar_t *) to (char *) */
38 for(int i=0; i<argc; i++) {
39 wcstombs( chargv, argv[i], sizeof(chargv));
40 cargv[i] = _strdup(chargv);
43 ret = main(argc, (char **)cargv);
45 //free the memory located by _strdup()
46 for(int i=0; i<argc; i++)
47 free(cargv[i]);
49 return ret;