Bug 146307 - media-video/transcode-1.0.2-r2 export to dvraw messes up audio
Bug#: 146307 Product:  Gentoo Linux Version: unspecified Platform: All
OS/Version: Linux Status: RESOLVED Severity: normal Priority: P2
Resolution: FIXED Assigned To: media-video@gentoo.org Reported By: craig.lawson@alum.mit.edu
Component: Ebuilds
URL: 
Summary: media-video/transcode-1.0.2-r2 export to dvraw messes up audio
Keywords:  
Status Whiteboard: 
Opened: 2006-09-04 13:19 0000
Description:   Opened: 2006-09-04 13:19 0000
I submitted this to transcode-devel. Didn't get a reply, and I don't want it to
get lost.


When exporting to rawdv format, encoder->samples_this_frame was set to the
number of audio bytes in the frame, not the number of samples. This causes
audio samples to be either dropped or added, and when samples are added, they
contain stack junk.

Example: the DV format encodes the number of audio samples as (nSamples - 1580)
& 0x3F. At 48KHz NTSC, a typical frame contains 1602 samples, and is encoded as
22. Transcode was incorrectly specifying 1602 * 4 = 6408 samples, which is
encoded as 28 -- adding 6 extra samples!
  The solution is to divide by 2 * size(int16_t) = 4 (because transcode always
passes 2 channels to dv_encode_full_audio).

Example command:
  transcode -i movie.avi -y dvraw -uyvy -o movie.dv

------- Comment #1 From Craig Lawson 2006-09-04 13:21:03 0000 -------
Created an attachment (id=96005) [details]
transcode 1.0.2 patch to fix dvraw audio export

------- Comment #2 From Diego E. 'Flameeyes' Pettenò 2006-10-02 00:40:39 0000 -------
Can you please submit this as an unified diff?

------- Comment #3 From Craig Lawson 2006-10-04 22:31:15 0000 -------
Created an attachment (id=98812) [details]
transcode 1.0.2 patch to fix dvraw audio export (unified diff)

Patch resubmitted in unified diff format.

------- Comment #4 From Steve Dibb 2007-02-01 03:38:44 0000 -------
Fixed in -r4 in CVS, thanks Craig