[FFmpeg-devel] [PATCH] rematrix DPLII fix for channel downmixing. Surround now adds to front rather than taking away.

Peter Robertson Peter at CorrosiveTruths.org
Sat Mar 15 20:02:00 CET 2014


On 15/03/14 18:00, Michael Niedermayer wrote:
> On Sat, Mar 15, 2014 at 05:51:09PM +0100, Hendrik Leppkes wrote:
>> On Sat, Mar 15, 2014 at 4:46 PM, Peter Robertson
>> <Peter at corrosivetruths.org> wrote:
>>> This fixes a problem where trying to convert gameplay sound to Dolby Pro
>>> Logic II would result in a left channel that would be missing the sounds
>>> that were in center and back left at the same time. I also applied it to
>>> Dolby Pro Logic as it should work the same way. Sorry if I've done
>>> anything wrong, first patch. Fixes #3455
>>>
>> The encoding matrix for DPL/DPLII is defined by Dolby, and only sounds
>> good if you use a DPL compatible decoder to reconstruct the original
>> signal.
>> Its not necessarily supposed to be played as stereo through stereo speakers.
>>
>> All Information I could find about DPL encoding suggests that the
>> implementation is correct as it is today. Left channel subtracts both
>> surrounds, and right channel adds them.
> The EAC-3 specs suggested downmix also seems to match this
>
> [...]
>
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Could you point me at them? Might help me figure out what's going wrong.

Like I think the amounts are wrong.

                matrix[FRONT_LEFT ][BACK_LEFT ] -= s->slev * SQRT3_2;
                matrix[FRONT_LEFT ][BACK_RIGHT] -= s->slev * M_SQRT1_2;
                matrix[FRONT_RIGHT][BACK_LEFT ] += s->slev * M_SQRT1_2;
                matrix[FRONT_RIGHT][BACK_RIGHT] += s->slev * SQRT3_2;

Doesn't seem right; I thought it was sqrt of either 6/25 or 19/25 rather
than 1/2 3/2.



More information about the ffmpeg-devel mailing list