[FFmpeg-devel] [PATCH] avfilter/vf_overlay: Fix the calculation of average alpha with alpha composition and threads > 1

2022-05-02 Thread Linjie Fu
arena];[arena][0:v]overlay" \ -vframes 10 -an -f md5 - Before: Incorrect output and changed MD5 at each run. After this patch: Consistent output and MD5. Signed-off-by: Linjie Fu --- [RFC]This is a partial fix. A fully-fixed method may be don't

[FFmpeg-devel] [PATCH] libavfilter/vf_pad: Try round up w/h for odd resolution to avoid failure

2022-05-01 Thread Linjie Fu
d data for stream #0:0 Conversion failed! After: Try to Round up for odd resolution (1241x1234 -> 1242x1240) Stream #0:0(und): Video: wrapped_avframe, yuv420p(tv, progressive), 1242x1240 Signed-off-by: Linjie Fu --- libavfilter/vf_pad.c | 11 --- 1 file changed, 8 insertions(+), 3

Re: [FFmpeg-devel] [PATCH 2/2] avdevice/libopenh264dec: Increase array sizes, fix stack-buffer overread

2021-12-06 Thread Linjie Fu
On Mon, Dec 6, 2021 at 7:37 PM Andreas Rheinhardt < andreas.rheinha...@outlook.com> wrote: > av_image_copy() expects an array of four pointers and linesizes > according to its declaration; it currently only pointers that are > actually in use (depending upon the pixel format), but this might >

Re: [FFmpeg-devel] [PATCH] libavcodec/hevc_mp4toannexb_bsf: update the extradata in codec par if change detected

2021-12-05 Thread Linjie Fu
Andreas: On Sun, Dec 5, 2021 at 7:34 PM Andreas Rheinhardt < andreas.rheinha...@outlook.com> wrote: > Linjie Fu: > > From: Linjie Fu > > > > Container may support multiple sample descriptions in a single > > bitstream, like multiple stsd in mov, which introdu

[FFmpeg-devel] [PATCH] libavcodec/hevc_mp4toannexb_bsf: update the extradata in codec par if change detected

2021-12-03 Thread Linjie Fu
From: Linjie Fu Container may support multiple sample descriptions in a single bitstream, like multiple stsd in mov, which introduces different sequence header(e.g.profile/bit_depth) in the middle of the bitstream. Update the extradata field in context parameter once packet with different

Re: [FFmpeg-devel] [PATCH 1/3] Revert "fftools/ffmpeg_filter: fix the flags parsing for scaler"

2021-08-30 Thread Linjie Fu
On Sat, Aug 28, 2021 at 4:45 AM Michael Niedermayer wrote: > On Sat, Aug 07, 2021 at 09:33:27PM +0200, Michael Niedermayer wrote: > > On Sat, Aug 07, 2021 at 06:15:05PM +0800, Linjie Fu wrote: > > > From: Linjie Fu > > > > > > This reverts commit b3a0

[FFmpeg-devel] [PATCH v2 2/2] libavfilter/graphparser: Add scale_sws_opts parse support in avfilter_graph_parse2

2021-08-09 Thread Linjie Fu
From: Linjie Fu To pass the swscale options for the inserted scalers. ffmpeg -i input.mp4 -filter_complex \ "scale_sws_opts=alphablend=checkerboard;format=nv12" \ -t 0.5 output.mp4 Update docs. Signed-off-by: Linjie Fu --- doc/filters.texi | 7 --- l

[FFmpeg-devel] [PATCH v2 1/2] lavfi/vf_scale: dump the exact swscale_options to passed to libswscale

2021-08-09 Thread Linjie Fu
From: Linjie Fu Printed verbose log doesn't match the sws_flags specified in the cmdline for simple filter graph. ffmpeg .. -sws_flags bicubic .. [auto_scaler_0] w:iw h:ih flags:'' interl:0 [auto_scaler_0] w:310 h:449 fmt:yuva420p sar:0/1 -> w:310 h:449 fmt:yuv420p sar:0/1 flags:

Re: [FFmpeg-devel] [PATCH 2/3] lavfi/vf_scale: dump the exact swscale_options to passed to libswscale

2021-08-08 Thread Linjie Fu
On Sat, Aug 7, 2021 at 9:12 PM Andreas Rheinhardt < andreas.rheinha...@outlook.com> wrote: > Linjie Fu: > > From: Linjie Fu > > > > Printed verbose log doesn't match the sws_flags specified in the cmdline > > for simple filter graph. > > > > ffmpeg

Re: [FFmpeg-devel] [PATCH 3/3] libavfilter/graphparser: Add scale_sws_opts parse support in avfilter_graph_parse2

2021-08-08 Thread Linjie Fu
Andreas: On Sat, Aug 7, 2021 at 9:52 PM Andreas Rheinhardt < andreas.rheinha...@outlook.com> wrote: > Linjie Fu: > > From: Linjie Fu > > > > To pass the swscale options for the inserted scalers. > > > > ffmpeg -i input.mp4 -filter_complex \ > > &

Re: [FFmpeg-devel] [FFmpeg-cvslog] fftools/ffmpeg_filter: fix the flags parsing for scaler

2021-08-07 Thread Linjie Fu
On Sat, Aug 7, 2021 at 2:33 AM Michael Niedermayer wrote: > On Thu, Aug 05, 2021 at 02:30:32PM +0000, Linjie Fu wrote: > > ffmpeg | branch: master | Linjie Fu | Sun > Aug 1 18:58:19 2021 +0800| [b3a0548a981db52911dd34d9de254c4fee0a8f79] | > committer: Linjie Fu > > >

[FFmpeg-devel] [PATCH 3/3] libavfilter/graphparser: Add scale_sws_opts parse support in avfilter_graph_parse2

2021-08-07 Thread Linjie Fu
From: Linjie Fu To pass the swscale options for the inserted scalers. ffmpeg -i input.mp4 -filter_complex \ "scale_sws_opts=alphablend=checkerboard;format=nv12" \ -t 0.5 output.mp4 Update docs. Signed-off-by: Linjie Fu --- doc/filters.texi | 7 --- l

[FFmpeg-devel] [PATCH 2/3] lavfi/vf_scale: dump the exact swscale_options to passed to libswscale

2021-08-07 Thread Linjie Fu
From: Linjie Fu Printed verbose log doesn't match the sws_flags specified in the cmdline for simple filter graph. ffmpeg .. -sws_flags bicubic .. [auto_scaler_0] w:iw h:ih flags:'' interl:0 [auto_scaler_0] w:310 h:449 fmt:yuva420p sar:0/1 -> w:310 h:449 fmt:yuv420p sar:0/1 flags:

[FFmpeg-devel] [PATCH 1/3] Revert "fftools/ffmpeg_filter: fix the flags parsing for scaler"

2021-08-07 Thread Linjie Fu
From: Linjie Fu This reverts commit b3a0548a981db52911dd34d9de254c4fee0a8f79. This breaks the usage of swscale options, scale_sws_opts should be passed to auto-inserted scale-filters. The auto-inserted scaler accepts sws_flags in filtergraph complex which overrides the 'flags' option

Re: [FFmpeg-devel] fftools: Don't set default swscale flags in ffmpeg/ffprobe/ffplay

2021-08-05 Thread Linjie Fu
On Thu, Aug 5, 2021 at 11:22 PM Nicolas George wrote: > Linjie Fu (12021-08-05): > > Where is supposed to be the right placement? > > In the commit that makes the results change. > > Just do this: checkout the first commit, build, run FATE. Does it pass? > Double

Re: [FFmpeg-devel] fftools: Don't set default swscale flags in ffmpeg/ffprobe/ffplay

2021-08-05 Thread Linjie Fu
On Thu, Aug 5, 2021 at 10:54 PM Nicolas George wrote: > Linjie Fu (12021-08-05): > > This initials from your review comments to remove setting defaults in > > ffmpeg (etc) and use the default flags in swscale, > > and I didn't see objections at least till now. Did I misunder

Re: [FFmpeg-devel] [FFmpeg-cvslog] fftools: Don't set default swscale flags in ffmpeg/ffprobe/ffplay

2021-08-05 Thread Linjie Fu
On Thu, Aug 5, 2021 at 10:32 PM Nicolas George wrote: > Linjie Fu (12021-08-05): > > ffmpeg | branch: master | Linjie Fu | Thu > Aug 5 00:37:29 2021 +0800| [5b0e6b0d82dfcc5c6b999e2678b52b0cff38ae0a] | > committer: Linjie Fu > > > > fftools: Don't set default swsc

Re: [FFmpeg-devel] [PATCH v3 1/2] lavfi/vf_scale: use default swscale flags for simple and complex filter graph

2021-08-04 Thread Linjie Fu
On Thu, Aug 5, 2021 at 2:22 AM Nicolas George wrote: > Linjie Fu (12021-08-05): > > > > -if (scale->flags_str) { > > > > +if (*scale->flags_str) { > > > It could still be NULL, IIRC. > > sws_flags doesn't have a candidate for &qu

[FFmpeg-devel] [PATCH v4 3/3] fftools/ffmpeg_filter: fix the flags parsing for scaler

2021-08-04 Thread Linjie Fu
From: Linjie Fu Scaler relys on "-sws_flags" option to pass the flags to swscale and scale filter. Currently passing "sws_flags=xxx" as a filter option to scaler leads to an incorrect option parsing. Check and change the string to "flags=xxx" and du

[FFmpeg-devel] [PATCH v4 1/3] lavfi/vf_scale: use default swscale flags for scaler

2021-08-04 Thread Linjie Fu
rently) for scale filter. - Remove flags="bilinear" from vf_scale - Update the FATE refs Signed-off-by: Linjie Fu --- libavfilter/vf_scale.c | 4 ++-- tests/ref/fate/filter-scale2ref_keep_aspect | 10 +- 2 files changed, 7 insertions(+), 7 deletion

[FFmpeg-devel] [PATCH v4 2/3] fftools: Don't set default swscale flags in ffmpeg/ffprobe/ffplay

2021-08-04 Thread Linjie Fu
From: Linjie Fu Signed-off-by: Linjie Fu --- fftools/cmdutils.c | 8 fftools/ffplay.c | 2 -- fftools/ffprobe.c | 1 - 3 files changed, 11 deletions(-) diff --git a/fftools/cmdutils.c b/fftools/cmdutils.c index 0b1ef03a25..912e881174 100644 --- a/fftools/cmdutils.c +++ b/fftools

Re: [FFmpeg-devel] [PATCH v3 1/2] lavfi/vf_scale: use default swscale flags for simple and complex filter graph

2021-08-04 Thread Linjie Fu
On Wed, Aug 4, 2021 at 7:03 PM Nicolas George wrote: > Linjie Fu (12021-08-04): > > From: Linjie Fu > > > > Currently the default swscale flags for simple filter graph is bicubic, > > however for complex filter graph it uses bilinear as decleared in scale > > f

Re: [FFmpeg-devel] [PATCH v1] avfilter/vf_vpp_qsv: add scale mode option

2021-08-03 Thread Linjie Fu
Hi Andreas,On Wed, Aug 4, 2021 at 8:30 AM Andreas Rheinhardt < andreas.rheinha...@outlook.com> wrote: > Linjie Fu: > > On Wed, Mar 24, 2021 at 2:15 PM Wang, Fei W > wrote: > > > >> On Mon, 2021-03-22 at 20:12 +0800, Linjie Fu wrote: > >>> On Wed,

Re: [FFmpeg-devel] [PATCH v2 4/4] fftools/cmdutils: pass sws_flags to scale filter in simple filter graph

2021-08-03 Thread Linjie Fu
On Tue, Aug 3, 2021 at 1:07 AM Nicolas George wrote: > Linjie Fu (12021-08-03): > > From: Linjie Fu > > > > Pass sws_flags to scale filter through scale_sws_opts and correct the > > dumped flags information. > > > > CMD: > > $ffmpeg -v ver

Re: [FFmpeg-devel] [PATCH v2 3/4] libswscale/utils: simplify the default scaler logic

2021-08-03 Thread Linjie Fu
On Tue, Aug 3, 2021 at 1:02 AM Nicolas George wrote: > Linjie Fu (12021-08-03): > > From: Linjie Fu > > > > Signed-off-by: Linjie Fu > > --- > > libswscale/utils.c | 7 +-- > > 1 file changed, 1 insertion(+), 6 deletions(-) > > Nack. Th

[FFmpeg-devel] [PATCH v3 2/2] fftools/ffmpeg_filter: fix the flags parsing for scaler

2021-08-03 Thread Linjie Fu
From: Linjie Fu Scaler relys on "-sws_flags" option to pass the flags to swscale and scale filter. Currently passing "sws_flags=xxx" as a filter option to scaler leads to an incorrect option parsing. Check and change the string to "flags=xxx" and du

[FFmpeg-devel] [PATCH v3 1/2] lavfi/vf_scale: use default swscale flags for simple and complex filter graph

2021-08-03 Thread Linjie Fu
From: Linjie Fu Currently the default swscale flags for simple filter graph is bicubic, however for complex filter graph it uses bilinear as decleared in scale filter. $ffmpeg -v verbose -i input.mp4 -vf format=yuv420p,scale=800x600 -an -f null - [Parsed_scale_1 @ 0x7f86d2c160c0] w:1920 h:1080

Re: [FFmpeg-devel] [PATCH v1] avfilter/vf_vpp_qsv: add scale mode option

2021-08-03 Thread Linjie Fu
On Wed, Mar 24, 2021 at 2:15 PM Wang, Fei W wrote: > On Mon, 2021-03-22 at 20:12 +0800, Linjie Fu wrote: > > On Wed, Feb 24, 2021 at 9:44 AM Fei Wang > > wrote: > > > > > > The option allow user to set diffenent scaling mode from > > > auto/low-po

Re: [FFmpeg-devel] [PATCH 1/2] fftools/cmdutils: make the default swscale flags identical for simple and complex filter graph

2021-08-02 Thread Linjie Fu
On Tue, Aug 3, 2021 at 12:48 AM Michael Niedermayer wrote: > On Sun, Aug 01, 2021 at 04:08:17PM +0200, Nicolas George wrote: > > Linjie Fu (12021-08-01): > > > Checked swscale, it uses bicubic by default. > > > Scale filter sets the flags to bilinear if sws_sca

Re: [FFmpeg-devel] [PATCH v2 1/4] FATE: Update test refs for scale used in filter complex

2021-08-02 Thread Linjie Fu
Hi Andreas, On Tue, Aug 3, 2021 at 12:50 AM Andreas Rheinhardt < andreas.rheinha...@outlook.com> wrote: > Linjie Fu: > > From: Linjie Fu > > > > Since we prefer to use bicubic flags for scale filter to keep pace with > > swscale. > > > > Signed-o

[FFmpeg-devel] [PATCH v2 4/4] fftools/cmdutils: pass sws_flags to scale filter in simple filter graph

2021-08-02 Thread Linjie Fu
From: Linjie Fu Pass sws_flags to scale filter through scale_sws_opts and correct the dumped flags information. CMD: $ffmpeg -v verbose -i input.mp4 -sws_flags lanczos+bitexact+accurate_rnd \ -vf format=yuv420p,scale=800x600 -an -vframes 10 -f md5 - Before: [auto_scaler_0

[FFmpeg-devel] [PATCH v2 3/4] libswscale/utils: simplify the default scaler logic

2021-08-02 Thread Linjie Fu
From: Linjie Fu Signed-off-by: Linjie Fu --- libswscale/utils.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/libswscale/utils.c b/libswscale/utils.c index 176fc6fd63..dea3b76eb3 100644 --- a/libswscale/utils.c +++ b/libswscale/utils.c @@ -1250,12 +1250,7 @@ av_cold

[FFmpeg-devel] [PATCH v2 2/4] lavfi/vf_scale: use single default swscale flags for simple and complex filter graph

2021-08-02 Thread Linjie Fu
From: Linjie Fu Currently the default swscale flags for simple filter graph is bicubic, however for complex filter graph it uses bilinear as decleared in scale filter. $ffmpeg -v verbose -i input.mp4 -vf format=yuv420p,scale=800x600 -an -f null - [Parsed_scale_1 @ 0x7f86d2c160c0] w:1920 h:1080

[FFmpeg-devel] [PATCH v2 1/4] FATE: Update test refs for scale used in filter complex

2021-08-02 Thread Linjie Fu
From: Linjie Fu Since we prefer to use bicubic flags for scale filter to keep pace with swscale. Signed-off-by: Linjie Fu --- tests/ref/fate/filter-scale2ref_keep_aspect | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/ref/fate/filter-scale2ref_keep_aspect

Re: [FFmpeg-devel] [PATCH 1/2] fftools/cmdutils: make the default swscale flags identical for simple and complex filter graph

2021-08-01 Thread Linjie Fu
On Sun, Aug 1, 2021 at 10:13 PM Gyan Doshi wrote: > > > On 2021-08-01 19:19, Linjie Fu wrote: > > On Sun, Aug 1, 2021 at 9:25 PM Nicolas George wrote: > > > >> Linjie Fu (12021-08-01): > >>> From: Linjie Fu > >>> > >>> Curr

Re: [FFmpeg-devel] [PATCH 1/2] fftools/cmdutils: make the default swscale flags identical for simple and complex filter graph

2021-08-01 Thread Linjie Fu
On Sun, Aug 1, 2021 at 9:25 PM Nicolas George wrote: > Linjie Fu (12021-08-01): > > From: Linjie Fu > > > > Currently the default swscale flags for simple filter graph is bicubic, > > however for complex filter graph it uses bilinear as decleared in scale > >

[FFmpeg-devel] [PATCH 2/2] fftools/cmdutils: pass sws_flags to scale filter in simple filter graph

2021-08-01 Thread Linjie Fu
From: Linjie Fu Pass sws_flags to scale filter through scale_sws_opts and correct the dumped flags information. CMD: $ffmpeg -v verbose -i input.mp4 -sws_flags lanczos+bitexact+accurate_rnd \ -vf format=yuv420p,scale=800x600 -an -vframes 10 -f md5 - Before: [auto_scaler_0

[FFmpeg-devel] [PATCH 1/2] fftools/cmdutils: make the default swscale flags identical for simple and complex filter graph

2021-08-01 Thread Linjie Fu
From: Linjie Fu Currently the default swscale flags for simple filter graph is bicubic, however for complex filter graph it uses bilinear as decleared in scale filter. $ffmpeg -v verbose -i input.mp4 -vf format=yuv420p,scale=800x600 -an -f null - [Parsed_scale_1 @ 0x7f86d2c160c0] w:1920 h:1080

Re: [FFmpeg-devel] [PATCH v2] fftools/ffmpeg: accelerate seeking while reading input at native frame rate

2021-07-19 Thread Linjie Fu
On Mon, Jul 19, 2021 at 3:32 PM Gyan Doshi wrote: > > > On 2021-07-19 12:48, Gyan Doshi wrote: > > > > > > On 2021-07-18 22:23, Linjie Fu wrote: > >> On Sun, Jul 18, 2021 at 8:57 PM Gyan Doshi wrote: > >>> > >>> > >>> On 2

Re: [FFmpeg-devel] [PATCH v2] fftools/ffmpeg: accelerate seeking while reading input at native frame rate

2021-07-18 Thread Linjie Fu
On Sun, Jul 18, 2021 at 8:57 PM Gyan Doshi wrote: > > > > On 2021-07-18 15:37, Linjie Fu wrote: > > On Sun, Jul 18, 2021 at 5:26 PM Gyan Doshi wrote: > >> > >> > >> On 2021-07-18 13:35, Linjie Fu wrote: > >>> On Sun, Jul 18, 2021 at 1:2

Re: [FFmpeg-devel] [PATCH v2] fftools/ffmpeg: accelerate seeking while reading input at native frame rate

2021-07-18 Thread Linjie Fu
On Sun, Jul 18, 2021 at 5:26 PM Gyan Doshi wrote: > > > > On 2021-07-18 13:35, Linjie Fu wrote: > > On Sun, Jul 18, 2021 at 1:21 PM Gyan Doshi wrote: > >> > >> > >> On 2021-07-18 10:42, Linjie Fu wrote: > >>> Hi Gyan,

Re: [FFmpeg-devel] [PATCH v2] fftools/ffmpeg: accelerate seeking while reading input at native frame rate

2021-07-18 Thread Linjie Fu
On Sun, Jul 18, 2021 at 1:21 PM Gyan Doshi wrote: > > > > On 2021-07-18 10:42, Linjie Fu wrote: > > Hi Gyan, > > On Sun, Jul 18, 2021 at 12:24 PM Gyan Doshi wrote: > >> > >> > >> On 2021-07-18 09:32, Linjie Fu wrote: > >>> On Wed

Re: [FFmpeg-devel] [PATCH v2] fftools/ffmpeg: accelerate seeking while reading input at native frame rate

2021-07-17 Thread Linjie Fu
Hi Gyan, On Sun, Jul 18, 2021 at 12:24 PM Gyan Doshi wrote: > > > > On 2021-07-18 09:32, Linjie Fu wrote: > > On Wed, Jul 7, 2021 at 9:42 AM Linjie Fu wrote: > >> On Sun, Jul 4, 2021 at 10:50 PM Linjie Fu wrote: > >>> From: Linjie Fu > >>>

Re: [FFmpeg-devel] [PATCH] avfilter: add QSV variants of the stack filters

2021-07-17 Thread Linjie Fu
Hi Haihao, On Wed, Jun 9, 2021 at 3:36 PM Haihao Xiang wrote: > > Include hstack_qsv, vstack_qsv and xstack_qsv, some code is copy and > pasted from other filters > > Example: > $> ffmpeg -hwaccel qsv -c:v hevc_qsv -i input.h265 -filter_complex > "[0:v][0:v]hstack_qsv" -f null - > --- >

Re: [FFmpeg-devel] [PATCH v2] fftools/ffmpeg: accelerate seeking while reading input at native frame rate

2021-07-17 Thread Linjie Fu
On Wed, Jul 7, 2021 at 9:42 AM Linjie Fu wrote: > > On Sun, Jul 4, 2021 at 10:50 PM Linjie Fu wrote: > > > > From: Linjie Fu > > > > Skip the logic of frame rate emulation until the input reaches the > > specified start time. > > > > Test CMD:

Re: [FFmpeg-devel] [PATCH v2] fftools/ffmpeg: accelerate seeking while reading input at native frame rate

2021-07-06 Thread Linjie Fu
On Sun, Jul 4, 2021 at 10:50 PM Linjie Fu wrote: > > From: Linjie Fu > > Skip the logic of frame rate emulation until the input reaches the > specified start time. > > Test CMD: >$ffmpeg -re -ss 30 -i input.mp4 -pix_fmt yuv420p -f sdl2 - > > Before the pa

[FFmpeg-devel] [PATCH v2] fftools/ffmpeg: accelerate seeking while reading input at native frame rate

2021-07-04 Thread Linjie Fu
From: Linjie Fu Skip the logic of frame rate emulation until the input reaches the specified start time. Test CMD: $ffmpeg -re -ss 30 -i input.mp4 -pix_fmt yuv420p -f sdl2 - Before the patch: first time to got frame, it takes 257305 us After this patch: first time to got frame, it takes

[FFmpeg-devel] [PATCH] fftools/ffmpeg: accelerate seeking while reading input at native frame rate

2021-07-03 Thread Linjie Fu
From: Linjie Fu Skip the logic of frame rate emulation until the input reaches the specified start time. Test CMD: $ffmpeg -re -ss 30 -i input.mp4 -pix_fmt yuv420p -f sdl2 - Before the patch: first time to got frame, it takes 257305 us After this patch: first time to got frame, it takes

Re: [FFmpeg-devel] [PATCH v2 13/22] lavfi/scale_qsv: add more input / output pixel formats

2021-06-06 Thread Linjie Fu
On Mon, May 17, 2021 at 11:30 AM Haihao Xiang wrote: > > NV12 and P010 are added > > $ ffmpeg -init_hw_device qsv -c:v h264_qsv -i input.h264 -vf > "scale_qsv=format=p010" -f null - > --- > libavfilter/vf_vpp_qsv.c | 5 - > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git

Re: [FFmpeg-devel] [PATCH v2 14/22] lavfi/vpp_qsv: double the framerate for deinterlacing

2021-06-06 Thread Linjie Fu
Hi Haihao, On Mon, May 17, 2021 at 11:30 AM Haihao Xiang wrote: > > --- > libavfilter/vf_vpp_qsv.c | 8 ++-- > 1 file changed, 6 insertions(+), 2 deletions(-) > > diff --git a/libavfilter/vf_vpp_qsv.c b/libavfilter/vf_vpp_qsv.c > index 29ba220665..ec35f85b04 100644 > ---

Re: [FFmpeg-devel] [PATCH 1/3] lavc/qsv: apply AVCodecContext AVOption -threads to QSV

2021-04-09 Thread Linjie Fu
Hi Haihao, On Thu, Apr 8, 2021 at 3:10 PM Haihao Xiang wrote: > > By default the SDK creates a thread for each CPU when creating a mfx > session for decoding / encoding, which results in CPU overhead on a > multi CPU system. Actually creating 2 threads is a better choice for > most cases in

Re: [FFmpeg-devel] [PATCH v3] lavfi/qsvvpp: support async depth

2021-04-09 Thread Linjie Fu
Hi Fei W, On Wed, Mar 31, 2021 at 10:14 AM Wang, Fei W wrote: > > On Wed, 2021-03-31 at 10:07 +0800, Fei Wang wrote: > > Async depth will allow qsv filter cache few frames, and avoid force > > switch and end filter task frame by frame. This change will improve > > performance for some multi-task

Re: [FFmpeg-devel] 4.4 Release Name

2021-04-03 Thread Linjie Fu
On Sat, Apr 3, 2021 at 16:53 Michael Niedermayer wrote: > On Sat, Apr 03, 2021 at 02:19:58PM +0800, Linjie Fu wrote: > > On Sat, Apr 3, 2021 at 09:10 Zane van Iperen > wrote: > > > > > > > > > > > On 2/4/21 8:34 pm, RADSL wrote: > > > &g

Re: [FFmpeg-devel] 4.4 Release Name

2021-04-03 Thread Linjie Fu
On Sat, Apr 3, 2021 at 09:10 Zane van Iperen wrote: > > > On 2/4/21 8:34 pm, RADSL wrote: > > > > On 4/2/2021 2:59 AM, Michael Niedermayer wrote: > >> Hi all > >> > >> We still need to choose the name for 4.4 > >> previous unused suggestions where: > >> Von Neumann, Lorentz, Poincaré, Desitter,

Re: [FFmpeg-devel] [PATCH v1] avfilter/vf_vpp_qsv: add scale mode option

2021-03-22 Thread Linjie Fu
On Wed, Feb 24, 2021 at 9:44 AM Fei Wang wrote: > > The option allow user to set diffenent scaling mode from > auto/low-power/high-quality. > > More details: > https://github.com/Intel-Media-SDK/MediaSDK/blob/master/doc/mediasdk-man.md#mfxExtVPPScaling > > Signed-off-by: Fei Wang > --- >

Re: [FFmpeg-devel] [PATCH v2] lavfi/qsvvpp: support async depth

2021-03-21 Thread Linjie Fu
Hi Fei, On Mon, Mar 15, 2021 at 1:13 PM Fei Wang wrote: > > Async depth will allow qsv filter cache few frames, and avoid force > switch and end filter task frame by frame. This change will improve > performance for some multi-task case, for example 1:N transcode( > decode + vpp + encode) with

Re: [FFmpeg-devel] [PATCH] mailmap: add entry for myself

2021-03-08 Thread Linjie Fu
On Mon, Mar 8, 2021 at 11:58 PM Thilo Borgmann wrote: > > Hi, > > Am 08.03.21 um 16:12 schrieb Linjie Fu: > > Signed-off-by: Linjie Fu > > --- > > .mailmap | 3 ++- > > 1 file changed, 2 insertions(+), 1 deletion(-) > > > > diff --git a/.mai

[FFmpeg-devel] [PATCH] mailmap: add entry for myself

2021-03-08 Thread Linjie Fu
Signed-off-by: Linjie Fu --- .mailmap | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.mailmap b/.mailmap index 3bd1a85c3c..ba072f38c8 100644 --- a/.mailmap +++ b/.mailmap @@ -10,7 +10,8 @@ - + + -- 2.25.1

[FFmpeg-devel] [PATCH] lavc/hevc_parser: remove repeated profile/level settings

2021-01-29 Thread Linjie Fu
Since avctx->profile/level would be set in export_stream_params() in set_sps(), identical codes here seem to be redundant. Signed-off-by: Linjie Fu --- libavcodec/hevc_parser.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/libavcodec/hevc_parser.c b/libavcodec/hevc_parser.c in

Re: [FFmpeg-devel] [PATCH] lavf/utils: reset event_flags if extradata is not extracted correctly

2021-01-29 Thread Linjie Fu
On Mon, Jan 25, 2021 at 9:08 PM Anton Khirnov wrote: > > Quoting Linjie Fu (2021-01-25 04:49:21) > > On Mon, Jan 25, 2021 at 12:49 AM Anton Khirnov wrote: > > > > > > Quoting Linjie Fu (2021-01-24 16:05:56) > > > > Regression since 87f0c8280. > >

Re: [FFmpeg-devel] [PATCH] lavf/utils: reset event_flags if extradata is not extracted correctly

2021-01-24 Thread Linjie Fu
On Mon, Jan 25, 2021 at 12:49 AM Anton Khirnov wrote: > > Quoting Linjie Fu (2021-01-24 16:05:56) > > Regression since 87f0c8280. > > > > If the extradata of a stream could not be extracted correctly, > > codec_info_nb_frames would remain zero, while st->eve

Re: [FFmpeg-devel] [PATCH] fftools/ffmpeg_opt: restore to use codec_info_nb_frames to calculate score

2021-01-24 Thread Linjie Fu
On Sun, Jan 24, 2021 at 9:38 PM James Almer wrote: > > On 1/24/2021 10:00 AM, Linjie Fu wrote: > > From: Linjie Fu > > > > Regression since 87f0c8280. > > > > If the extradata of a stream could not be extracted correctly, > > codec_info_nb_frames wou

[FFmpeg-devel] [PATCH] lavf/utils: reset event_flags if extradata is not extracted correctly

2021-01-24 Thread Linjie Fu
ags and calculate the correct score. Fix #9029. Signed-off-by: Linjie Fu --- libavformat/utils.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libavformat/utils.c b/libavformat/utils.c index 6f100294a1..de397a209e 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -389

[FFmpeg-devel] [PATCH] fftools/ffmpeg_opt: restore to use codec_info_nb_frames to calculate score

2021-01-24 Thread Linjie Fu
From: Linjie Fu Regression since 87f0c8280. If the extradata of a stream could not be extracted correctly, codec_info_nb_frames would remain zero, while st->event_flag would still be marked as AVSTREAM_EVENT_FLAG_NEW_PACKETS since it's a new packet indeed. The two expressions co

Re: [FFmpeg-devel] [PATCH v3 0/8] HEVC native support for Screen content coding

2021-01-15 Thread Linjie Fu
On Mon, Dec 7, 2020 at 8:56 PM Linjie Fu wrote: > > Add parsing support and reference management for HEVC SCC, as part of > the fully decoding support for hardware(vaapi). > > v3: > - addressed the hang issue in multi-threads > - prompted more logs to prompt scc is not ful

Re: [FFmpeg-devel] [PATCH v2 6/6] avcodec/qsvdec: refact, remove duplicate code for plugin loading

2021-01-15 Thread Linjie Fu
Guangxin: On Tue, Jan 5, 2021 at 10:44 AM Xu Guangxin wrote: > > --- > libavcodec/qsvdec.c | 29 +++-- > 1 file changed, 11 insertions(+), 18 deletions(-) > > diff --git a/libavcodec/qsvdec.c b/libavcodec/qsvdec.c > index 3ca16dafae..d10f90a0db 100644 > ---

Re: [FFmpeg-devel] [PATCH v4 1/2] lavf/qsv: Add functions to print mfx iopattern, warning and error

2021-01-15 Thread Linjie Fu
Haihao: On Tue, Jan 5, 2021 at 3:03 PM Haihao Xiang wrote: > > It is a copy of the relevant part in lavc/qsv but use different function > names to avoid multiple definition when linking lavc and lavf statically. > > Signed-off-by: Haihao Xiang > --- > v4: rename the new functions to avoid

Re: [FFmpeg-devel] [PATCH] avcodec/libkvazaar: Set default ratecontrol algorithm for libkvazaar

2021-01-04 Thread Linjie Fu
On Fri, Jan 1, 2021 at 9:55 PM Linjie Fu wrote: > > On Thu, Dec 10, 2020 at 3:28 PM Linjie Fu wrote: > > > > On Thu, Dec 10, 2020 at 2:09 PM Joose Sainio wrote: > > > > > > The standalone version of Kvazaar sets a default ratecontrol algorithm >

Re: [FFmpeg-devel] [PATCH v2] fate/hevc-conformance: add clip for persistent_rice_adaptation_enabled_flag

2021-01-04 Thread Linjie Fu
On Fri, Jan 1, 2021 at 9:39 PM Linjie Fu wrote: > > On Mon, Dec 14, 2020 at 5:49 PM Guangxin Xu wrote: > > > > Hi Lingjie > > thanks for the review. > > The stream has the feature but not used. > > > > the decoded yuv's md5 is 3c94b5e

Re: [FFmpeg-devel] [PATCH 1/5] avcodec/qsvdec_other: refact, use DEFINE_QSV_DECODER to remove duplicate code

2021-01-01 Thread Linjie Fu
Guangxin: On Thu, Nov 26, 2020 at 6:21 PM Xu Guangxin wrote: > > --- > libavcodec/qsvdec_other.c | 188 -- > 1 file changed, 36 insertions(+), 152 deletions(-) > > diff --git a/libavcodec/qsvdec_other.c b/libavcodec/qsvdec_other.c > index

Re: [FFmpeg-devel] [PATCH v2] fate/hevc-conformance: add clip for persistent_rice_adaptation_enabled_flag

2021-01-01 Thread Linjie Fu
On Mon, Dec 14, 2020 at 5:49 PM Guangxin Xu wrote: > > Hi Lingjie > thanks for the review. > The stream has the feature but not used. > > the decoded yuv's md5 is 3c94b5ebc0aed0abae4e619b9dcca9cc > it's matched with the WPP_HIGH_TP_444_8BIT_RExt_Apple_2.md5 > Double checked, md5 is matched, and

Re: [FFmpeg-devel] [PATCH] avcodec/libkvazaar: Set default ratecontrol algorithm for libkvazaar

2021-01-01 Thread Linjie Fu
On Thu, Dec 10, 2020 at 3:28 PM Linjie Fu wrote: > > On Thu, Dec 10, 2020 at 2:09 PM Joose Sainio wrote: > > > > The standalone version of Kvazaar sets a default ratecontrol algorithm when > > bitrate is set. Mirror this behaviour. > > > > Signed-off-by: Jo

Re: [FFmpeg-devel] About support a new arch

2020-12-11 Thread Linjie Fu
On Fri, Dec 11, 2020 at 6:31 PM Steven Liu wrote: > > > > > 2020年12月11日 下午5:52,Linjie Fu 写道: > > > > Hi, > > > > On Fri, Dec 11, 2020 at 3:58 PM Steven Liu wrote: > >> > >> > >> > >>> 2020年12月11日 下午3:55,俞林杰

Re: [FFmpeg-devel] About support a new arch

2020-12-11 Thread Linjie Fu
Hi, On Fri, Dec 11, 2020 at 3:58 PM Steven Liu wrote: > > > > > 2020年12月11日 下午3:55,俞林杰 写道: > > > > a new arch called csky > > How should we test your code for this arch? > Previous discussion in mail thread[1] about adding new hardware implementation, which you may want to refer to. [1]

Re: [FFmpeg-devel] [PATCH v2] fate/hevc-conformance: add clip for persistent_rice_adaptation_enabled_flag

2020-12-10 Thread Linjie Fu
Hi Guangxin, On Sun, Nov 15, 2020 at 11:07 AM Xu Guangxin wrote: > > you can download it from: > https://www.itu.int/wftp3/av-arch/jctvc-site/bitstream_exchange/draft_conformance/RExt/WPP_HIGH_TP_444_8BIT_RExt_Apple_2.zip > > Signed-off-by: Xu Guangxin > --- > tests/fate/hevc.mak

Re: [FFmpeg-devel] [PATCH v3 1/2] lavf/qsv: Add functions to print mfx iopattern, warning and error

2020-12-10 Thread Linjie Fu
On Thu, Dec 10, 2020 at 1:50 PM Haihao Xiang wrote: > > It is a copy of the relevant part in lavc/qsv. > > Signed-off-by: Haihao Xiang > --- > To avoid duplicated tables in the same library after applying patch ' > lavc/qsv: make some functions inline', use a local copy of the relevant > code in

Re: [FFmpeg-devel] [PATCH 1/2] qsvdec: factor common options out

2020-12-10 Thread Linjie Fu
On Thu, Nov 26, 2020 at 1:30 PM Haihao Xiang wrote: > > --- > libavcodec/qsvdec.h | 13 + > libavcodec/qsvdec_h2645.c | 12 ++-- > libavcodec/qsvdec_other.c | 6 +- > 3 files changed, 16 insertions(+), 15 deletions(-) > > diff --git a/libavcodec/qsvdec.h

Re: [FFmpeg-devel] [PATCH] libavcodec/qsvenc: add low latency P-pyramid support for qsv

2020-12-09 Thread Linjie Fu
On Thu, Dec 10, 2020 at 2:07 PM wrote: > > From: Wenbinc-Bin > > Add low latency P-pyramid support for qsv, and it relates to a new > command line parameter "-p_strategy". To enable this flag, user also > need to set "-bf" to -1 or 0. IMO correcting the related options and prompting a warning

Re: [FFmpeg-devel] [PATCH] avcodec/libkvazaar: Set default ratecontrol algorithm for libkvazaar

2020-12-09 Thread Linjie Fu
On Thu, Dec 10, 2020 at 2:09 PM Joose Sainio wrote: > > The standalone version of Kvazaar sets a default ratecontrol algorithm when > bitrate is set. Mirror this behaviour. > > Signed-off-by: Joose Sainio > --- > libavcodec/libkvazaar.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff

[FFmpeg-devel] [PATCH v3 5/8] lavc/hevcdec: Fix the parsing for use_integer_mv_flag

2020-12-07 Thread Linjie Fu
From: Linjie Fu According to 7.3.6.1, use_integer_mv_flag should be parsed if motion_vector_resolution_control_idc equals to 2. Otherwise wrong parameters in the subsequent parsing procedures would be got. Signed-off-by: Linjie Fu --- libavcodec/hevcdec.c | 8 libavcodec/hevcdec.h

Re: [FFmpeg-devel] [PATCH v2 0/7] HEVC native support for Screen content coding

2020-12-07 Thread Linjie Fu
support could be accessed in: > > https://github.com/intel-media-ci/ffmpeg/pull/231 > > > > The VAAPI part would be provided later once the implementations of > > native parsing and reference management are all decent. > > > > Linjie Fu (7): > >lavc/avcodec: Add

[FFmpeg-devel] [PATCH v3 4/8] lavc/hevc_ps: Add slice parse support for HEVC SCC extension

2020-12-07 Thread Linjie Fu
From: Linjie Fu Signed-off-by: Linjie Fu --- libavcodec/hevcdec.c | 6 ++ libavcodec/hevcdec.h | 4 2 files changed, 10 insertions(+) diff --git a/libavcodec/hevcdec.c b/libavcodec/hevcdec.c index 699c13bbcc..7074a0760a 100644 --- a/libavcodec/hevcdec.c +++ b/libavcodec/hevcdec.c

[FFmpeg-devel] [PATCH v3 0/8] HEVC native support for Screen content coding

2020-12-07 Thread Linjie Fu
mail threads. Previous comments: https://www.mail-archive.com/ffmpeg-devel@ffmpeg.org/msg110151.html Linjie Fu (8): lavc/avcodec: Add FF_PROFILE_HEVC_SCC for screen content coding lavc/hevc_ps: Add sps parse support for HEVC SCC extension syntax lavc/hevc_ps: Add pps parse support for HEVC

[FFmpeg-devel] [PATCH v3 8/8] lavc/hevcdec: Prompt detailed logs for invalid PPS id

2020-12-07 Thread Linjie Fu
PPS id out of range: 0 After: PPS id out of range or empty pps_list[0]: 0 Since 0 is within the range of pps_id, it's more clear that there is an invalid pps_list. Signed-off-by: Linjie Fu --- libavcodec/hevc_parser.c | 2 +- libavcodec/hevcdec.c | 2 +- 2 files changed, 2 insertions(+),

[FFmpeg-devel] [PATCH v3 1/8] lavc/avcodec: Add FF_PROFILE_HEVC_SCC for screen content coding

2020-12-07 Thread Linjie Fu
From: Linjie Fu Signed-off-by: Linjie Fu --- libavcodec/avcodec.h | 1 + libavcodec/hevc_ps.c | 2 ++ libavcodec/profiles.c | 1 + 3 files changed, 4 insertions(+) diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h index 20af3ef00d..2e853bfdef 100644 --- a/libavcodec/avcodec.h +++ b

[FFmpeg-devel] [PATCH v3 7/8] lavc/hevc: Update reference list for SCC

2020-12-07 Thread Linjie Fu
according to 8-8/9/10. Add a check for native decoder to quit while self-referencing is detected, since it's not supported yet. Signed-off-by: Linjie Fu --- libavcodec/hevc_refs.c | 27 +-- libavcodec/hevcdec.c | 6 +- 2 files changed, 30 insertions(+), 3 deletion

[FFmpeg-devel] [PATCH v3 6/8] lavc/hevcdec: Set max_num_merge_cand to uint8_t

2020-12-07 Thread Linjie Fu
From: Linjie Fu uint8_t is big enough and keep consistent with the definition in cbs_h265.h. Signed-off-by: Linjie Fu --- libavcodec/hevcdec.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/hevcdec.h b/libavcodec/hevcdec.h index 1164af2862..464eb7cd3c 100644

[FFmpeg-devel] [PATCH v3 3/8] lavc/hevc_ps: Add pps parse support for HEVC SCC extension

2020-12-07 Thread Linjie Fu
From: Linjie Fu Signed-off-by: Linjie Fu Signed-off-by: Haihao Xiang --- libavcodec/hevc_ps.c | 70 +++- libavcodec/hevc_ps.h | 17 +++ 2 files changed, 86 insertions(+), 1 deletion(-) diff --git a/libavcodec/hevc_ps.c b/libavcodec/hevc_ps.c

[FFmpeg-devel] [PATCH v3 2/8] lavc/hevc_ps: Add sps parse support for HEVC SCC extension syntax

2020-12-07 Thread Linjie Fu
From: Linjie Fu According to 7.3.2.2.3 in T-REC-H.265-201911. Signed-off-by: Linjie Fu Signed-off-by: Haihao Xiang --- libavcodec/hevc.h| 3 +++ libavcodec/hevc_ps.c | 44 +--- libavcodec/hevc_ps.h | 15 +++ 3 files changed, 59

Re: [FFmpeg-devel] [PATCH v2 0/7] HEVC native support for Screen content coding

2020-11-19 Thread Linjie Fu
On Thu, Nov 19, 2020 at 5:50 AM Michael Niedermayer wrote: > On Thu, Oct 29, 2020 at 02:57:13PM +0100, Christophe Gisquet wrote: > > Hi, > > > > Le mar. 29 sept. 2020 à 17:55, Linjie Fu a > écrit : > > > I didn’t see such plans for now, hence adding suf

Re: [FFmpeg-devel] [PATCH 1/3] avfilter/vf_unsharp: add 10bit support

2020-10-29 Thread Linjie Fu
On Fri, Oct 30, 2020 at 9:18 AM wrote: > On Thu, Oct 29, 2020 at 09:09:00PM +0800, Linjie Fu wrote: > > On Thu, Oct 29, 2020 at 7:16 PM wrote: > > > > > From: Limin Wang > > > > > > Signed-off-by: Limin Wang > > > --- > > > liba

Re: [FFmpeg-devel] [PATCH 1/3] avfilter/vf_unsharp: add 10bit support

2020-10-29 Thread Linjie Fu
On Thu, Oct 29, 2020 at 7:16 PM wrote: > From: Limin Wang > > Signed-off-by: Limin Wang > --- > libavfilter/unsharp.h| 3 + > libavfilter/vf_unsharp.c | 162 > +-- > 2 files changed, 90 insertions(+), 75 deletions(-) > > diff --git

Re: [FFmpeg-devel] [PATCH] avcodec/hevcdec: constrained intra predict, do not check top left IS_INTRA if it's not available

2020-10-26 Thread Linjie Fu
On Mon, Oct 26, 2020 at 10:29 PM Guangxin Xu wrote: > The bug reporter confirmed the fix. > https://trac.ffmpeg.org/ticket/8932 > > ping for review and merge. > thanks > > On Fri, Oct 16, 2020 at 9:57 PM Xu Guangxin wrote: > > > fix ticket: 8932 > > > > For poc 2, we have tile boundary at x =

Re: [FFmpeg-devel] [PATCH v2 0/7] HEVC native support for Screen content coding

2020-09-29 Thread Linjie Fu
t; > > > > The full support could be accessed in: > > > https://github.com/intel-media-ci/ffmpeg/pull/231 > > > > > > The VAAPI part would be provided later once the implementations of > > > native parsing and reference management are all decent. > &

Re: [FFmpeg-devel] [PATCH] lavc/vaapi_encode_h265: fix max_transform_hierarchy_depth_inter/intra

2020-09-03 Thread Linjie Fu
> > Subject: Re: [FFmpeg-devel] [PATCH] lavc/vaapi_encode_h265: fix > > > max_transform_hierarchy_depth_inter/intra > > > > > > On 13/04/2020 05:32, Linjie Fu wrote: > > > > Set the max_transform_hierarchy_depth_inter/intra to 2 by default > > > > b

Re: [FFmpeg-devel] [PATCH] lavf/mux: allow unofficial extension by default for spatial data in mp4

2020-08-28 Thread Linjie Fu
On Fri, Aug 28, 2020 at 11:18 AM Linjie Fu wrote: > > Hi, > > On Fri, Aug 28, 2020 at 8:46 AM Andreas Rheinhardt > wrote: > > > > Linjie Fu: > > > Mp4 unofficial extension allows Stereo3D and Spherical Mapping data > > > in header if users expli

Re: [FFmpeg-devel] [PATCH] lavf/mux: allow unofficial extension by default for spatial data in mp4

2020-08-27 Thread Linjie Fu
Hi, On Fri, Aug 28, 2020 at 8:46 AM Andreas Rheinhardt wrote: > > Linjie Fu: > > Mp4 unofficial extension allows Stereo3D and Spherical Mapping data > > in header if users explicitly set "-strict unofficial" or values less > > than "-1". > > &

[FFmpeg-devel] [PATCH] lavf/mux: allow unofficial extension by default for spatial data in mp4

2020-08-27 Thread Linjie Fu
user uses streamcopy to get the same bitstreams. Spatial data missing in containers seems to cause troubles for the players like VLC while detecting the projection type for 360 video. Set the default value of "strict" to "unofficial" for mp4. Signed-off-by: Linjie Fu --- I would pr

[FFmpeg-devel] [PATCH, RFC] lavc/hevcdec: add invalid for skip_frame to skip invalid nalus before IRAP

2020-08-14 Thread Linjie Fu
time. [1] https://github.com/intel/media-driver/issues/992 Signed-off-by: Linjie Fu --- Request for comments: The purpose is to allow decoder to skip frames until an IRAP has arrived, however not sure whether we already had this in ffmpeg, hence submit a patch and request for comments. Skip logic

Re: [FFmpeg-devel] [PATCH v2 2/3] vaapi_encode: Rewrite slice/tile support

2020-08-14 Thread Linjie Fu
On Fri, Aug 14, 2020 at 5:51 AM Mark Thompson wrote: > > This precalculates all of the information we will need to define slice > and tile positions at init time rather than rebuilding some of it with > every slice. The control of tiles is generalised to match slices, so that > arbitrary tile

  1   2   3   4   5   >