Re: [FFmpeg-devel] avcodec/proresenc_aw : add interlace encoding support

2019-02-14 Thread Kieran O Leary
Hi, can this be merged or is more rigourous testing necessary?
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] avcodec/proresenc_aw : add interlace encoding support

2019-02-10 Thread Kieran O Leary
On Sun, 10 Feb 2019, 11:57 Martin Vignali  Hello,
>
> >
> > > Use +ildct flag to switch between progressive and interlace encoding
> > >
> > > Use AVFrame flag to switch between tff and bff frame organization.
> > >
> >
> > Is this what you mean by altering the -setparams filter?
> >
> > In order to choose between top field first and bottom field first, i use
> the AVFrame property (interlaced, and top_field_first)
> (these property can be set using setparams filter using field_mode (so
> setparams make a more predictable result of field order (and color property
> (if set) at the same time))
>
>
> > > If AVFrame->interlaced value is not set to 1, but +ildct is set
> > (interlace
> > > encoding of progressive frame), define field order to top (most common
> > case
> > > for prores file)
> > >
> >
> > It appears that prores_ks defaults to BFF?
> >
>
> Following source code of prores_ks, i think prores_ks, doesn't really make
> a choice for interlace encoding of not interlace content
> it test for top field first property, if not set define to bottom (but
> doesn't check the interlaced flag before)
> Make more sense to me to convert progressive content to top field first.
>

I've no preference,I was just curious why there was a difference. Thanks
again for adding this. It will be very useful for those of us still dealing
with PAL/NTSC.

Best,

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


Re: [FFmpeg-devel] avcodec/proresenc_aw : add interlace encoding support

2019-02-10 Thread Martin Vignali
Hello,

>
> > Use +ildct flag to switch between progressive and interlace encoding
> >
> > Use AVFrame flag to switch between tff and bff frame organization.
> >
>
> Is this what you mean by altering the -setparams filter?
>
> In order to choose between top field first and bottom field first, i use
the AVFrame property (interlaced, and top_field_first)
(these property can be set using setparams filter using field_mode (so
setparams make a more predictable result of field order (and color property
(if set) at the same time))


> > If AVFrame->interlaced value is not set to 1, but +ildct is set
> (interlace
> > encoding of progressive frame), define field order to top (most common
> case
> > for prores file)
> >
>
> It appears that prores_ks defaults to BFF?
>

Following source code of prores_ks, i think prores_ks, doesn't really make
a choice for interlace encoding of not interlace content
it test for top field first property, if not set define to bottom (but
doesn't check the interlaced flag before)
Make more sense to me to convert progressive content to top field first.

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


Re: [FFmpeg-devel] avcodec/proresenc_aw : add interlace encoding support

2019-02-10 Thread Kieran O Leary
Hi,

On Sat, Feb 9, 2019 at 6:10 PM Martin Vignali 
wrote:

> Hello,
>
> Patchs in attach add interlace encoding support to prores aw encoding
>

Thanks so much for adding this. I can really only judge by the metadata for
now, but this all looks good to me (ffmpeg encode and mediainfo check):

$ ./ffmpeg -f lavfi -i testsrc -field_order tt -flags ildct -c:v prores_aw
-t 10 tt_ildct_aw.mov && mediainfo tt_ildct_aw.mov |grep -i scan
ffmpeg version N-93103-gd20902fd23 Copyright (c) 2000-2019 the FFmpeg
developers
  built with gcc 7 (Ubuntu 7.3.0-27ubuntu1~18.04)
  configuration:
  libavutil  56. 26.100 / 56. 26.100
  libavcodec 58. 47.100 / 58. 47.100
  libavformat58. 26.101 / 58. 26.101
  libavdevice58.  6.101 / 58.  6.101
  libavfilter 7. 48.100 /  7. 48.100
  libswscale  5.  4.100 /  5.  4.100
  libswresample   3.  4.100 /  3.  4.100
Input #0, lavfi, from 'testsrc':
  Duration: N/A, start: 0.00, bitrate: N/A
Stream #0:0: Video: rawvideo (RGB[24] / 0x18424752), rgb24, 320x240
[SAR 1:1 DAR 4:3], 25 tbr, 25 tbn, 25 tbc
File 'tt_ildct_aw.mov' already exists. Overwrite ? [y/N] y
Stream mapping:
  Stream #0:0 -> #0:0 (rawvideo (native) -> prores (prores_aw))
Press [q] to stop, [?] for help
[prores_aw @ 0x55b56f330c80] encoding with ProRes  (ap4h) profile
[prores_aw @ 0x55b56f334180] encoding with ProRes  (ap4h) profile
[prores_aw @ 0x55b56f337580] encoding with ProRes  (ap4h) profile
[prores_aw @ 0x55b56f33aa00] encoding with ProRes  (ap4h) profile
[prores_aw @ 0x55b56f305ec0] encoding with ProRes  (ap4h) profile
Output #0, mov, to 'tt_ildct_aw.mov':
  Metadata:
encoder : Lavf58.26.101
Stream #0:0: Video: prores (prores_aw) () (ap4h / 0x68347061),
yuv444p10le(top first), 320x240 [SAR 1:1 DAR 4:3], q=2-31, 200 kb/s, 25
fps, 12800 tbn, 25 tbc
Metadata:
  encoder : Lavc58.47.100 prores_aw
frame=  250 fps=0.0 q=-0.0 Lsize=   10145kB time=00:00:09.96
bitrate=8344.2kbits/s speed=26.8x
video:10143kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB
muxing overhead: 0.017619%
Scan type: Interlaced
Scan type, store method  : Separated fields (2 fields per
block)
Scan order   : Top Field First



>
> Use +ildct flag to switch between progressive and interlace encoding
>
> Use AVFrame flag to switch between tff and bff frame organization.
>

Is this what you mean by altering the -setparams filter?


> If AVFrame->interlaced value is not set to 1, but +ildct is set (interlace
> encoding of progressive frame), define field order to top (most common case
> for prores file)
>

It appears that prores_ks defaults to BFF?

$ ./ffmpeg -f lavfi -i testsrc  -flags ildct -c:v prores_ks -t 10
ildct_ks.mov && mediainfo ildct_ks.mov |grep -i scan
ffmpeg version N-93103-gd20902fd23 Copyright (c) 2000-2019 the FFmpeg
developers
  built with gcc 7 (Ubuntu 7.3.0-27ubuntu1~18.04)
  configuration:
  libavutil  56. 26.100 / 56. 26.100
  libavcodec 58. 47.100 / 58. 47.100
  libavformat58. 26.101 / 58. 26.101
  libavdevice58.  6.101 / 58.  6.101
  libavfilter 7. 48.100 /  7. 48.100
  libswscale  5.  4.100 /  5.  4.100
  libswresample   3.  4.100 /  3.  4.100
Input #0, lavfi, from 'testsrc':
  Duration: N/A, start: 0.00, bitrate: N/A
Stream #0:0: Video: rawvideo (RGB[24] / 0x18424752), rgb24, 320x240
[SAR 1:1 DAR 4:3], 25 tbr, 25 tbn, 25 tbc
File 'ildct_ks.mov' already exists. Overwrite ? [y/N] y
Stream mapping:
  Stream #0:0 -> #0:0 (rawvideo (native) -> prores (prores_ks))
Press [q] to stop, [?] for help
[prores_ks @ 0x557a246a5f80] Autoselected 4:4:4:4 profile because of the
used input colorspace. It can be overridden through -profile option.
[prores_ks @ 0x557a246b0e00] Autoselected 4:4:4:4 profile because of the
used input colorspace. It can be overridden through -profile option.
[prores_ks @ 0x557a246bbdc0] Autoselected 4:4:4:4 profile because of the
used input colorspace. It can be overridden through -profile option.
[prores_ks @ 0x557a246c6e40] Autoselected 4:4:4:4 profile because of the
used input colorspace. It can be overridden through -profile option.
[prores_ks @ 0x557a24677d80] Autoselected 4:4:4:4 profile because of the
used input colorspace. It can be overridden through -profile option.
Output #0, mov, to 'ildct_ks.mov':
  Metadata:
encoder : Lavf58.26.101
Stream #0:0: Video: prores (prores_ks) (ap4h / 0x68347061),
yuv444p10le, 320x240 [SAR 1:1 DAR 4:3], q=2-31, 200 kb/s, 25 fps, 12800
tbn, 25 tbc
Metadata:
  encoder : Lavc58.47.100 prores_ks
frame=   72 fps=0.0 q=-0.0 size=2816kB time=00:00:02.68
bitrate=8607.6kbits/frame=  144 fps=144 q=-0.0 size=5632kB
time=00:00:05.56 bitrate=8298.0kbits/frame=  216 fps=144 q=-0.0 size=
8704kB time=00:00:08.44 bitrate=8448.2kbits/frame=  250 fps=141 q=-0.0
Lsize=   10434kB time=00:00:09.96 bitrate=8582.2kbits/s speed=5.63x
video:10433kB audio:0kB 

[FFmpeg-devel] avcodec/proresenc_aw : add interlace encoding support

2019-02-09 Thread Martin Vignali
Hello,

Patchs in attach add interlace encoding support to prores aw encoding

Use +ildct flag to switch between progressive and interlace encoding

Use AVFrame flag to switch between tff and bff frame organization.
If AVFrame->interlaced value is not set to 1, but +ildct is set (interlace
encoding of progressive frame), define field order to top (most common case
for prores file)

user can still use setparams filter, to force bff for progressive input if
need.

Pass fate test for me (x86_64, mac os x)

Martin


0003-avcodec-proresenc_aw-move-scantable-to-prores-contex.patch
Description: Binary data


0001-avcodec-proresenc_aw-simplify-frame-flags.patch
Description: Binary data


0004-avcodec-proresenc_aw-merge-funcs-subimage_with_fill-.patch
Description: Binary data


0002-avcodec-proresenc_aw-move-picture-encoding-after-fra.patch
Description: Binary data


0005-avcodec-proresenc_aw-add-interlace-encoding.patch
Description: Binary data


0006-avcodec-proresenc_aw-indent-after-prev-commit.patch
Description: Binary data
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel