~ubuntu-branches/ubuntu/oneiric/faac/oneiric

« back to all changes in this revision

Viewing changes to debian/patches/01_clamp_scale_factor.dpatch

  • Committer: Bazaar Package Importer
  • Author(s): John Dong
  • Date: 2008-01-06 22:47:35 UTC
  • mfrom: (0.1.3 hoary) (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20080106224735-jhb3ptzjfm2j7n89
Tags: 1.26-0.1ubuntu1
* Sync from debian-multimedia
* Ubuntu Changes:
 - Maintainer Spec
 - Versioned mp4v2 dep

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#! /bin/sh /usr/share/dpatch/dpatch-run
 
2
## 01_clamp_scale_factor.dpatch by 
 
3
##
 
4
## All lines beginning with ## DP:' are a description of the patch.
 
5
## DP: Replace xterm by x-terminal-emulator.
 
6
 
 
7
@DPATCH@
 
8
 
 
9
--- faac-1.25.orig/libfaac/aacquant.c   2007-01-06 18:08:32.000000000 +0100
 
10
+++ faac-1.25/libfaac/aacquant.c        2007-01-18 18:19:59.000000000 +0100
 
11
@@ -142,6 +142,14 @@ static void BalanceEnergy(CoderInfo *cod
 
12
     shift -= 1000;
 
13
 
 
14
     shift += coderInfo->scale_factor[sb];
 
15
+    if (sb > 0)
 
16
+    {
 
17
+      int diff = shift - coderInfo->scale_factor[sb - 1];
 
18
+      if (diff < -59)
 
19
+       shift += -59 - diff;
 
20
+      else if (diff > 60)
 
21
+       shift += 60 - diff;
 
22
+    }
 
23
     coderInfo->scale_factor[sb] = shift;
 
24
   }
 
25
 }