| OLD | NEW | 
|---|
| 1 /* | 1 /* | 
| 2  *  Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2  *  Copyright (c) 2012 The WebRTC 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 | 
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 82         printf("  G.722: Invalid framelength %d.\n", framelength_int); | 82         printf("  G.722: Invalid framelength %d.\n", framelength_int); | 
| 83         exit(1); | 83         exit(1); | 
| 84     } | 84     } | 
| 85     framelength = static_cast<size_t>(framelength_int); | 85     framelength = static_cast<size_t>(framelength_int); | 
| 86 | 86 | 
| 87     /* Get Input and Output files */ | 87     /* Get Input and Output files */ | 
| 88     sscanf(argv[2], "%s", inname); | 88     sscanf(argv[2], "%s", inname); | 
| 89     sscanf(argv[3], "%s", outbit); | 89     sscanf(argv[3], "%s", outbit); | 
| 90     sscanf(argv[4], "%s", outname); | 90     sscanf(argv[4], "%s", outname); | 
| 91 | 91 | 
| 92     if ((inp = fopen(inname,"rb")) == NULL) { | 92     if ((inp = fopen(inname, "rb")) == nullptr) { | 
| 93         printf("  G.722: Cannot read file %s.\n", inname); | 93       printf("  G.722: Cannot read file %s.\n", inname); | 
| 94         exit(1); | 94       exit(1); | 
| 95     } | 95     } | 
| 96     if ((outbitp = fopen(outbit,"wb")) == NULL) { | 96     if ((outbitp = fopen(outbit, "wb")) == nullptr) { | 
| 97         printf("  G.722: Cannot write file %s.\n", outbit); | 97       printf("  G.722: Cannot write file %s.\n", outbit); | 
| 98         exit(1); | 98       exit(1); | 
| 99     } | 99     } | 
| 100     if ((outp = fopen(outname,"wb")) == NULL) { | 100     if ((outp = fopen(outname, "wb")) == nullptr) { | 
| 101         printf("  G.722: Cannot write file %s.\n", outname); | 101       printf("  G.722: Cannot write file %s.\n", outname); | 
| 102         exit(1); | 102       exit(1); | 
| 103     } | 103     } | 
| 104     printf("\nInput:%s\nOutput bitstream:%s\nOutput:%s\n", inname, outbit, outna
     me); | 104     printf("\nInput:%s\nOutput bitstream:%s\nOutput:%s\n", inname, outbit, outna
     me); | 
| 105 | 105 | 
| 106     /* Create and init */ | 106     /* Create and init */ | 
| 107     WebRtcG722_CreateEncoder((G722EncInst **)&G722enc_inst); | 107     WebRtcG722_CreateEncoder((G722EncInst **)&G722enc_inst); | 
| 108     WebRtcG722_CreateDecoder((G722DecInst **)&G722dec_inst); | 108     WebRtcG722_CreateDecoder((G722DecInst **)&G722dec_inst); | 
| 109     WebRtcG722_EncoderInit((G722EncInst *)G722enc_inst); | 109     WebRtcG722_EncoderInit((G722EncInst *)G722enc_inst); | 
| 110     WebRtcG722_DecoderInit((G722DecInst *)G722dec_inst); | 110     WebRtcG722_DecoderInit((G722DecInst *)G722dec_inst); | 
| 111 | 111 | 
| 112 | 112 | 
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 149     printf("\n\nLength of speech file: %.1f s\n", length_file); | 149     printf("\n\nLength of speech file: %.1f s\n", length_file); | 
| 150     printf("Time to run G.722:      %.2f s (%.2f %% of realtime)\n\n", runtime, 
     (100*runtime/length_file)); | 150     printf("Time to run G.722:      %.2f s (%.2f %% of realtime)\n\n", runtime, 
     (100*runtime/length_file)); | 
| 151     printf("---------------------END----------------------\n"); | 151     printf("---------------------END----------------------\n"); | 
| 152 | 152 | 
| 153     fclose(inp); | 153     fclose(inp); | 
| 154     fclose(outbitp); | 154     fclose(outbitp); | 
| 155     fclose(outp); | 155     fclose(outp); | 
| 156 | 156 | 
| 157     return 0; | 157     return 0; | 
| 158 } | 158 } | 
| OLD | NEW | 
|---|