IP Library Granted Patent US 9,491,538
Granted Patent B2
US 9,491,538 · App. 13/848,535 · Granted Nov 8, 2016

Adaptive gain control for digital audio samples in a media stream

View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 9,491,538
App. No.
13/848,535
Granted
Nov 8, 2016
Kind
B2
Abstract

An adaptive gain control system and related operating method for digital audio samples is provided. The method is suitable for use with a digital media encoding system that transmits encoded media streams to a remotely-located presentation device such as a media player. The method begins by initializing the processing of a media stream. Then, the method adjusts the gain of a first set of digital audio samples in the media stream using a fast gain adaptation scheme, resulting in a first group of gain-adjusted digital audio samples having normalized volume during presentation. The method continues by adjusting the gain of a second set of digital audio samples in the media stream using a steady state gain adaptation scheme that is different than the fast gain adaptation scheme, resulting in a second group of gain-adjusted digital audio samples having normalized volume during presentation.

Claims (118)

1. A non-transitory and tangible computer-readable medium having instructions operable to cause a digital media processing device to perform operations for a media stream, comprising:

calculating, by the digital media processing device, a loudness estimate for a current block of digital audio samples in the media stream, the loudness estimate calculated as a sum of magnitudes of the digital audio samples contained in the current block;

calculating, by the digital media processing device, a reference gain value for the current block of digital audio samples, the reference gain value being equal to a constant reference loudness value divided by the loudness estimate;

calculating, by the digital media processing device, a maximum gain value for the current block of digital audio samples, based on a maximum absolute sample value in the current block of digital audio samples;

choosing, by the digital media processing device, an estimated gain value for the current block of digital audio samples, the estimated gain value being equal to either the reference gain value or the maximum gain value, whichever is less;

selecting, by the digital media processing device, either a first current gain value or a second current gain value for the current block of digital audio samples, whichever is less, the first current gain value comprising a weighted sum of the estimated gain value and a previous gain value applied to a previous block of digital audio samples in the media stream, and the second current gain value comprising the maximum gain value, to obtain a selected current gain value;

modifying, by the digital media processing device, the current block of digital audio samples by applying the selected current gain value to the digital audio samples in the current block of digital audio samples, resulting in gain-adjusted digital audio samples; and

transmitting, by the digital media processing device, the gain-adjusted digital audio samples to a remotely-located media player to generate sound based on the gain-adjusted digital audio samples.

2. The computer-readable medium of claim 1 , wherein the computer program product is operable to cause the digital media processing device to perform further operations, comprising:

comparing the loudness estimate to a silence threshold value; and

applying a multiplicative gain value of one to the current block of digital audio samples when the loudness estimate is less than the silence threshold value.

3. The computer-readable medium of claim 1 , wherein calculating the loudness estimate is performed in accordance with the expression

L

k

=

i

=

1

i

=

N

a

i

,

where L k is the loudness estimate, a i represents the digital audio samples, and the current block includes N digital audio samples.

4. The computer-readable medium of claim 3 , wherein calculating the reference gain value is performed in accordance with the expression

g

r

=

L

ref

L

k

,

where g r is the reference gain value, and L ref is the constant reference loudness value.

5. The computer-readable medium of claim 4 , wherein:

calculating the maximum gain value is performed in accordance with the expression

g

m

=

2

n

-

1

a

max

,

where g m is the maximum gain value, n is the number of bits per digital audio sample, and a max is the maximum absolute sample value in the current block of digital audio samples; and

choosing the estimated gain value is performed in accordance with the expression g e =min (g r , g m ), where g e is the estimated gain value.

6. The computer-readable medium of claim 5 , wherein the selecting is performed in accordance with the expression g k =min(w 1 g k-1 +w 2 g e , g m ), where g k is the selected current gain value, and w 1 and w 2 are weighting factors.

7. The computer-readable medium of claim 1 , wherein modifying the current block of digital audio samples is performed for a predetermined time period after initializing processing of the media stream.

8. The computer-readable medium of claim 1 , wherein modifying the current block of digital audio samples is performed for a predetermined number of blocks of the digital audio samples after initializing processing of the media stream.

9. The computer-readable medium of claim 1 , wherein:

one digital audio sample is represented by sixteen bits; and

one block of digital audio samples is represented by 1024 digital audio samples.

10. A method of performing operations on a media stream, the method comprising:

calculating, by a digital media processing device, a loudness estimate for a current block of digital audio samples in the media stream, the loudness estimate calculated as a sum of magnitudes of the digital audio samples contained in the current block;

calculating, by the digital media processing device, a reference gain value for the current block of digital audio samples, the reference gain value being equal to a constant reference loudness value divided by the loudness estimate;

calculating, by the digital media processing device, a maximum gain value for the current block of digital audio samples, based on a maximum absolute sample value in the current block of digital audio samples;

choosing, by the digital media processing device, an estimated gain value for the current block of digital audio samples, the estimated gain value being equal to either the reference gain value or the maximum gain value, whichever is less;

selecting, by the digital media processing device, either a first current gain value or a second current gain value for the current block of digital audio samples, whichever is less, the first current gain value comprising a weighted sum of the estimated gain value and a previous gain value applied to a previous block of digital audio samples in the media stream, and the second current gain value comprising the maximum gain value, to obtain a selected current gain value;

modifying, by the digital media processing device, the current block of digital audio samples by applying the selected current gain value to the digital audio samples in the current block of digital audio samples, resulting in gain-adjusted digital audio samples; and

transmitting, by the digital media processing device, the gain-adjusted digital audio samples to a remotely-located media player to generate sound based on the gain-adjusted digital audio samples.

11. The method of claim 10 , further comprising:

comparing the loudness estimate to a silence threshold value; and

applying a multiplicative gain value of one to the current block of digital audio samples when the loudness estimate is less than the silence threshold value.

12. The method of claim 10 , wherein calculating the loudness estimate is performed in accordance with the expression

L

k

=

i

=

1

i

=

N

a

i

,

where L k is the loudness estimate, a i represents the digital audio samples, and the current block includes N digital audio samples.

13. The method of claim 12 , wherein calculating the reference gain value is performed in accordance with the expression

g

r

=

L

ref

L

k

,

where g r is the reference gain value, and L ref is the constant reference loudness value.

14. The method of claim 13 , wherein:

calculating the maximum gain value is performed in accordance with the expression

g

m

=

2

n

-

1

a

max

,

where g m is the maximum gain value, n is the number of bits per digital audio sample, and a max is the maximum absolute sample value in the current block of digital audio samples; and

choosing the estimated gain value is performed in accordance with the expression g e =min (g r , g m ), where g e is the estimated gain value.

15. The method of claim 14 , wherein the selecting is performed in accordance with the expression g k =min (w 1 g k-1 +w 2 g e , g m ), where g k is the selected current gain value, and w 1 and w 2 are weighting factors.

16. The method of claim 10 , wherein modifying the current block of digital audio samples is performed for a predetermined time period after initializing processing of the media stream.

17. The method of claim 10 , wherein modifying the current block of digital audio samples is performed for a predetermined number of blocks of the digital audio samples after initializing processing of the media stream.

18. The method of claim 10 , wherein:

one digital audio sample is represented by sixteen bits; and

one block of digital audio samples is represented by 1024 digital audio samples.

Assignments (2)
CHANGE OF NAME Recorded Sep 1, 2022
From: SLING MEDIA PVT. LTD.
To: DISH NETWORK TECHNOLOGIES INDIA PRIVATE LIMITED
Reel/Frame 061365/0493 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Mar 21, 2013
From: NANDURY, VENKATA KISHORE
To: SLING MEDIA PVT LTD
Reel/Frame 030063/0946 →