ref: 275b9fd61b90f961806ba3816b0442662658eb7f
parent: d87be719523969fdab7b27ce506e4c783da5d21b
author: qwx <qwx@sciops.net>
date: Sat Jan 9 12:17:14 EST 2021
update opus-tools patches for latest changes
--- a/opus-tools
+++ b/opus-tools
@@ -40,9 +40,9 @@
+$O.opusdec: opusdec.$O wav_io.$O wave_out.$O diag_range.$O $COMMON
+$O.opusenc: opusenc.$O audio-in.$O diag_range.$O flac.$O picture.$O $COMMON
+$O.opusinfo: opusinfo.$O info_opus.$O picture.$O $COMMON
---- /mnt/git/branch/heads/test3-appveyor/tree/src/audio-in.c Mon Sep 9 09:24:16 2019
-+++ src/audio-in.c Sat Feb 1 21:27:05 2020
-@@ -718,7 +718,11 @@ long wav_read(void *in, float *buffer, i
+--- /mnt/git/object/ae5d6d59e82ef40300a4dece7897499685f87184/tree/src/audio-in.c
++++ src/audio-in.c
+@@ -718,7 +718,11 @@
int sampbyte = f->samplesize / 8;
int realsamples = f->totalsamples > 0 && samples > (f->totalsamples - f->samplesread)
? (int)(f->totalsamples - f->samplesread) : samples;
@@ -55,20 +55,11 @@
int i,j;
int *ch_permute = f->channel_permute;
-@@ -790,17 +794,20 @@ long wav_read(void *in, float *buffer, i
- }
- }
- else {
-+ free(buf);
- fprintf(stderr, _("Big endian 24 bit PCM data is not currently "
- "supported, aborting.\n"));
- return 0;
- }
- }
+@@ -806,9 +810,11 @@
else {
-+ free(buf);
fprintf(stderr, _("Internal error: attempt to read unsupported "
"bitdepth %d\n"), f->samplesize);
++ free(buf);
return 0;
}
@@ -76,7 +67,7 @@
return realsamples;
}
-@@ -809,9 +816,14 @@ long wav_ieee_read(void *in, float *buff
+@@ -817,9 +823,14 @@
wavfile *f = (wavfile *)in;
int realsamples = f->totalsamples > 0 && samples > (f->totalsamples - f->samplesread)
? (int)(f->totalsamples - f->samplesread) : samples;
@@ -92,17 +83,17 @@
realsamples = (int)fread(buf, 4*f->channels, realsamples, f->f);
f->samplesread += realsamples;
-@@ -819,6 +831,7 @@ long wav_ieee_read(void *in, float *buff
- for (j=0; j < f->channels; j++)
- buffer[i*f->channels+j] = get_le_float(buf + i*f->channels + f->channel_permute[j]);
+@@ -836,6 +847,7 @@
+ get_be_float(buf + i*f->channels + f->channel_permute[j]);
+ }
+ free(buf);
return realsamples;
}
---- /mnt/git/branch/heads/test3-appveyor/tree/src/opusdec.c Mon Sep 9 09:24:16 2019
-+++ src/opusdec.c Sat Feb 1 21:28:20 2020
-@@ -494,8 +494,12 @@ opus_int64 audio_write(float *pcm, int c
+--- /mnt/git/object/ae5d6d59e82ef40300a4dece7897499685f87184/tree/src/opusdec.c
++++ src/opusdec.c
+@@ -494,8 +494,12 @@
short *out;
float *buf;
float *output;
@@ -117,7 +108,7 @@
maxout=((link_read/48000)*rate + (link_read%48000)*rate/48000) - link_out;
maxout=maxout<0?0:maxout;
do {
-@@ -561,6 +565,8 @@ opus_int64 audio_write(float *pcm, int c
+@@ -561,6 +565,8 @@
maxout-=ret;
}
} while (frame_size>0 && maxout>0);
@@ -126,7 +117,7 @@
return sampout;
}
-@@ -848,8 +854,8 @@ int main(int argc, char **argv)
+@@ -848,8 +854,8 @@
}
else
{
@@ -137,7 +128,7 @@
{
st=op_open_file(inFile,NULL);
}
-@@ -1057,7 +1063,8 @@ int main(int argc, char **argv)
+@@ -1057,7 +1063,8 @@
resampler=NULL;
}
/*We've encountered a new link.*/
--- a/opus-tools-defaults
+++ b/opus-tools-defaults
@@ -1,6 +1,6 @@
---- /mnt/git/branch/heads/test3-appveyor/tree/src/audio-in.c Sat Feb 1 21:29:22 2020
-+++ src/audio-in.c Sat Feb 1 21:31:20 2020
-@@ -668,8 +668,8 @@ int wav_open(FILE *in, oe_enc_opt *opt,
+--- /mnt/git/object/9e6bc60eca7b34de0173ae12a5de7d6699bffe86/tree/src/audio-in.c
++++ src/audio-in.c
+@@ -668,8 +668,8 @@
this length so that we do not misinterpret any additional
chunks after this as audio. Also use this length to report
percent progress. */
@@ -11,9 +11,9 @@
}
else
{
---- /mnt/git/branch/heads/test3-appveyor/tree/src/opusdec.c Sat Feb 1 21:29:22 2020
-+++ src/opusdec.c Sat Feb 1 21:29:42 2020
-@@ -436,27 +436,13 @@ void usage(void)
+--- /mnt/git/object/9e6bc60eca7b34de0173ae12a5de7d6699bffe86/tree/src/opusdec.c
++++ src/opusdec.c
+@@ -436,27 +436,13 @@
defined HAVE_SYS_AUDIOIO_H || defined WIN32 || defined _WIN32
printf("Usage: opusdec [options] input [output]\n");
#else
@@ -42,7 +42,7 @@
printf(" -h, --help Show this help\n");
printf(" -V, --version Show version information\n");
printf(" --quiet Suppress program output\n");
-@@ -468,7 +454,6 @@ void usage(void)
+@@ -468,7 +454,6 @@
printf(" --force-wav Force Wave header on output\n");
printf(" --packet-loss n Simulate n %% random packet loss\n");
printf(" --save-range file Save check values for every frame to a file\n");
@@ -50,7 +50,7 @@
}
void version(void)
-@@ -683,7 +668,7 @@ int main(int argc, char **argv)
+@@ -683,7 +668,7 @@
int file_output;
int old_li=-1;
int li;
@@ -59,7 +59,7 @@
int forcewav = 0;
ogg_int64_t nb_read_total=0;
ogg_int64_t link_read=0;
-@@ -709,10 +694,10 @@ int main(int argc, char **argv)
+@@ -709,10 +694,10 @@
float loss_percent=-1;
float manual_gain=0;
int force_rate=0;
@@ -72,7 +72,7 @@
int wav_format=0;
int dither=1;
int fp=0;
-@@ -801,13 +786,7 @@ int main(int argc, char **argv)
+@@ -801,13 +786,7 @@
goto done;
}
}
@@ -87,7 +87,7 @@
/*Output to a file or playback?*/
file_output=argc_utf8-optind==2;
-@@ -824,7 +803,7 @@ int main(int argc, char **argv)
+@@ -824,7 +803,7 @@
}
wav_format|=forcewav;
} else {
@@ -96,9 +96,9 @@
wav_format=0;
/*If playing to audio out, default the rate to 48000
instead of the original rate. The original rate is
---- /mnt/git/branch/heads/test3-appveyor/tree/src/opusenc.c Sat Feb 1 21:29:22 2020
-+++ src/opusenc.c Sat Feb 1 21:29:42 2020
-@@ -117,20 +117,12 @@ static void opustoolsversion_short(const
+--- /mnt/git/object/9e6bc60eca7b34de0173ae12a5de7d6699bffe86/tree/src/opusenc.c
++++ src/opusenc.c
+@@ -117,20 +117,12 @@
static void usage(void)
{
@@ -120,7 +120,7 @@
printf("\nGeneral options:\n");
printf(" -h, --help Show this help\n");
printf(" -V, --version Show version information\n");
-@@ -417,7 +409,7 @@ int main(int argc, char **argv)
+@@ -419,7 +411,7 @@
time_t last_spin=0;
int last_spin_len=0;
/*Settings*/
@@ -129,7 +129,7 @@
opus_int32 bitrate=-1;
opus_int32 rate=48000;
opus_int32 frame_size=960;
-@@ -458,12 +450,12 @@ int main(int argc, char **argv)
+@@ -460,12 +452,12 @@
range_file=NULL;
in_format=NULL;
inopt.channels=chan;
@@ -141,12 +141,12 @@
inopt.endianness=0;
- inopt.rawmode=0;
+ inopt.rawmode=1;
+ inopt.rawmode_f=0;
inopt.ignorelength=0;
inopt.copy_comments=1;
- inopt.copy_pictures=1;
-@@ -790,12 +782,8 @@ int main(int argc, char **argv)
- break;
- }
+@@ -805,12 +797,8 @@
+ fatal("Invalid bit-depth:\n"
+ "--raw-bits must be 32 for float sample format\n");
}
- if (argc_utf8-optind!=2) {
- usage();