Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(423)

Side by Side Diff: src/opus_private.h

Issue 107243004: Updating Opus to release 1.1 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/opus
Patch Set: Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/opus_multistream_encoder.c ('k') | src/repacketizer.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* Copyright (c) 2012 Xiph.Org Foundation 1 /* Copyright (c) 2012 Xiph.Org Foundation
2 Written by Jean-Marc Valin */ 2 Written by Jean-Marc Valin */
3 /* 3 /*
4 Redistribution and use in source and binary forms, with or without 4 Redistribution and use in source and binary forms, with or without
5 modification, are permitted provided that the following conditions 5 modification, are permitted provided that the following conditions
6 are met: 6 are met:
7 7
8 - Redistributions of source code must retain the above copyright 8 - Redistributions of source code must retain the above copyright
9 notice, this list of conditions and the following disclaimer. 9 notice, this list of conditions and the following disclaimer.
10 10
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 80
81 81
82 #define OPUS_SET_FORCE_MODE_REQUEST 11002 82 #define OPUS_SET_FORCE_MODE_REQUEST 11002
83 #define OPUS_SET_FORCE_MODE(x) OPUS_SET_FORCE_MODE_REQUEST, __opus_check_int(x) 83 #define OPUS_SET_FORCE_MODE(x) OPUS_SET_FORCE_MODE_REQUEST, __opus_check_int(x)
84 84
85 typedef void (*downmix_func)(const void *, opus_val32 *, int, int, int, int, int ); 85 typedef void (*downmix_func)(const void *, opus_val32 *, int, int, int, int, int );
86 void downmix_float(const void *_x, opus_val32 *sub, int subframe, int offset, in t c1, int c2, int C); 86 void downmix_float(const void *_x, opus_val32 *sub, int subframe, int offset, in t c1, int c2, int C);
87 void downmix_int(const void *_x, opus_val32 *sub, int subframe, int offset, int c1, int c2, int C); 87 void downmix_int(const void *_x, opus_val32 *sub, int subframe, int offset, int c1, int c2, int C);
88 88
89 int optimize_framesize(const opus_val16 *x, int len, int C, opus_int32 Fs, 89 int optimize_framesize(const opus_val16 *x, int len, int C, opus_int32 Fs,
90 int bitrate, opus_val16 tonality, opus_val32 *mem, int buffering , 90 int bitrate, opus_val16 tonality, float *mem, int buffering,
91 downmix_func downmix); 91 downmix_func downmix);
92 92
93 int encode_size(int size, unsigned char *data); 93 int encode_size(int size, unsigned char *data);
94 94
95 opus_int32 frame_size_select(opus_int32 frame_size, int variable_duration, opus_ int32 Fs); 95 opus_int32 frame_size_select(opus_int32 frame_size, int variable_duration, opus_ int32 Fs);
96 96
97 opus_int32 compute_frame_size(const void *analysis_pcm, int frame_size, 97 opus_int32 compute_frame_size(const void *analysis_pcm, int frame_size,
98 int variable_duration, int C, opus_int32 Fs, int bitrate_bps, 98 int variable_duration, int C, opus_int32 Fs, int bitrate_bps,
99 int delay_compensation, downmix_func downmix, opus_val32 *subframe_mem); 99 int delay_compensation, downmix_func downmix
100 #ifndef DISABLE_FLOAT_API
101 , float *subframe_mem
102 #endif
103 );
100 104
101 opus_int32 opus_encode_native(OpusEncoder *st, const opus_val16 *pcm, int frame_ size, 105 opus_int32 opus_encode_native(OpusEncoder *st, const opus_val16 *pcm, int frame_ size,
102 unsigned char *data, opus_int32 out_data_bytes, int lsb_depth, 106 unsigned char *data, opus_int32 out_data_bytes, int lsb_depth,
103 const void *analysis_pcm, opus_int32 analysis_size, int c1, int c2, int an alysis_channels, downmix_func downmix); 107 const void *analysis_pcm, opus_int32 analysis_size, int c1, int c2, int an alysis_channels, downmix_func downmix);
104 108
105 int opus_decode_native(OpusDecoder *st, const unsigned char *data, opus_int32 le n, 109 int opus_decode_native(OpusDecoder *st, const unsigned char *data, opus_int32 le n,
106 opus_val16 *pcm, int frame_size, int decode_fec, int self_delimited, 110 opus_val16 *pcm, int frame_size, int decode_fec, int self_delimited,
107 int *packet_offset, int soft_clip); 111 opus_int32 *packet_offset, int soft_clip);
108 112
109 /* Make sure everything's aligned to sizeof(void *) bytes */ 113 /* Make sure everything's aligned to sizeof(void *) bytes */
110 static inline int align(int i) 114 static OPUS_INLINE int align(int i)
111 { 115 {
112 return (i+(int)sizeof(void *)-1)&-(int)sizeof(void *); 116 return (i+(int)sizeof(void *)-1)&-(int)sizeof(void *);
113 } 117 }
114 118
115 opus_int32 opus_repacketizer_out_range_impl(OpusRepacketizer *rp, int begin, int end, unsigned char *data, opus_int32 maxlen, int self_delimited); 119 int opus_packet_parse_impl(const unsigned char *data, opus_int32 len,
120 int self_delimited, unsigned char *out_toc,
121 const unsigned char *frames[48], opus_int16 size[48],
122 int *payload_offset, opus_int32 *packet_offset);
123
124 opus_int32 opus_repacketizer_out_range_impl(OpusRepacketizer *rp, int begin, int end,
125 unsigned char *data, opus_int32 maxlen, int self_delimited, int pad);
126
127 int pad_frame(unsigned char *data, opus_int32 len, opus_int32 new_len);
116 128
117 #endif /* OPUS_PRIVATE_H */ 129 #endif /* OPUS_PRIVATE_H */
OLDNEW
« no previous file with comments | « src/opus_multistream_encoder.c ('k') | src/repacketizer.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698