<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "http://bugs.gentoo.org/bugzilla.dtd">

<bugzilla version="2.22.7"
          urlbase="http://bugs.gentoo.org/"
          maintainer="bugzilla@gentoo.org"
>

    <bug>
          <bug_id>146307</bug_id>
          
          <creation_ts>2006-09-04 13:19 0000</creation_ts>
          <short_desc>media-video/transcode-1.0.2-r2 export to dvraw messes up audio</short_desc>
          <delta_ts>2007-02-01 03:38:44 0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>Gentoo Linux</product>
          <component>Ebuilds</component>
          <version>unspecified</version>
          <rep_platform>All</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>craig.lawson@alum.mit.edu</reporter>
          <assigned_to>media-video@gentoo.org</assigned_to>
          

      

      
          <long_desc isprivate="0">
            <who>craig.lawson@alum.mit.edu</who>
            <bug_when>2006-09-04 13:19:51 0000</bug_when>
            <thetext>I submitted this to transcode-devel. Didn&apos;t get a reply, and I don&apos;t want it to get lost.


When exporting to rawdv format, encoder-&gt;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) &amp; 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</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>craig.lawson@alum.mit.edu</who>
            <bug_when>2006-09-04 13:21:03 0000</bug_when>
            <thetext>Created an attachment (id=96005)
transcode 1.0.2 patch to fix dvraw audio export

</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>flameeyes@gentoo.org</who>
            <bug_when>2006-10-02 00:40:39 0000</bug_when>
            <thetext>Can you please submit this as an unified diff?
</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>craig.lawson@alum.mit.edu</who>
            <bug_when>2006-10-04 22:31:15 0000</bug_when>
            <thetext>Created an attachment (id=98812)
transcode 1.0.2 patch to fix dvraw audio export (unified diff)

Patch resubmitted in unified diff format.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>beandog@gentoo.org</who>
            <bug_when>2007-02-01 03:38:44 0000</bug_when>
            <thetext>Fixed in -r4 in CVS, thanks Craig</thetext>
          </long_desc>
      
          <attachment
              isobsolete="1"
              ispatch="1"
              isprivate="0"
          >
            <attachid>96005</attachid>
            <date>2006-09-04 13:21 0000</date>
            <desc>transcode 1.0.2 patch to fix dvraw audio export</desc>
            <filename>transcode-1.0.2-dvraw.patch</filename>
            <type>text/plain</type>
            <data encoding="base64">KioqIHRyYW5zY29kZS0xLjAuMi5vbGQvZXhwb3J0L2V4cG9ydF9kdnJhdy5jCTIwMDUtMDctMDQg
MDA6MDk6MzIuMDAwMDAwMDAwIC0wNzAwCi0tLSB0cmFuc2NvZGUtMS4wLjIvZXhwb3J0L2V4cG9y
dF9kdnJhdy5jCTIwMDYtMDgtMzEgMDA6MDI6MzEuMDAwMDAwMDAwIC0wNzAwCioqKioqKioqKioq
KioqKgoqKiogMzIzLDMyOSAqKioqCiAgICAgICAgCiAgICAgIH0vL25vIHBhc3MtdGhyb3VnaAog
ICNpZmRlZiBMSUJEVl8wOTkKISAgICAgICBlbmNvZGVyLT5zYW1wbGVzX3RoaXNfZnJhbWU9cGFy
YW0tPnNpemU7CiAgI2VuZGlmCiAgICAgICAgZHZfZW5jb2RlX21ldGFkYXRhKHRhcmdldCwgZW5j
b2Rlci0+aXNQQUwsIGVuY29kZXItPmlzMTZ4OSwgJm5vdywgMCk7CiAgICAgICAgZHZfZW5jb2Rl
X3RpbWVjb2RlKHRhcmdldCwgZW5jb2Rlci0+aXNQQUwsIDApOwotLS0gMzIzLDMyOSAtLS0tCiAg
ICAgICAgCiAgICAgIH0vL25vIHBhc3MtdGhyb3VnaAogICNpZmRlZiBMSUJEVl8wOTkKISAgICAg
ICBlbmNvZGVyLT5zYW1wbGVzX3RoaXNfZnJhbWU9cGFyYW0tPnNpemUvNDsKICAjZW5kaWYKICAg
ICAgICBkdl9lbmNvZGVfbWV0YWRhdGEodGFyZ2V0LCBlbmNvZGVyLT5pc1BBTCwgZW5jb2Rlci0+
aXMxNng5LCAmbm93LCAwKTsKICAgICAgICBkdl9lbmNvZGVfdGltZWNvZGUodGFyZ2V0LCBlbmNv
ZGVyLT5pc1BBTCwgMCk7Cg==
</data>        

          </attachment>
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>98812</attachid>
            <date>2006-10-04 22:31 0000</date>
            <desc>transcode 1.0.2 patch to fix dvraw audio export (unified diff)</desc>
            <filename>transcode-1.0.2-dvraw.patch</filename>
            <type>text/plain</type>
            <data encoding="base64">LS0tIHRyYW5zY29kZS0xLjAuMi5vcmlnL2V4cG9ydC9leHBvcnRfZHZyYXcuYwkyMDA1LTA3LTA0
IDAwOjA5OjMyLjAwMDAwMDAwMCAtMDcwMAorKysgdHJhbnNjb2RlLTEuMC4yL2V4cG9ydC9leHBv
cnRfZHZyYXcuYwkyMDA2LTEwLTA0IDIyOjEzOjU3LjAwMDAwMDAwMCAtMDcwMApAQCAtMzIzLDcg
KzMyMyw3IEBACiAgICAgICAKICAgICB9Ly9ubyBwYXNzLXRocm91Z2gKICNpZmRlZiBMSUJEVl8w
OTkKLSAgICAgIGVuY29kZXItPnNhbXBsZXNfdGhpc19mcmFtZT1wYXJhbS0+c2l6ZTsKKyAgICAg
IGVuY29kZXItPnNhbXBsZXNfdGhpc19mcmFtZT1wYXJhbS0+c2l6ZS80OwogI2VuZGlmCiAgICAg
ICBkdl9lbmNvZGVfbWV0YWRhdGEodGFyZ2V0LCBlbmNvZGVyLT5pc1BBTCwgZW5jb2Rlci0+aXMx
Nng5LCAmbm93LCAwKTsKICAgICAgIGR2X2VuY29kZV90aW1lY29kZSh0YXJnZXQsIGVuY29kZXIt
PmlzUEFMLCAwKTsK
</data>        

          </attachment>
    </bug>

</bugzilla>