Re: [FFmpeg-devel] [PATCH 0/5] Support for Decklink output of EIA-708 and AFD

2018-09-11 Thread Devin Heitmueller
On Mon, Sep 10, 2018 at 8:00 PM, Marton Balint  wrote:
> Yes, just put the same value to both line 12 (or whichever line the user
> selects) and its pair line in the other field.

Ok, will take care of this today.

Thanks for reviewing.

Devin

-- 
Devin J. Heitmueller - Kernel Labs
http://www.kernellabs.com
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH 0/5] Support for Decklink output of EIA-708 and AFD

2018-09-10 Thread Marton Balint



On Sun, 9 Sep 2018, Devin Heitmueller wrote:


On Sun, Sep 9, 2018 at 4:59 PM, Marton Balint  wrote:


Thanks, I applied patches 1-4.


 decklink: Add support for output of Active Format Description (AFD)



Regarding this one, I noticed you always set the AFD in line 12. Are you
sure that it is OK to use line 12 for all resolutions?


12 should be fine at all resolutions, as it just needs to be at least
after the first line for switching (see ST 2016-3-2009 Sec 5).  I
already have a subsequent patch which makes the line configurable (as
well as for 708 and SCTE-104), but I am trying to avoid overloading
you with patches (which tends to result in *nothing* getting merged).


Also, I think for
interlaced formats you should set AFD for both fields, otherwise some
equipment might scale/crop the two fields of a picture differently...


I've never seen a piece of equipment do such an incorrect scale/crop,
but I guess it's possible.  Part of the issue is that there are a few
different conditions in which it can vary between the two fields and
the way the underlying side-data is managed needs to be overhauled in
order to properly handle that case (e.g. the SEI can be on a field
basis in H.264, and we don't presently handle providing both values as
side data for the frame).

I think this patch handles the 99% use case (especially as PAFF
becomes less and less common),  Putting the same value on both lines
for interlaced formats is probably not a bad idea, although I suspect
in practice you're unlikely to run into equipment that has a problem
with it only appearing once.


Yes, just put the same value to both line 12 (or whichever line the user 
selects) and its pair line in the other field.


I am not worried about set top boxes or encoders, but other broadcast 
equipment (e.g: downconverters) working on uncompressed SDI. We 
hit this issue with product of a big vendor.


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


Re: [FFmpeg-devel] [PATCH 0/5] Support for Decklink output of EIA-708 and AFD

2018-09-09 Thread Devin Heitmueller
Hi James,

> Shouldn't this new packet side data be handled in libavcodec/decode.c
> ff_decode_frame_props() as well?

I have a patch which does this as part of a patch series which adds
AFD parsing to decklink capture, ensures it gets preserved in
ff_decode_frame_props, and encodes the resulting AFD in the libx264
encoder.  I didn't want to submit just the patch for
ff_decode_frame_props() since nothing is presently able to exercise
the functionality other than a patch series I haven't yet submitted
for upstream.

So to answer your question, yes, we definitely need that as soon as
there is something which can actually act on it.

Devin

-- 
Devin J. Heitmueller - Kernel Labs
http://www.kernellabs.com
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH 0/5] Support for Decklink output of EIA-708 and AFD

2018-09-09 Thread Devin Heitmueller
On Sun, Sep 9, 2018 at 4:59 PM, Marton Balint  wrote:

> Thanks, I applied patches 1-4.
>
>>  decklink: Add support for output of Active Format Description (AFD)
>
>
> Regarding this one, I noticed you always set the AFD in line 12. Are you
> sure that it is OK to use line 12 for all resolutions?

12 should be fine at all resolutions, as it just needs to be at least
after the first line for switching (see ST 2016-3-2009 Sec 5).  I
already have a subsequent patch which makes the line configurable (as
well as for 708 and SCTE-104), but I am trying to avoid overloading
you with patches (which tends to result in *nothing* getting merged).

> Also, I think for
> interlaced formats you should set AFD for both fields, otherwise some
> equipment might scale/crop the two fields of a picture differently...

I've never seen a piece of equipment do such an incorrect scale/crop,
but I guess it's possible.  Part of the issue is that there are a few
different conditions in which it can vary between the two fields and
the way the underlying side-data is managed needs to be overhauled in
order to properly handle that case (e.g. the SEI can be on a field
basis in H.264, and we don't presently handle providing both values as
side data for the frame).

I think this patch handles the 99% use case (especially as PAFF
becomes less and less common),  Putting the same value on both lines
for interlaced formats is probably not a bad idea, although I suspect
in practice you're unlikely to run into equipment that has a problem
with it only appearing once.

Devin

-- 
Devin J. Heitmueller - Kernel Labs
http://www.kernellabs.com
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH 0/5] Support for Decklink output of EIA-708 and AFD

2018-09-09 Thread James Almer
On 9/9/2018 5:59 PM, Marton Balint wrote:
> 
> 
> On Fri, 7 Sep 2018, Devin Heitmueller wrote:
> 
>> The following patches add support for output of 708 and AFD over
>> the Decklink SDI interface.  This series is a subset of a series
>> submitted in early January, with the hope of getting the less
>> controversial parts merged upstream.
>>
>> Note compared to the previous series this includes a bit of
>> refactoring to separate out the generation of AFD and CC lines from
>> the actual output.  This makes the exception handling more
>> straightforward as well as ensuring that one VANC type being
>> invalid for some reason doesn't cause all the other types to
>> not be output (in the previous series, the function would bail
>> out if there was a problem with any VANC data, even if all the
>> other VANC data was perfectly valid).
>>
>> Devin Heitmueller (5):
>>  v210enc: Pass through A53 CC data
>>  libavdevice/decklink: Add support for EIA-708 output over SDI
>>  Allow AFD data to be embedded in AVPacket
>>  v210enc: Pass through Active Format Description (AFD) data
> 
> Thanks, I applied patches 1-4.

Shouldn't this new packet side data be handled in libavcodec/decode.c
ff_decode_frame_props() as well?
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH 0/5] Support for Decklink output of EIA-708 and AFD

2018-09-09 Thread Marton Balint



On Fri, 7 Sep 2018, Devin Heitmueller wrote:


The following patches add support for output of 708 and AFD over
the Decklink SDI interface.  This series is a subset of a series
submitted in early January, with the hope of getting the less
controversial parts merged upstream.

Note compared to the previous series this includes a bit of
refactoring to separate out the generation of AFD and CC lines from
the actual output.  This makes the exception handling more
straightforward as well as ensuring that one VANC type being
invalid for some reason doesn't cause all the other types to
not be output (in the previous series, the function would bail
out if there was a problem with any VANC data, even if all the
other VANC data was perfectly valid).

Devin Heitmueller (5):
 v210enc: Pass through A53 CC data
 libavdevice/decklink: Add support for EIA-708 output over SDI
 Allow AFD data to be embedded in AVPacket
 v210enc: Pass through Active Format Description (AFD) data


Thanks, I applied patches 1-4.


 decklink: Add support for output of Active Format Description (AFD)


Regarding this one, I noticed you always set the AFD in line 12. Are you 
sure that it is OK to use line 12 for all resolutions? Also, I think for 
interlaced formats you should set AFD for both fields, otherwise some 
equipment might scale/crop the two fields of a picture differently...


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


[FFmpeg-devel] [PATCH 0/5] Support for Decklink output of EIA-708 and AFD

2018-09-07 Thread Devin Heitmueller
The following patches add support for output of 708 and AFD over
the Decklink SDI interface.  This series is a subset of a series
submitted in early January, with the hope of getting the less
controversial parts merged upstream.

Note compared to the previous series this includes a bit of
refactoring to separate out the generation of AFD and CC lines from
the actual output.  This makes the exception handling more
straightforward as well as ensuring that one VANC type being
invalid for some reason doesn't cause all the other types to
not be output (in the previous series, the function would bail
out if there was a problem with any VANC data, even if all the
other VANC data was perfectly valid).

Devin Heitmueller (5):
  v210enc: Pass through A53 CC data
  libavdevice/decklink: Add support for EIA-708 output over SDI
  Allow AFD data to be embedded in AVPacket
  v210enc: Pass through Active Format Description (AFD) data
  decklink: Add support for output of Active Format Description (AFD)

 configure   |   4 +
 libavcodec/avcodec.h|   6 ++
 libavcodec/v210enc.c|  17 +++
 libavcodec/version.h|   2 +-
 libavdevice/decklink_common.cpp |  16 ++-
 libavdevice/decklink_common.h   |  10 ++
 libavdevice/decklink_enc.cpp| 229 ++--
 7 files changed, 272 insertions(+), 12 deletions(-)

-- 
2.13.2

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