diff mbox

[FFmpeg-devel] lavc/hevcdec: Silence warnings when decoding DolbyVision

Message ID CAB0OVGpYshgx+T0sLWTSbOMRMqVMuSrpzm4p-XZ17hiQqvD4mQ@mail.gmail.com
State New
Headers show

Commit Message

Carl Eugen Hoyos Oct. 22, 2017, 12:31 a.m. UTC
Hi!

Attached patch silences the many warnings shown when decoding streams
with DolbyVision content.

Please comment, Carl Eugen

Comments

James Almer Oct. 23, 2017, 3:22 a.m. UTC | #1
On 10/21/2017 9:31 PM, Carl Eugen Hoyos wrote:
> Hi!
> 
> Attached patch silences the many warnings shown when decoding streams
> with DolbyVision content.
> 
> Please comment, Carl Eugen
> 
> 
> 0001-lavc-hevcdec-Silence-warnings-when-decoding-DolbyVis.patch
> 
> 
> From d917eb3470b957fe17d8b708957567fdfa9dbdaa Mon Sep 17 00:00:00 2001
> From: Carl Eugen Hoyos <ceffmpeg@gmail.com>
> Date: Sun, 22 Oct 2017 02:17:27 +0200
> Subject: [PATCH] lavc/hevcdec: Silence warnings when decoding DolbyVision.
> 
> ---
>  libavcodec/hevcdec.c |    2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/libavcodec/hevcdec.c b/libavcodec/hevcdec.c
> index 2e4add2..d5ed9f5 100644
> --- a/libavcodec/hevcdec.c
> +++ b/libavcodec/hevcdec.c
> @@ -2933,6 +2933,8 @@ static int decode_nal_unit(HEVCContext *s, const H2645NAL *nal)
>          break;
>      case HEVC_NAL_AUD:
>      case HEVC_NAL_FD_NUT:
> +    case 62: // unspecified, used by DolbyVision
> +    case 63: // unspecified, used by DolbyVision

No, the log message should be set to verbose level instead, like
inff_hevc_decode_extradata(). It's something of little value for the
info level and effectively just spams stderr when trying to decode files
with unofficial or currently unsupported NAL units.

>          break;
>      default:
>          av_log(s->avctx, AV_LOG_INFO,
> -- 1.7.10.4
> 
> 
> 
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
Hendrik Leppkes Oct. 23, 2017, 7:59 a.m. UTC | #2
On Mon, Oct 23, 2017 at 5:22 AM, James Almer <jamrial@gmail.com> wrote:
> On 10/21/2017 9:31 PM, Carl Eugen Hoyos wrote:
>> Hi!
>>
>> Attached patch silences the many warnings shown when decoding streams
>> with DolbyVision content.
>>
>> Please comment, Carl Eugen
>>
>>
>> 0001-lavc-hevcdec-Silence-warnings-when-decoding-DolbyVis.patch
>>
>>
>> From d917eb3470b957fe17d8b708957567fdfa9dbdaa Mon Sep 17 00:00:00 2001
>> From: Carl Eugen Hoyos <ceffmpeg@gmail.com>
>> Date: Sun, 22 Oct 2017 02:17:27 +0200
>> Subject: [PATCH] lavc/hevcdec: Silence warnings when decoding DolbyVision.
>>
>> ---
>>  libavcodec/hevcdec.c |    2 ++
>>  1 file changed, 2 insertions(+)
>>
>> diff --git a/libavcodec/hevcdec.c b/libavcodec/hevcdec.c
>> index 2e4add2..d5ed9f5 100644
>> --- a/libavcodec/hevcdec.c
>> +++ b/libavcodec/hevcdec.c
>> @@ -2933,6 +2933,8 @@ static int decode_nal_unit(HEVCContext *s, const H2645NAL *nal)
>>          break;
>>      case HEVC_NAL_AUD:
>>      case HEVC_NAL_FD_NUT:
>> +    case 62: // unspecified, used by DolbyVision
>> +    case 63: // unspecified, used by DolbyVision
>
> No, the log message should be set to verbose level instead, like
> inff_hevc_decode_extradata(). It's something of little value for the
> info level and effectively just spams stderr when trying to decode files
> with unofficial or currently unsupported NAL units.
>

Note that 62 and 63 are not specific NAL types for DoVi, instead DoVi
inserts an additional 16-bit value between startcode and the typical
NAL-syntax (0x7E01 for the enhancement layer NALs, 0x7C01 for the
metadata NALs), so we're basically just parsing them "wrong", which
(intentionally) results in mapping to reserved NALs so any conformant
decoders ignore them. Just to avoid confusion in the future.

- Hendrik
Carl Eugen Hoyos Oct. 23, 2017, 8:09 a.m. UTC | #3
2017-10-23 5:22 GMT+02:00 James Almer <jamrial@gmail.com>:
> On 10/21/2017 9:31 PM, Carl Eugen Hoyos wrote:
>> Hi!
>>
>> Attached patch silences the many warnings shown when decoding streams
>> with DolbyVision content.
>>
>> Please comment, Carl Eugen
>>
>>
>> 0001-lavc-hevcdec-Silence-warnings-when-decoding-DolbyVis.patch
>>
>>
>> From d917eb3470b957fe17d8b708957567fdfa9dbdaa Mon Sep 17 00:00:00 2001
>> From: Carl Eugen Hoyos <ceffmpeg@gmail.com>
>> Date: Sun, 22 Oct 2017 02:17:27 +0200
>> Subject: [PATCH] lavc/hevcdec: Silence warnings when decoding DolbyVision.
>>
>> ---
>>  libavcodec/hevcdec.c |    2 ++
>>  1 file changed, 2 insertions(+)
>>
>> diff --git a/libavcodec/hevcdec.c b/libavcodec/hevcdec.c
>> index 2e4add2..d5ed9f5 100644
>> --- a/libavcodec/hevcdec.c
>> +++ b/libavcodec/hevcdec.c
>> @@ -2933,6 +2933,8 @@ static int decode_nal_unit(HEVCContext *s, const H2645NAL *nal)
>>          break;
>>      case HEVC_NAL_AUD:
>>      case HEVC_NAL_FD_NUT:
>> +    case 62: // unspecified, used by DolbyVision
>> +    case 63: // unspecified, used by DolbyVision
>
> No, the log message should be set to verbose level instead, like
> inff_hevc_decode_extradata(). It's something of little value for the
> info level and effectively just spams stderr when trying to decode files
> with unofficial or currently unsupported NAL units.

Don't we want users to upload such samples?

Carl Eugen
James Almer Oct. 23, 2017, 12:40 p.m. UTC | #4
On 10/23/2017 5:09 AM, Carl Eugen Hoyos wrote:
> 2017-10-23 5:22 GMT+02:00 James Almer <jamrial@gmail.com>:
>> On 10/21/2017 9:31 PM, Carl Eugen Hoyos wrote:
>>> Hi!
>>>
>>> Attached patch silences the many warnings shown when decoding streams
>>> with DolbyVision content.
>>>
>>> Please comment, Carl Eugen
>>>
>>>
>>> 0001-lavc-hevcdec-Silence-warnings-when-decoding-DolbyVis.patch
>>>
>>>
>>> From d917eb3470b957fe17d8b708957567fdfa9dbdaa Mon Sep 17 00:00:00 2001
>>> From: Carl Eugen Hoyos <ceffmpeg@gmail.com>
>>> Date: Sun, 22 Oct 2017 02:17:27 +0200
>>> Subject: [PATCH] lavc/hevcdec: Silence warnings when decoding DolbyVision.
>>>
>>> ---
>>>  libavcodec/hevcdec.c |    2 ++
>>>  1 file changed, 2 insertions(+)
>>>
>>> diff --git a/libavcodec/hevcdec.c b/libavcodec/hevcdec.c
>>> index 2e4add2..d5ed9f5 100644
>>> --- a/libavcodec/hevcdec.c
>>> +++ b/libavcodec/hevcdec.c
>>> @@ -2933,6 +2933,8 @@ static int decode_nal_unit(HEVCContext *s, const H2645NAL *nal)
>>>          break;
>>>      case HEVC_NAL_AUD:
>>>      case HEVC_NAL_FD_NUT:
>>> +    case 62: // unspecified, used by DolbyVision
>>> +    case 63: // unspecified, used by DolbyVision
>>
>> No, the log message should be set to verbose level instead, like
>> inff_hevc_decode_extradata(). It's something of little value for the
>> info level and effectively just spams stderr when trying to decode files
>> with unofficial or currently unsupported NAL units.
> 
> Don't we want users to upload such samples?

Nothing in the current log messages hints the user to provide us with
samples.
Carl Eugen Hoyos Oct. 24, 2017, 10:04 p.m. UTC | #5
2017-10-23 14:40 GMT+02:00 James Almer <jamrial@gmail.com>:
> On 10/23/2017 5:09 AM, Carl Eugen Hoyos wrote:
>> 2017-10-23 5:22 GMT+02:00 James Almer <jamrial@gmail.com>:
>>> On 10/21/2017 9:31 PM, Carl Eugen Hoyos wrote:
>>>> Hi!
>>>>
>>>> Attached patch silences the many warnings shown when decoding streams
>>>> with DolbyVision content.
>>>>
>>>> Please comment, Carl Eugen
>>>>
>>>>
>>>> 0001-lavc-hevcdec-Silence-warnings-when-decoding-DolbyVis.patch
>>>>
>>>>
>>>> From d917eb3470b957fe17d8b708957567fdfa9dbdaa Mon Sep 17 00:00:00 2001
>>>> From: Carl Eugen Hoyos <ceffmpeg@gmail.com>
>>>> Date: Sun, 22 Oct 2017 02:17:27 +0200
>>>> Subject: [PATCH] lavc/hevcdec: Silence warnings when decoding DolbyVision.
>>>>
>>>> ---
>>>>  libavcodec/hevcdec.c |    2 ++
>>>>  1 file changed, 2 insertions(+)
>>>>
>>>> diff --git a/libavcodec/hevcdec.c b/libavcodec/hevcdec.c
>>>> index 2e4add2..d5ed9f5 100644
>>>> --- a/libavcodec/hevcdec.c
>>>> +++ b/libavcodec/hevcdec.c
>>>> @@ -2933,6 +2933,8 @@ static int decode_nal_unit(HEVCContext *s, const H2645NAL *nal)
>>>>          break;
>>>>      case HEVC_NAL_AUD:
>>>>      case HEVC_NAL_FD_NUT:
>>>> +    case 62: // unspecified, used by DolbyVision
>>>> +    case 63: // unspecified, used by DolbyVision
>>>
>>> No, the log message should be set to verbose level instead, like
>>> inff_hevc_decode_extradata(). It's something of little value for the
>>> info level and effectively just spams stderr when trying to decode files
>>> with unofficial or currently unsupported NAL units.
>>
>> Don't we want users to upload such samples?
>
> Nothing in the current log messages hints the user to provide
> us with samples.

Experience indicates that users provide us with samples
that spam stderr.

Carl Eugen
diff mbox

Patch

From d917eb3470b957fe17d8b708957567fdfa9dbdaa Mon Sep 17 00:00:00 2001
From: Carl Eugen Hoyos <ceffmpeg@gmail.com>
Date: Sun, 22 Oct 2017 02:17:27 +0200
Subject: [PATCH] lavc/hevcdec: Silence warnings when decoding DolbyVision.

---
 libavcodec/hevcdec.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/libavcodec/hevcdec.c b/libavcodec/hevcdec.c
index 2e4add2..d5ed9f5 100644
--- a/libavcodec/hevcdec.c
+++ b/libavcodec/hevcdec.c
@@ -2933,6 +2933,8 @@  static int decode_nal_unit(HEVCContext *s, const H2645NAL *nal)
         break;
     case HEVC_NAL_AUD:
     case HEVC_NAL_FD_NUT:
+    case 62: // unspecified, used by DolbyVision
+    case 63: // unspecified, used by DolbyVision
         break;
     default:
         av_log(s->avctx, AV_LOG_INFO,
-- 
1.7.10.4