Last change
on this file since 4 was
2,
checked in by hhi, 13 years ago
|
inital import
|
-
Property svn:eol-style set to
native
|
File size:
1.5 KB
|
Line | |
---|
1 | |
---|
2 | |
---|
3 | /** \file decmain.cpp |
---|
4 | \brief Decoder application main |
---|
5 | */ |
---|
6 | |
---|
7 | #include <stdlib.h> |
---|
8 | #include <stdio.h> |
---|
9 | #include <time.h> |
---|
10 | #include "TAppDecTop.h" |
---|
11 | |
---|
12 | bool g_md5_mismatch = false; ///< top level flag that indicates if there has been a decoding mismatch |
---|
13 | |
---|
14 | // ==================================================================================================================== |
---|
15 | // Main function |
---|
16 | // ==================================================================================================================== |
---|
17 | |
---|
18 | int main(int argc, char* argv[]) |
---|
19 | { |
---|
20 | TAppDecTop cTAppDecTop; |
---|
21 | |
---|
22 | // print information |
---|
23 | fprintf( stdout, "\n" ); |
---|
24 | fprintf( stdout, "HM %s based Multiview Coder: Decoder Version [%s]", HM_VERSION, NV_VERSION ); |
---|
25 | fprintf( stdout, NVM_ONOS ); |
---|
26 | fprintf( stdout, NVM_COMPILEDBY ); |
---|
27 | fprintf( stdout, NVM_BITS ); |
---|
28 | fprintf( stdout, "\n" ); |
---|
29 | |
---|
30 | // create application decoder class |
---|
31 | cTAppDecTop.create(); |
---|
32 | |
---|
33 | // parse configuration |
---|
34 | if(!cTAppDecTop.parseCfg( argc, argv )) |
---|
35 | { |
---|
36 | cTAppDecTop.destroy(); |
---|
37 | return 1; |
---|
38 | } |
---|
39 | |
---|
40 | // starting time |
---|
41 | double dResult; |
---|
42 | long lBefore = clock(); |
---|
43 | |
---|
44 | // call decoding function |
---|
45 | cTAppDecTop.decode(); |
---|
46 | |
---|
47 | if (g_md5_mismatch) |
---|
48 | { |
---|
49 | printf("\n\n***ERROR*** A decoding mismatch occured: signalled md5sum does not match\n"); |
---|
50 | } |
---|
51 | |
---|
52 | // ending time |
---|
53 | dResult = (double)(clock()-lBefore) / CLOCKS_PER_SEC; |
---|
54 | printf("\n Total Time: %12.3f sec.\n", dResult); |
---|
55 | |
---|
56 | // destroy application decoder class |
---|
57 | cTAppDecTop.destroy(); |
---|
58 | |
---|
59 | return g_md5_mismatch ? EXIT_FAILURE : EXIT_SUCCESS; |
---|
60 | } |
---|
61 | |
---|
62 | |
---|
Note: See
TracBrowser for help on using the repository browser.