Re: [FFmpeg-devel] [PATCH] Dolby Digital dynamic range compression (drc_scale) is now 0 by default

2015-04-14 Thread Michael Niedermayer
On Tue, Apr 14, 2015 at 03:01:00PM +0200, Wiebe Cazemier wrote:
 - Original Message -
  From: Wiebe Cazemier wi...@halfgaar.net
  To: Michael Niedermayer michae...@gmx.at
  Cc: FFmpeg development discussions and patches ffmpeg-devel@ffmpeg.org, 
  madshi mad...@gmail.com
  Sent: Monday, 6 April, 2015 7:25:16 AM
  Subject: Re: [FFmpeg-devel] [PATCH] Dolby Digital dynamic range compression 
  (drc_scale) is now 0 by default
  
   
   has someone contacted justin ?
   
   
  
  I did now.
  
  Sorry, I was still kind of spacing out on what to do next...
 
 As of yet no response. Do we take the other decision making route?

If you belive that a listed maintainer in the MAINTAINERs file no
longer wants to / no longer is maintaining the code he is listed for
in FFmpeg. Then yes please post a patch that corrects the MAINTAINERs
file with a CC to anyone whos status is changed and explanation in
the commit message

[...]
-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

During times of universal deceit, telling the truth becomes a
revolutionary act. -- George Orwell


signature.asc
Description: Digital signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] Dolby Digital dynamic range compression (drc_scale) is now 0 by default

2015-04-14 Thread Kieran Kunhya
On 14 April 2015 at 14:01, Wiebe Cazemier wi...@halfgaar.net wrote:
 - Original Message -
 From: Wiebe Cazemier wi...@halfgaar.net
 To: Michael Niedermayer michae...@gmx.at
 Cc: FFmpeg development discussions and patches ffmpeg-devel@ffmpeg.org, 
 madshi mad...@gmail.com
 Sent: Monday, 6 April, 2015 7:25:16 AM
 Subject: Re: [FFmpeg-devel] [PATCH] Dolby Digital dynamic range compression 
 (drc_scale) is now 0 by default

 
  has someone contacted justin ?
 
 

 I did now.

 Sorry, I was still kind of spacing out on what to do next...

 As of yet no response. Do we take the other decision making route?

No because votes in FFmpeg are historically a bad idea.

Kieran
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] Dolby Digital dynamic range compression (drc_scale) is now 0 by default

2015-04-14 Thread Wiebe Cazemier
- Original Message -
 From: Wiebe Cazemier wi...@halfgaar.net
 To: Michael Niedermayer michae...@gmx.at
 Cc: FFmpeg development discussions and patches ffmpeg-devel@ffmpeg.org, 
 madshi mad...@gmail.com
 Sent: Monday, 6 April, 2015 7:25:16 AM
 Subject: Re: [FFmpeg-devel] [PATCH] Dolby Digital dynamic range compression 
 (drc_scale) is now 0 by default
 
  
  has someone contacted justin ?
  
  
 
 I did now.
 
 Sorry, I was still kind of spacing out on what to do next...

As of yet no response. Do we take the other decision making route?
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] Dolby Digital dynamic range compression (drc_scale) is now 0 by default

2015-03-30 Thread Wiebe Cazemier
- Original Message -
 From: Kieran Kunhya kier...@obe.tv
 To: Wiebe Cazemier wi...@halfgaar.net
 Sent: Monday, 30 March, 2015 3:43:42 AM
 Subject: Re: [FFmpeg-devel] [PATCH] Dolby Digital dynamic range compression 
 (drc_scale) is now 0 by default
 
  It's in the spec as an *option*, to cater to those who have bad sound
  systems. If ffmpeg already applies DRC, and software using ffmpeg doesn't
  set 'drc_scale', it's no longer an option, it becomes mandatory. That's
  the issue.
 
 It is not an option and I quote ETSI 102 366:
 
 Therefore, the AC-3 decoder shall, by default, implement the
 compression characteristic indicated by the dynrng values in the data
 stream. AC-3 decoders may optionally allow listener control over the
 use of the dynrng values, so that the listener may select full or
 partial dynamic range reproduction.
 
 If an application doesn't want to expose drc settings then that's
 their problem. FFmpeg does the right thing and lets you turn it off if
 you wish.
 
 Kieran
 

(can you reply-all, so that your reply goes to the list?)

If you say it's not an option, that's putting it harder than the spec say. 
Dolby engineers never meant AC3 audio to be played compressed everywhere, and 
that's what we're seeing happening. 

Also, I feel that the word 'decoder' in your quote is written in a time where 
it had a different context and that quote has to be interpreted that way. Open 
source software libraries weren't available at that point, and a decoder was a 
piece of hardware, or a chip embedded in something. Sure, you don't have to 
allow the user to control it when you embed an AC3 decoder in your budget TV so 
ATSC demanding that you do would be silly here, but all high end receivers I 
know, do allow you to set the option. Now that we do have a library that people 
can use, an honest mistake to forget to implement it turns into something that 
they probably didn't intend. As proven by the Kodi developer denying that they 
applied DRC.

I think we have to consider user experience, and it's great when they can 
control it, but we're getting the situation where everybody gets it (yet only 
for AC3), whether they want to or not. That automatically crosses off Kodi and 
VLC (for example) for use in high quality sound reproduction. And the bad thing 
is, they may not even know it...
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] Dolby Digital dynamic range compression (drc_scale) is now 0 by default

2015-03-30 Thread Wiebe Cazemier
- Original Message -
 From: Kieran Kunhya kier...@obe.tv
 To: Wiebe Cazemier wi...@halfgaar.net
 Sent: Monday, 30 March, 2015 10:47:49 AM
 Subject: Re: [FFmpeg-devel] [PATCH] Dolby Digital dynamic range compression 
 (drc_scale) is now 0 by default
 
  It is not an option and I quote ETSI 102 366:
 
  Therefore, the AC-3 decoder shall, by default, implement the
  compression characteristic indicated by the dynrng values in the data
  stream. AC-3 decoders may optionally allow listener control over the
  use of the dynrng values, so that the listener may select full or
  partial dynamic range reproduction.
 
  If an application doesn't want to expose drc settings then that's
  their problem. FFmpeg does the right thing and lets you turn it off if
  you wish.
 
  Kieran
 
 
  (can you reply-all, so that your reply goes to the list?)
 
  If you say it's not an option, that's putting it harder than the spec
  say. Dolby engineers never meant AC3 audio to be played compressed
  everywhere, and that's what we're seeing happening.
 
  Also, I feel that the word 'decoder' in your quote is written in a time
  where it had a different context and that quote has to be interpreted that
  way. Open source software libraries weren't available at that point, and a
  decoder was a piece of hardware, or a chip embedded in something. Sure,
  you don't have to allow the user to control it when you embed an AC3
  decoder in your budget TV so ATSC demanding that you do would be silly
  here, but all high end receivers I know, do allow you to set the option.
  Now that we do have a library that people can use, an honest mistake to
  forget to implement it turns into something that they probably didn't
  intend. As proven by the Kodi developer denying that they applied DRC.
 
  I think we have to consider user experience, and it's great when they can
  control it, but we're getting the situation where everybody gets it (yet
  only for AC3), whether they want to or not. That automatically crosses off
  Kodi and VLC (for example) for use in high quality sound reproduction. And
  the bad thing is, they may not even know it...
 
 It's the complete opposite - most people are watching on laptop
 speakers without the dynamic range you have in your setup. FFmpeg lets
 you turn it off and it's the fault of the player for not exposing
 that.

What about those people playing AAC, which is the majority currently.

In any case, I made my point. How do we proceed? I have no idea who is in 
charge of what, and how the decision making process goes in ffmpeg development.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] Dolby Digital dynamic range compression (drc_scale) is now 0 by default

2015-03-30 Thread madshi
 From: Kieran Kunhya kier...@obe.tv
 To: Wiebe Cazemier wi...@halfgaar.net
 Sent: Monday, 30 March, 2015 3:43:42 AM
 Subject: Re: [FFmpeg-devel] [PATCH] Dolby Digital dynamic range
compression (drc_scale) is now 0 by default
 It is not an option and I quote ETSI 102 366:
 Therefore, the AC-3 decoder shall, by default, implement the
 compression characteristic indicated by the dynrng values in the data
 stream. AC-3 decoders may optionally allow listener control over the
 use of the dynrng values, so that the listener may select full or
 partial dynamic range reproduction.

Let me ask you: The DVD and Blu-Ray specs require that a DVD/Blu-Ray player
not allow the user to skip forced video parts (like anti-piracy clips or
sometimes even trailers). So since the spec says so, we should make sure
that all open source media players also follow the spec to the letter and
not allow users to skip forced video clips? Is that truly your opinion? And
if the spec asks you to shoot yourself in the foot, you do that, too?

How about using some common sense: What should have priority? The best user
experience? Or following some stupid instructions in a spec? As I said
before, the only situation where the default value matters (and we're only
asking to change the default value, not to remove the ability to apply
dynamic range compression altogether) is when the software using ffmpeg is
not aware that there is such a thing as the drc_scale option. In this
situation of course you can blame the software. But the end result is that
the end user experience will suffer, because ffmpeg will output subpar
quality in that situation. What good is that for anybody?

What do you think would happen if we started a vote like the following:

1) Should ffmpeg output reduced (range compressed) audio quality by
default, because the spec says so?
2) Should ffmpeg output full (range) quality by default, unless the
software asks ffmpeg to do otherwise?

How many users or devs would vote for 1) or 2)?

And you didn't answer the question I asked before: Why would only AC3 have
range compression on by default? Why not any other codec? What is the sense
in that?? Are you saying that laptop speakers are not able to play full
range AC3 tracks, but that they *are* able to play full range TrueHD
tracks? If you truly believe that range compression should be on by
default, then you should be consistent about it, and ask for range
compression to be enabled by default for all other audio decoders, too.
We're intelligent beings, we don't have to blindly follow everything some
stupid spec says.

Best regards, Mathias.


2015-03-30 9:38 GMT+02:00 Wiebe Cazemier wi...@halfgaar.net:

 - Original Message -
  From: Kieran Kunhya kier...@obe.tv
  To: Wiebe Cazemier wi...@halfgaar.net
  Sent: Monday, 30 March, 2015 3:43:42 AM
  Subject: Re: [FFmpeg-devel] [PATCH] Dolby Digital dynamic range
 compression (drc_scale) is now 0 by default
 
   It's in the spec as an *option*, to cater to those who have bad sound
   systems. If ffmpeg already applies DRC, and software using ffmpeg
 doesn't
   set 'drc_scale', it's no longer an option, it becomes mandatory. That's
   the issue.
 
  It is not an option and I quote ETSI 102 366:
 
  Therefore, the AC-3 decoder shall, by default, implement the
  compression characteristic indicated by the dynrng values in the data
  stream. AC-3 decoders may optionally allow listener control over the
  use of the dynrng values, so that the listener may select full or
  partial dynamic range reproduction.
 
  If an application doesn't want to expose drc settings then that's
  their problem. FFmpeg does the right thing and lets you turn it off if
  you wish.
 
  Kieran
 

 (can you reply-all, so that your reply goes to the list?)

 If you say it's not an option, that's putting it harder than the spec
 say. Dolby engineers never meant AC3 audio to be played compressed
 everywhere, and that's what we're seeing happening.

 Also, I feel that the word 'decoder' in your quote is written in a time
 where it had a different context and that quote has to be interpreted that
 way. Open source software libraries weren't available at that point, and a
 decoder was a piece of hardware, or a chip embedded in something. Sure, you
 don't have to allow the user to control it when you embed an AC3 decoder in
 your budget TV so ATSC demanding that you do would be silly here, but all
 high end receivers I know, do allow you to set the option. Now that we do
 have a library that people can use, an honest mistake to forget to
 implement it turns into something that they probably didn't intend. As
 proven by the Kodi developer denying that they applied DRC.

 I think we have to consider user experience, and it's great when they can
 control it, but we're getting the situation where everybody gets it (yet
 only for AC3), whether they want to or not. That automatically crosses off
 Kodi and VLC (for example) for use in high quality sound reproduction

Re: [FFmpeg-devel] [PATCH] Dolby Digital dynamic range compression (drc_scale) is now 0 by default

2015-03-30 Thread Kieran Kunhya
 And you didn't answer the question I asked before: Why would only AC3 have
 range compression on by default? Why not any other codec? What is the sense
 in that?? Are you saying that laptop speakers are not able to play full
 range AC3 tracks, but that they *are* able to play full range TrueHD tracks?
 If you truly believe that range compression should be on by default, then
 you should be consistent about it, and ask for range compression to be
 enabled by default for all other audio decoders, too. We're intelligent
 beings, we don't have to blindly follow everything some stupid spec says.

We should have DRC enabled in AAC and other codecs if it's considered
a normative part of the spec.

Kieran
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] Dolby Digital dynamic range compression (drc_scale) is now 0 by default

2015-03-30 Thread Michael Niedermayer
On Mon, Mar 30, 2015 at 11:28:29AM +0100, Kieran Kunhya wrote:
 On 30 March 2015 at 11:24, madshi mad...@gmail.com wrote:
  2015-03-30 12:10 GMT+02:00 Kieran Kunhya kier...@obe.tv:
  We should have DRC enabled in AAC and other codecs
  if it's considered a normative part of the spec.
 
  So basically you do what the spec says regardless of whether it makes sense
  or not?
 
 Yes,

for FFmpeg, this is not true.
ISO mpeg4 specified one way to do QPEL, but the reference
implementation did it the other way. Our decoder tries hard to figure
out which of the 2 was used on the encoder side and matches it when
decoding.
IIRC the mpeg4 spec was changed to match the implementation at some
point then as well

Some mpeg4 encoders do the edge handling for MC wrong, we detect them
and match it in the decoder. That way the user sees a nice video
instead of one with minor or not so minor artifacts. We clearly
violate a normative part of the spec by displaying these videos
without artifacts

we also detect some ancient buggy version of x264 and decode that
different from what the spec would require to match what the encoder
did,

the above examples are of course bug workarounds
but then there is no spec that says
output video with a modified gamma compared to the encoder input
 unless the user override that or does one ? 

[...]


 and we let power users change things from the API - I don't see
 why that's so hard.
 
 Kieran
 ___
 ffmpeg-devel mailing list
 ffmpeg-devel@ffmpeg.org
 http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 

-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Concerning the gods, I have no means of knowing whether they exist or not
or of what sort they may be, because of the obscurity of the subject, and
the brevity of human life -- Protagoras


signature.asc
Description: Digital signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] Dolby Digital dynamic range compression (drc_scale) is now 0 by default

2015-03-30 Thread Michael Niedermayer
On Sun, Mar 29, 2015 at 07:01:08PM +0200, Wiebe Cazemier wrote:
 Signed-off-by: Wiebe Cazemier wi...@halfgaar.net
 ---
  Changelog | 1 +
  doc/decoders.texi | 2 +-
  libavcodec/ac3dec_fixed.c | 2 +-
  libavcodec/ac3dec_float.c | 2 +-
  libavutil/version.h   | 2 +-
  5 files changed, 5 insertions(+), 4 deletions(-)
 
 diff --git a/Changelog b/Changelog
 index 109a1b8..0bd9875 100644
 --- a/Changelog
 +++ b/Changelog
 @@ -11,6 +11,7 @@ version next:
  - nvenc H265 encoder
  - Detelecine filter
  - Intel QSV-accelerated H.264 encoding
 +- Dolby Digital dynamic range compression disabled by default
  
  
  version 2.6:
 diff --git a/doc/decoders.texi b/doc/decoders.texi
 index 01fca9f..ba78a31 100644
 --- a/doc/decoders.texi
 +++ b/doc/decoders.texi
 @@ -72,7 +72,7 @@ from the AC-3 stream. This factor is applied exponentially.
  There are 3 notable scale factor ranges:
  @table @option
  @item drc_scale == 0
 -DRC disabled. Produces full range audio.
 +DRC disabled. Produces full range audio. Default value.
  @item 0  drc_scale = 1
  DRC enabled.  Applies a fraction of the stream DRC value.
  Audio reproduction is between full range and full compression.
 diff --git a/libavcodec/ac3dec_fixed.c b/libavcodec/ac3dec_fixed.c
 index b4beee6..e3c8ce8 100644
 --- a/libavcodec/ac3dec_fixed.c
 +++ b/libavcodec/ac3dec_fixed.c
 @@ -168,7 +168,7 @@ static void ac3_downmix_c_fixed16(int16_t **samples, 
 int16_t (*matrix)[2],
  #include ac3dec.c
  
  static const AVOption options[] = {
 -{ drc_scale, percentage of dynamic range compression to apply, 
 OFFSET(drc_scale), AV_OPT_TYPE_FLOAT, {.dbl = 1.0}, 0.0, 6.0, PAR },
 +{ drc_scale, percentage of dynamic range compression to apply, 
 OFFSET(drc_scale), AV_OPT_TYPE_FLOAT, {.dbl = 0.0}, 0.0, 6.0, PAR },
  { heavy_compr, heavy dynamic range compression enabled, 
 OFFSET(heavy_compression), AV_OPT_TYPE_INT, {.i64 = 0 }, 0, 1, PAR },
  { NULL},

it might make sense to add a -1 value to drc_scale with the
meaining do what the spec says
this way if 2 decoders in the future support the drc_scale option
it would be possible for a user to set them to use the defaults
from their specs even if these defaults differ

but this should be a seperate patch of course, so arguable that isnt
a comment about this patch

[...]
-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Republics decline into democracies and democracies degenerate into
despotisms. -- Aristotle


signature.asc
Description: Digital signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] Dolby Digital dynamic range compression (drc_scale) is now 0 by default

2015-03-30 Thread Andy Furniss

Michael Niedermayer wrote:

Apologies for the slightly out of place response. I've only just
subscribed after reading the rest of this thread via the archive.

I'm with KieranK the exception should be full range for those that can
stand it.

Maybe I am not best placed to comment as I mixdown to 2ch, but while
people here argue that full range is better quality, I would agree a
bit, but unfortunately many movies are mixed in such a way that in order
to hear the dialogue the loud bits become way way too loud for comfort.

The argument that DTS/AAC/TrueHD decs don't do it IMHO is invalid as in
the latter two cases at least this is only due to incomplete (and from
my pov sometimes therefore unusable) implementations.


___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] Dolby Digital dynamic range compression (drc_scale) is now 0 by default

2015-03-30 Thread Michael Niedermayer
On Mon, Mar 30, 2015 at 11:37:10AM +0200, Wiebe Cazemier wrote:
 - Original Message -
  From: Kieran Kunhya kier...@obe.tv
  To: Wiebe Cazemier wi...@halfgaar.net
  Sent: Monday, 30 March, 2015 10:47:49 AM
  Subject: Re: [FFmpeg-devel] [PATCH] Dolby Digital dynamic range compression 
  (drc_scale) is now 0 by default
  
   It is not an option and I quote ETSI 102 366:
  
   Therefore, the AC-3 decoder shall, by default, implement the
   compression characteristic indicated by the dynrng values in the data
   stream. AC-3 decoders may optionally allow listener control over the
   use of the dynrng values, so that the listener may select full or
   partial dynamic range reproduction.
  
   If an application doesn't want to expose drc settings then that's
   their problem. FFmpeg does the right thing and lets you turn it off if
   you wish.
  
   Kieran
  
  
   (can you reply-all, so that your reply goes to the list?)
  
   If you say it's not an option, that's putting it harder than the spec
   say. Dolby engineers never meant AC3 audio to be played compressed
   everywhere, and that's what we're seeing happening.
  
   Also, I feel that the word 'decoder' in your quote is written in a time
   where it had a different context and that quote has to be interpreted that
   way. Open source software libraries weren't available at that point, and a
   decoder was a piece of hardware, or a chip embedded in something. Sure,
   you don't have to allow the user to control it when you embed an AC3
   decoder in your budget TV so ATSC demanding that you do would be silly
   here, but all high end receivers I know, do allow you to set the option.
   Now that we do have a library that people can use, an honest mistake to
   forget to implement it turns into something that they probably didn't
   intend. As proven by the Kodi developer denying that they applied DRC.
  
   I think we have to consider user experience, and it's great when they can
   control it, but we're getting the situation where everybody gets it (yet
   only for AC3), whether they want to or not. That automatically crosses off
   Kodi and VLC (for example) for use in high quality sound reproduction. And
   the bad thing is, they may not even know it...
  
  It's the complete opposite - most people are watching on laptop
  speakers without the dynamic range you have in your setup. FFmpeg lets
  you turn it off and it's the fault of the player for not exposing
  that.
 
 What about those people playing AAC, which is the majority currently.
 
 In any case, I made my point. How do we proceed? I have no idea who is in 
 charge of what, and how the decision making process goes in ffmpeg 
 development.

Generally decissions are made based on consensus or absence of
objections. If that doesnt work there should be a maintainer for the
specific part of the code. Iam not sure AC3 in FFmpeg does have a
maintainer, justin is listed in MAINTAINERs but iam not sure if justin
still (wants) to maintain ac3 in FFmpeg.
so considering that kierank and andy seem to object to this patch
someone should
1. ask justin if he is still MAINTAINING AC3 in FFmpeg
2a. if yes, ask him what to do
2b. if no send a patch to update the MAINTAINERs file and if noone
else wants to maintain AC3 the decission would proably fall onto
me, unless theres something resembling a consensus by then

also independant of this, its probably a good idea if we make our
users more aware of the drc_scale option. A news entry and or some
mention in the next release notes is probably a good idea
patches in that direction are welcome

Thanks

[...]

-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Concerning the gods, I have no means of knowing whether they exist or not
or of what sort they may be, because of the obscurity of the subject, and
the brevity of human life -- Protagoras


signature.asc
Description: Digital signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] Dolby Digital dynamic range compression (drc_scale) is now 0 by default

2015-03-30 Thread madshi
2015-03-30 12:10 GMT+02:00 Kieran Kunhya kier...@obe.tv:
 We should have DRC enabled in AAC and other codecs
 if it's considered a normative part of the spec.

So basically you do what the spec says regardless of whether it makes sense
or not?

Best regards, Mathias.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] Dolby Digital dynamic range compression (drc_scale) is now 0 by default

2015-03-30 Thread Kieran Kunhya
On 30 March 2015 at 11:24, madshi mad...@gmail.com wrote:
 2015-03-30 12:10 GMT+02:00 Kieran Kunhya kier...@obe.tv:
 We should have DRC enabled in AAC and other codecs
 if it's considered a normative part of the spec.

 So basically you do what the spec says regardless of whether it makes sense
 or not?

Yes, and we let power users change things from the API - I don't see
why that's so hard.

Kieran
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] Dolby Digital dynamic range compression (drc_scale) is now 0 by default

2015-03-30 Thread madshi
2015-03-30 12:28 GMT+02:00 Kieran Kunhya kier...@obe.tv:
 Yes, and we let power users change things from the API -
 I don't see why that's so hard.

It's not hard. The only problem is that there are many many applications
out there using ffmpeg, and many (most?) of them are not aware of
drc_scale. So they decode AC3 with subpar quality. And there's nothing the
*end user* can do about it. Most end users are not aware of the problem, so
they get subpar quality without even knowing it. Sure, you can blame the
applications for not setting drc_scale. I blame ffmpeg instead, for
outputting subpar quality *by default*.

Best regards, Mathias.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] Dolby Digital dynamic range compression (drc_scale) is now 0 by default

2015-03-30 Thread Nicolas George
Le decadi 10 germinal, an CCXXIII, madshi a écrit :
 What do you think would happen if we started a vote like the following:
 
 1) Should ffmpeg output reduced (range compressed) audio quality by
 default, because the spec says so?
 2) Should ffmpeg output full (range) quality by default, unless the
 software asks ffmpeg to do otherwise?
 
 How many users or devs would vote for 1) or 2)?

Kieran will answer you the spec is right even if it tells you that 2+2=5.
;-)

My answer is: profile, don't speculate.

Q: the user has quality audio equipment that can play full range
K: the user knows that there is an option
D: quantified damage to the sound (subjective impression translated to an
   approximate value)
d1: quantified damage of playing compressed range on quality equipment
d2: quantified damage of playing full range on poor equipment
d3: quantified damage of having to set an option

E(D) = P(K)×d3 + P(¬K∧Q)×d1 if compression is the default
E(D) = P(K)×d3 + P(¬K∧¬Q)×d2 is compression is disabled by default.

So basically, you need to provide convincing estimates for the ratio between
P(¬K∧Q) and P(¬K∧¬Q) and the one between d1 and d2.

Regards,

-- 
  Nicolas George


signature.asc
Description: Digital signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] Dolby Digital dynamic range compression (drc_scale) is now 0 by default

2015-03-29 Thread madshi
2015-03-29 20:06 GMT+02:00 Kieran Kunhya kier...@obe.tv:
  On 29 March 2015 at 18:01, Wiebe Cazemier wi...@halfgaar.net wrote:
  Signed-off-by: Wiebe Cazemier wi...@halfgaar.net
 Why can't you just set this in your application?
 Not everyone is listening on a full setup where they can hear the dynamic
range.

There are 2 possible situations:

1) Either the software using ffmpeg is aware of the drc_scale option. If
that is the case, the software is likely to set the option to the desired
value. So in this case it doesn't matter which value we set the default to.

2) Or the software using ffmpeg is not aware of the drc_scale option. In
this case currently ffmpeg defaults to applying range compression, which
severely damages audio quality. Which is a very bad idea.

So basically this patch tells ffmpeg to produce full decoding quality,
unless it's asked to do otherwise. Which is the only sane setup, IMHO.

If you think that range compression should be turned on by default, then we
should patch all other decoders to also do that by default. Why only AC3?
Makes no sense.

Best regards, Mathias.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] Dolby Digital dynamic range compression (drc_scale) is now 0 by default

2015-03-29 Thread Kieran Kunhya
On 29 March 2015 at 18:01, Wiebe Cazemier wi...@halfgaar.net wrote:
 Signed-off-by: Wiebe Cazemier wi...@halfgaar.net

Why can't you just set this in your application?
Not everyone is listening on a full setup where they can hear the dynamic range.

Kieran
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] Dolby Digital dynamic range compression (drc_scale) is now 0 by default

2015-03-29 Thread Wiebe Cazemier
- Original Message -
 From: Kieran Kunhya kier...@obe.tv
 To: Wiebe Cazemier wi...@halfgaar.net
 Cc: Kieran Kunhya kier...@obe.tv
 Sent: Sunday, 29 March, 2015 10:03:05 PM
 Subject: Re: [FFmpeg-devel] [PATCH] Dolby Digital dynamic range compression 
 (drc_scale) is now 0 by default
 
  There was another thread about it (discussed with Michael Niedermayer,
  among others). In short, developers don't seem to know about or don't
  implement the feature. Kodi developers denied that it applied DRC on AC3,
  not knowing that ffmpeg did it. This meant that DRC couldn't be turned
  off. VLC also lacks the option, but does apply it.
 
  If applications want DRC, they should set the drc_scale option. Having
  ffmpeg do it creates mystery behavior.
 
 DRC is in the spec, if you want to violate the spec, then turn it off
 yourself. 

How?

It's in the spec as an *option*, to cater to those who have bad sound systems. 
If ffmpeg already applies DRC, and software using ffmpeg doesn't set 
'drc_scale', it's no longer an option, it becomes mandatory. That's the issue. 

Madshi's explanation is spot on.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel