[CinCV] SOWT Audio Patch

2010-06-28 Thread Mark Goldberg
Here is a quick and dirty patch to add SOWT audio. It applies to git
as of 27 Jun 2010.
It adds sowt.c and sowt.h, slightly modified from twos.c and twos.h,
changes a few
other files to include the new codec, and changes all Makefiles I could find to
hopefully include these changes no matter how it is built. It could be
more efficient,
and maybe some of the Makefiles are actually overwritten, but it works for me.

Mark
Common subdirectories: my_cinelerra/quicktime/docs and my_cinelerra_sowt/quicktime/docs
Common subdirectories: my_cinelerra/quicktime/encore50 and my_cinelerra_sowt/quicktime/encore50
Common subdirectories: my_cinelerra/quicktime/ffmpeg and my_cinelerra_sowt/quicktime/ffmpeg
diff -Nau my_cinelerra/quicktime/Makefile.2 my_cinelerra_sowt/quicktime/Makefile.2
--- my_cinelerra/quicktime/Makefile.2	2010-06-28 00:47:50.0 -0700
+++ my_cinelerra_sowt/quicktime/Makefile.2	2010-06-28 00:38:08.0 -0700
@@ -115,6 +115,7 @@
 	$(OBJDIR)/tkhd.o \
 	$(OBJDIR)/trak.o \
 	$(OBJDIR)/twos.o \
+	$(OBJDIR)/sowt.o \
 	$(OBJDIR)/udta.o \
 	$(OBJDIR)/ulaw.o \
 	$(OBJDIR)/util.o \
@@ -377,6 +378,7 @@
 $(OBJDIR)/tkhd.o:			  tkhd.c
 $(OBJDIR)/trak.o:			  trak.c
 $(OBJDIR)/twos.o:			  twos.c
+$(OBJDIR)/sowt.o:			  sowt.c
 $(OBJDIR)/udta.o:			  udta.c
 $(OBJDIR)/ulaw.o:			  ulaw.c
 $(OBJDIR)/util.o:			  util.c
diff -Nau my_cinelerra/quicktime/Makefile.50 my_cinelerra_sowt/quicktime/Makefile.50
--- my_cinelerra/quicktime/Makefile.50	2010-06-28 00:47:50.0 -0700
+++ my_cinelerra_sowt/quicktime/Makefile.50	2010-06-28 00:39:29.0 -0700
@@ -131,6 +131,7 @@
 	$(OBJDIR)/tkhd.o \
 	$(OBJDIR)/trak.o \
 	$(OBJDIR)/twos.o \
+	$(OBJDIR)/sowt.o \
 	$(OBJDIR)/udta.o \
 	$(OBJDIR)/ulaw.o \
 	$(OBJDIR)/util.o \
@@ -360,6 +361,7 @@
 $(OBJDIR)/tkhd.o:			  tkhd.c
 $(OBJDIR)/trak.o:			  trak.c
 $(OBJDIR)/twos.o:			  twos.c
+$(OBJDIR)/sowt.o:			  sowt.c
 $(OBJDIR)/udta.o:			  udta.c
 $(OBJDIR)/ulaw.o:			  ulaw.c
 $(OBJDIR)/util.o:			  util.c
diff -Nau my_cinelerra/quicktime/Makefile.am my_cinelerra_sowt/quicktime/Makefile.am
--- my_cinelerra/quicktime/Makefile.am	2010-06-28 00:47:50.0 -0700
+++ my_cinelerra_sowt/quicktime/Makefile.am	2010-06-28 00:40:42.0 -0700
@@ -66,7 +66,7 @@
 	rawaudio.c \
 	rle.c \
 	smhd.c stbl.c stco.c stsc.c stsd.c stsdtable.c stss.c stsz.c stts.c \
-	tkhd.c trak.c twos.c udta.c ulaw.c util.c v308.c v408.c v410.c vmhd.c \
+	tkhd.c trak.c twos.c sowt.c udta.c ulaw.c util.c v308.c v408.c v410.c vmhd.c \
 	vbraudio.c \
 	vorbis.c workarounds.c yuv2.c yuv4.c yv12.c wmx2.c \
 	wma.c mpeg4.c
@@ -103,6 +103,7 @@
 	rtjpeg.h \
 	rtjpeg_core.h \
 	twos.h \
+	sowt.h \
 	ulaw.h \
 	v308.h \
 	v408.h \
diff -Nau my_cinelerra/quicktime/Makefile.encore2 my_cinelerra_sowt/quicktime/Makefile.encore2
--- my_cinelerra/quicktime/Makefile.encore2	2010-06-28 00:47:50.0 -0700
+++ my_cinelerra_sowt/quicktime/Makefile.encore2	2010-06-28 00:42:00.0 -0700
@@ -150,6 +150,7 @@
 	$(OBJDIR)/tkhd.o \
 	$(OBJDIR)/trak.o \
 	$(OBJDIR)/twos.o \
+	$(OBJDIR)/sowt.o \
 	$(OBJDIR)/udta.o \
 	$(OBJDIR)/ulaw.o \
 	$(OBJDIR)/util.o \
@@ -510,6 +511,7 @@
 $(OBJDIR)/tkhd.o:			  tkhd.c
 $(OBJDIR)/trak.o:			  trak.c
 $(OBJDIR)/twos.o:			  twos.c
+$(OBJDIR)/sowt.o:			  sowt.c
 $(OBJDIR)/udta.o:			  udta.c
 $(OBJDIR)/ulaw.o:			  ulaw.c
 $(OBJDIR)/util.o:			  util.c
diff -Nau my_cinelerra/quicktime/plugin.c my_cinelerra_sowt/quicktime/plugin.c
--- my_cinelerra/quicktime/plugin.c	2010-06-28 00:47:52.0 -0700
+++ my_cinelerra_sowt/quicktime/plugin.c	2010-06-28 00:43:24.0 -0700
@@ -41,6 +41,7 @@
 #include qtmp3.h
 #include rawaudio.h
 #include twos.h
+#include sowt.h
 #include ulaw.h
 #include wma.h
 #include wmx2.h
@@ -48,6 +49,7 @@
 static void register_acodecs()
 {
 	register_acodec(quicktime_init_codec_twos);
+	register_acodec(quicktime_init_codec_sowt);
 	register_acodec(quicktime_init_codec_rawaudio);
 	register_acodec(quicktime_init_codec_ima4);
 	register_acodec(quicktime_init_codec_mp4a);
diff -Nau my_cinelerra/quicktime/quicktime.h my_cinelerra_sowt/quicktime/quicktime.h
--- my_cinelerra/quicktime/quicktime.h	2010-06-28 00:47:52.0 -0700
+++ my_cinelerra_sowt/quicktime/quicktime.h	2010-06-28 00:44:40.0 -0700
@@ -115,6 +115,7 @@
 
 /* Twos compliment 8, 16, 24 */
 #define QUICKTIME_TWOS twos
+#define QUICKTIME_SOWT sowt
 
 /* ulaw */
 #define QUICKTIME_ULAW ulaw
diff -Nau my_cinelerra/quicktime/sowt.c my_cinelerra_sowt/quicktime/sowt.c
--- my_cinelerra/quicktime/sowt.c	1969-12-31 17:00:00.0 -0700
+++ my_cinelerra_sowt/quicktime/sowt.c	2010-06-28 00:35:39.0 -0700
@@ -0,0 +1,335 @@
+#include funcprotos.h
+#include quicktime.h
+#include sowt.h
+
+/* === private for sowt */
+
+
+typedef struct
+{
+	char *work_buffer;
+	long buffer_size;
+} quicktime_sowt_codec_t;
+
+static int byte_order(void)
+{/* 1 if little endian */
+	int16_t byteordertest;
+	int 

[CinCV] Re: SOWT Audio Patch - Works With Canon 7D Files

2010-06-28 Thread Mark Goldberg
On Mon, Jun 28, 2010 at 8:04 AM, Mark Goldberg marklgoldb...@gmail.com wrote:
 Here is a quick and dirty patch to add SOWT audio. It applies to git
 as of 27 Jun 2010.
 It adds sowt.c and sowt.h, slightly modified from twos.c and twos.h,
 changes a few
 other files to include the new codec, and changes all Makefiles I could find 
 to
 hopefully include these changes no matter how it is built. It could be
 more efficient,
 and maybe some of the Makefiles are actually overwritten, but it works for me.

By the way, this works with files from my Canon 7D. I have not used it enough to
be sure there are no sound sync issues.

Mark

___
Cinelerra mailing list
Cinelerra@skolelinux.no
https://init.linpro.no/mailman/skolelinux.no/listinfo/cinelerra


Re: [CinCV] Re: SOWT Audio Patch - Works With Canon 7D Files

2010-06-28 Thread Einar Rünkaru
On Mon, Jun 28, 2010 at 8:56 PM, Mark Goldberg marklgoldb...@gmail.com wrote:
 On Mon, Jun 28, 2010 at 8:04 AM, Mark Goldberg marklgoldb...@gmail.com 
 wrote:
 Here is a quick and dirty patch to add SOWT audio. It applies to git
 as of 27 Jun 2010.
 It adds sowt.c and sowt.h, slightly modified from twos.c and twos.h,
 changes a few
 other files to include the new codec, and changes all Makefiles I could find 
 to
 hopefully include these changes no matter how it is built. It could be
 more efficient,
 and maybe some of the Makefiles are actually overwritten, but it works for 
 me.

 By the way, this works with files from my Canon 7D. I have not used it enough 
 to
 be sure there are no sound sync issues.

 Mark

Patch applied. Thanks.

By the way, sync issues may be related to resampling: project
samplerate differs from media samplerate.
It is somehow related to indexfile. May be rebuilding index helps. I
shall look at it.

Einar

___
Cinelerra mailing list
Cinelerra@skolelinux.no
https://init.linpro.no/mailman/skolelinux.no/listinfo/cinelerra


Re: [CinCV] Re: SOWT Audio Patch - Works With Canon 7D Files

2010-06-28 Thread Mark Goldberg
On Mon, Jun 28, 2010 at 2:25 PM, Einar Rünkaru eina...@smail.ee wrote:
 On Mon, Jun 28, 2010 at 8:56 PM, Mark Goldberg marklgoldb...@gmail.com 
 wrote:
 On Mon, Jun 28, 2010 at 8:04 AM, Mark Goldberg marklgoldb...@gmail.com 
 wrote:
 Here is a quick and dirty patch to add SOWT audio. It applies to git
 as of 27 Jun 2010.
 It adds sowt.c and sowt.h, slightly modified from twos.c and twos.h,
 changes a few
 other files to include the new codec, and changes all Makefiles I could 
 find to
 hopefully include these changes no matter how it is built. It could be
 more efficient,
 and maybe some of the Makefiles are actually overwritten, but it works for 
 me.

 By the way, this works with files from my Canon 7D. I have not used it 
 enough to
 be sure there are no sound sync issues.

 Mark

 Patch applied. Thanks.

 By the way, sync issues may be related to resampling: project
 samplerate differs from media samplerate.
 It is somehow related to indexfile. May be rebuilding index helps. I
 shall look at it.

 Einar


Thanks, one small request:
Can you change the git title text to Add SOWT audio support
instead of Add SWOT audio support?

Is your einar project the most up to date one? The Get Cinelerra
page says to check out the j6t project, which is what I got and
patched.

I hope it is useful. I've had a difficult time finding any software that
could decently work with the 7D files, on Windows or Linux, free
or not.

I used a similar patch on the HV version and did not have any sound
sync issues. I have had lots if I had to split up and remux files, so maybe
this patch will help sound sync too as it reads them directly.

Mark

___
Cinelerra mailing list
Cinelerra@skolelinux.no
https://init.linpro.no/mailman/skolelinux.no/listinfo/cinelerra


[CinCV] SOWT Audio patch

2010-06-28 Thread d...@dafhobson.com

Thanks for the SOWT patch!
I have 10.04LTX Lynx Ubuntu.
I complied Cinelerra from source as per Raffaella's 'How To' a month ago.
This eve I tried 'git pull' in cinelerra-cv.(terminal) It told me I have 
the up to date version.


Can anybody tell me what I do with the SOWT patch kindly posted.?
Thanks
Daf

___
Cinelerra mailing list
Cinelerra@skolelinux.no
https://init.linpro.no/mailman/skolelinux.no/listinfo/cinelerra