[xiph-commits] r16996 - in trunk/vorbis-tools: ogg123 oggenc oggenc/man
xiphmont at svn.xiph.org
xiphmont at svn.xiph.org
Mon Mar 22 20:44:55 PDT 2010
Author: xiphmont
Date: 2010-03-22 20:44:55 -0700 (Mon, 22 Mar 2010)
New Revision: 16996
Modified:
trunk/vorbis-tools/ogg123/ogg123.c
trunk/vorbis-tools/oggenc/audio.c
trunk/vorbis-tools/oggenc/encode.c
trunk/vorbis-tools/oggenc/man/oggenc.1
trunk/vorbis-tools/oggenc/oggenc.c
Log:
Add 'disable_coupling' advanced option to oggenc
PRIMAGIC was too large by a factor of 2; reduce it, allow more status
updates
Modified: trunk/vorbis-tools/ogg123/ogg123.c
===================================================================
--- trunk/vorbis-tools/ogg123/ogg123.c 2010-03-23 03:44:44 UTC (rev 16995)
+++ trunk/vorbis-tools/ogg123/ogg123.c 2010-03-23 03:44:55 UTC (rev 16996)
@@ -55,9 +55,9 @@
void play (char *source_string);
-#define PRIMAGIC (2*2*2*2*3*3*3*5*7)
+#define PRIMAGIC (2*2*2*3*3*3*5*7)
/* take buffer out of the data segment, not the stack */
-#define AUDIO_CHUNK_SIZE ((32768 + PRIMAGIC - 1)/ PRIMAGIC * PRIMAGIC)
+#define AUDIO_CHUNK_SIZE ((16384 + PRIMAGIC - 1)/ PRIMAGIC * PRIMAGIC)
unsigned char convbuffer[AUDIO_CHUNK_SIZE];
int convsize = AUDIO_CHUNK_SIZE;
Modified: trunk/vorbis-tools/oggenc/audio.c
===================================================================
--- trunk/vorbis-tools/oggenc/audio.c 2010-03-23 03:44:44 UTC (rev 16995)
+++ trunk/vorbis-tools/oggenc/audio.c 2010-03-23 03:44:55 UTC (rev 16996)
@@ -4,6 +4,7 @@
** A copy of this license is included with this source.
**
** Copyright 2000-2002, Michael Smith <msmith at xiph.org>
+ ** 2010, Monty <monty at xiph.org>
**
** AIFF/AIFC support from OggSquish, (c) 1994-1996 Monty <xiphmont at xiph.org>
**/
@@ -27,8 +28,6 @@
#include "flac.h"
#endif
-#define WAV_HEADER_SIZE 44
-
/* Macros to read header data */
#define READ_U32_LE(buf) \
(((buf)[3]<<24)|((buf)[2]<<16)|((buf)[1]<<8)|((buf)[0]&0xff))
Modified: trunk/vorbis-tools/oggenc/encode.c
===================================================================
--- trunk/vorbis-tools/oggenc/encode.c 2010-03-23 03:44:44 UTC (rev 16995)
+++ trunk/vorbis-tools/oggenc/encode.c 2010-03-23 03:44:55 UTC (rev 16996)
@@ -66,8 +66,12 @@
vorbis_encode_ctl(vi, OV_ECTL_RATEMANAGE2_GET, &ai);
for(i=0; i < count; i++) {
+ if(opts[i].val)
fprintf(stderr, _("Setting advanced encoder option \"%s\" to %s\n"),
opts[i].arg, opts[i].val);
+ else
+ fprintf(stderr, _("Setting advanced encoder option \"%s\"\n"),
+ opts[i].arg);
if(!strcmp(opts[i].arg, "bitrate_average_damping")) {
SETD(ai.bitrate_average_damping);
@@ -93,6 +97,10 @@
SETL(ai.bitrate_limit_max_kbps);
manage = 1;
}
+ else if(!strcmp(opts[i].arg, "disable_coupling")) {
+ int val=0;
+ vorbis_encode_ctl(vi, OV_ECTL_COUPLING_SET, &val);
+ }
else if(!strcmp(opts[i].arg, "impulse_noisetune")) {
double val;
SETD(val);
Modified: trunk/vorbis-tools/oggenc/man/oggenc.1
===================================================================
--- trunk/vorbis-tools/oggenc/man/oggenc.1 2010-03-23 03:44:44 UTC (rev 16995)
+++ trunk/vorbis-tools/oggenc/man/oggenc.1 2010-03-23 03:44:55 UTC (rev 16996)
@@ -325,6 +325,13 @@
The setting must be greater than zero and the useful range is
approximately \.05 to 10. The default is \.75 seconds.
+.IP "disable_coupling"
+Disable use of channel coupling for multichannel encoding. At present,
+the encoder will normally use channel coupling to further increase
+compression with stereo and 5.1 inputs. This option forces the encoder
+to encode each channel fully independently using neither lossy nor
+lossless coupling.
+
.SH EXAMPLES
Simplest version. Produces output as somefile.ogg:
Modified: trunk/vorbis-tools/oggenc/oggenc.c
===================================================================
--- trunk/vorbis-tools/oggenc/oggenc.c 2010-03-23 03:44:44 UTC (rev 16995)
+++ trunk/vorbis-tools/oggenc/oggenc.c 2010-03-23 03:44:55 UTC (rev 16996)
@@ -749,13 +749,16 @@
char *arg = strdup(optarg);
char *val;
- val = strchr(arg, '=');
- if(val == NULL) {
+ if(strcmp("disable_coupling",arg)){
+ val = strchr(arg, '=');
+ if(val == NULL) {
fprintf(stderr, _("No value for advanced encoder option found\n"));
continue;
- }
- else
+ }
+ else
*val++=0;
+ }else
+ val=0;
opt->advopt = realloc(opt->advopt, (++opt->advopt_count)*sizeof(adv_opt));
opt->advopt[opt->advopt_count - 1].arg = arg;
More information about the commits
mailing list