ref: 468a693dd44cee8bb883766e5f623c24fbda2735
parent: b778271d53928445964cfe801d7461e6db7a67fa
author: Jean-Marc Valin <jmvalin@jmvalin.ca>
date: Sun Jan 21 09:10:27 EST 2024
Cleanup previous commits Rename, reindent, change arg order
--- a/src/opus_encoder.c
+++ b/src/opus_encoder.c
@@ -1034,8 +1034,8 @@
return redundancy_bytes;
}
-static opus_int32 opus_encode_native_process(OpusEncoder *st, const opus_val16 *pcm, int frame_size,
- unsigned char *data,
+static opus_int32 opus_encode_frame_native(OpusEncoder *st, const opus_val16 *pcm, int frame_size,
+ unsigned char *data, opus_int32 max_data_bytes,
int float_api, int first_frame,
#ifdef ENABLE_DRED
opus_int32 dred_bitrate_bps,
@@ -1043,7 +1043,7 @@
#ifndef DISABLE_FLOAT_API
AnalysisInfo *analysis_info, int is_silence,
#endif
- int redundancy, int celt_to_silk, int prefill, opus_int32 max_data_bytes,
+ int redundancy, int celt_to_silk, int prefill,
opus_int32 equiv_rate, int to_celt);
opus_int32 opus_encode_native(OpusEncoder *st, const opus_val16 *pcm, int frame_size,
@@ -1631,7 +1631,7 @@
}
#endif
- tmp_len = opus_encode_native_process(st, pcm+i*(st->channels*enc_frame_size), enc_frame_size, curr_data, float_api, first_frame,
+ tmp_len = opus_encode_frame_native(st, pcm+i*(st->channels*enc_frame_size), enc_frame_size, curr_data, curr_max, float_api, first_frame,
#ifdef ENABLE_DRED
dred_bitrate_bps,
#endif
@@ -1639,7 +1639,7 @@
&analysis_info,
is_silence,
#endif
- frame_redundancy, celt_to_silk, prefill, curr_max,
+ frame_redundancy, celt_to_silk, prefill,
equiv_rate, frame_to_celt
);
if (tmp_len<0)
@@ -1666,15 +1666,15 @@
RESTORE_STACK;
return ret;
} else {
- ret = opus_encode_native_process(st, pcm, frame_size, data, float_api, 1,
+ ret = opus_encode_frame_native(st, pcm, frame_size, data, max_data_bytes, float_api, 1,
#ifdef ENABLE_DRED
- dred_bitrate_bps,
+ dred_bitrate_bps,
#endif
#ifndef DISABLE_FLOAT_API
- &analysis_info,
- is_silence,
+ &analysis_info,
+ is_silence,
#endif
- redundancy, celt_to_silk, prefill, max_data_bytes,
+ redundancy, celt_to_silk, prefill,
equiv_rate, to_celt
);
RESTORE_STACK;
@@ -1682,8 +1682,8 @@
}
}
-static opus_int32 opus_encode_native_process(OpusEncoder *st, const opus_val16 *pcm, int frame_size,
- unsigned char *data,
+static opus_int32 opus_encode_frame_native(OpusEncoder *st, const opus_val16 *pcm, int frame_size,
+ unsigned char *data, opus_int32 max_data_bytes,
int float_api, int first_frame,
#ifdef ENABLE_DRED
opus_int32 dred_bitrate_bps,
@@ -1691,7 +1691,7 @@
#ifndef DISABLE_FLOAT_API
AnalysisInfo *analysis_info, int is_silence,
#endif
- int redundancy, int celt_to_silk, int prefill, opus_int32 max_data_bytes,
+ int redundancy, int celt_to_silk, int prefill,
opus_int32 equiv_rate, int to_celt)
{
void *silk_enc;
--
⑨