[FFmpeg-devel] [PATCH v5 0/5] enhancement for libopenh264

2020-04-28 Thread Linjie Fu
Separate the set, and updated a v5 version as suggested. Linjie Fu (5): lavc/libopenh264enc: Add qmin/qmax support lavc/libopenh264enc: add default gop size and bit rate lavc/libopenh264enc: add bit rate control select support lavc/libopenh264enc: prompt slice number changing inside

[FFmpeg-devel] [PATCH v5 3/5] lavc/libopenh264enc: add bit rate control select support

2020-04-28 Thread Linjie Fu
1.4. Default to use RC_QUALITY_MODE. Signed-off-by: Linjie Fu --- libavcodec/libopenh264enc.c | 15 +++ 1 file changed, 15 insertions(+) diff --git a/libavcodec/libopenh264enc.c b/libavcodec/libopenh264enc.c index 0951412..93d3de2 100644 --- a/libavcodec/libopenh264enc.c +++ b

[FFmpeg-devel] [PATCH v5 2/5] lavc/libopenh264enc: add default gop size and bit rate

2020-04-28 Thread Linjie Fu
uched in libopenh264. Signed-off-by: Linjie Fu --- libavcodec/libopenh264enc.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/libavcodec/libopenh264enc.c b/libavcodec/libopenh264enc.c index 1b6b53a..0951412 100644 --- a/libavcodec/libopenh264enc.c +++ b/libav

[FFmpeg-devel] [PATCH v5 5/5] lavc/libopenh264enc: set slice_mode option to deprecated

2020-04-28 Thread Linjie Fu
ices. Add FF_API_OPENH264_SLICE_MODE macro to remove this option after LIBAVCODEC_VERSION_MAJOR = 59. Signed-off-by: Linjie Fu --- libavcodec/libopenh264enc.c | 7 +-- libavcodec/version.h| 3 +++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/libavcodec/libopenh

[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

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

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 al

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 > --- > libavfi

Re: [FFmpeg-devel] 4.4 Release Name

2021-04-02 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, D

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] [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] [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 pract

[FFmpeg-devel] [PATCH v6 4/5] lavc/libopenh264enc: prompt slice number changing inside libopenh264

2020-04-28 Thread Linjie Fu
Libopenh264enc would set the slice according to the number of cpu cores if uiSliceNum equals to 0 (auto) in SM_FIXEDSLCNUM_SLICE mode. Prompt a warning for user to catch this. Signed-off-by: Linjie Fu --- libavcodec/libopenh264enc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a

[FFmpeg-devel] [PATCH v6 5/5] lavc/libopenh264enc: set slice_mode option to deprecated

2020-04-28 Thread Linjie Fu
ices. Add FF_API_OPENH264_SLICE_MODE macro to remove this option after LIBAVCODEC_VERSION_MAJOR = 59. Signed-off-by: Linjie Fu --- libavcodec/libopenh264enc.c | 7 +-- libavcodec/version.h| 3 +++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/libavcodec/libopenh

[FFmpeg-devel] [PATCH v6 2/5] lavc/libopenh264enc: add default gop size and bit rate

2020-04-28 Thread Linjie Fu
uched in libopenh264. Signed-off-by: Linjie Fu --- libavcodec/libopenh264enc.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/libavcodec/libopenh264enc.c b/libavcodec/libopenh264enc.c index 265eb9c..245752d 100644 --- a/libavcodec/libopenh264enc.c +++ b/libav

[FFmpeg-devel] [PATCH v6 3/5] lavc/libopenh264enc: add bit rate control select support

2020-04-28 Thread Linjie Fu
RC_QUALITY_MODE. Signed-off-by: Linjie Fu --- libavcodec/libopenh264enc.c | 15 ++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/libavcodec/libopenh264enc.c b/libavcodec/libopenh264enc.c index 245752d..dc3bd53 100644 --- a/libavcodec/libopenh264enc.c +++ b/libavcodec

[FFmpeg-devel] [PATCH v6 1/5] lavc/libopenh264enc: Add qmin/qmax support

2020-04-28 Thread Linjie Fu
== CAMERA_VIDEO_REAL_TIME which is default. <https://github.com/cisco/openh264/blob/master/codec/encoder/core/src/encoder_ext.cpp#L375> Signed-off-by: Linjie Fu --- libavcodec/libopenh264enc.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/libavcodec/libopenh264enc.c b/liba

[FFmpeg-devel] [PATCH] MAINTAINERS: Add myself to libopenh264enc

2020-04-29 Thread Linjie Fu
Reviewed-by: Martin Storsjö Signed-off-by: Linjie Fu --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index 06956f8..96654f1 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -194,6 +194,7 @@ Codecs: libdavs2.cHuiwen Ren

[FFmpeg-devel] [PATCH, RFC] lavc/options_table: Add basic candidate h264 profiles

2020-05-05 Thread Linjie Fu
Allows specifying avctx->profile with string type profile for h264 encoders. Private field/option "profile" may be abled to be removed for basic h264 profiles, directly for encoders like libopenh264/h264_vaapi, or with an map to hardware profile like h264_qsv. Signed-off-by: Linji

[FFmpeg-devel] [PATCH v5 3/3] lavc/libopenh264enc: Add coder option to replace cabac

2020-05-06 Thread Linjie Fu
ion after LIBAVCODEC_VERSION_MAJOR = 59. Signed-off-by: Linjie Fu --- libavcodec/libopenh264enc.c | 40 + libavcodec/version.h| 3 +++ 2 files changed, 30 insertions(+), 13 deletions(-) diff --git a/libavcodec/libopenh264enc.c b/libavcodec/libopen

[FFmpeg-devel] [PATCH v5 2/3] lavc/libopenh264enc: Allow specifying the profile through AVCodecContext

2020-05-06 Thread Linjie Fu
And determine the profile with following priority: 1. s->profile; then 2. avctx->profile; then 3. s->cabac; then 4. a default profile. This seems more natural in case user somehow sets both avctx->profile and s->profile. Signed-off-by: Linjie Fu --- libavcodec/libope

[FFmpeg-devel] [PATCH v5 1/3] lavc/libopenh264enc: Rewrite profile handling

2020-05-06 Thread Linjie Fu
Support the profiles "constrained_baseline" and "high" for libopenh264 version >= 1.8, support "constrained_baseline" and "main" for earlier version. If option not supported with current version, convert to constrained baseline with a warning for users.

[FFmpeg-devel] [PATCH 1/2] lavc/hevc: Add poc_msb_present filed in LongTermRPS

2020-05-12 Thread Linjie Fu
From: Xu Guangxin delta_poc_msb_present_flag is needed in find_ref_idx() to indicate whether MSB of POC should be taken into account. Details in 8.3.2. Signed-off-by: Xu Guangxin Signed-off-by: Linjie Fu --- libavcodec/hevc_ps.h | 1 + libavcodec/hevcdec.c | 5 ++--- 2 files changed, 3

[FFmpeg-devel] [PATCH 2/2] lavc/hevc_refs: Fix the logic of find_ref_idx()

2020-05-12 Thread Linjie Fu
EVC decoder and integrated HW decoders. Signed-off-by: Linjie Fu --- Since it's kind of difficult to generate an identical bitstream for fate or test, I'd like to elaborate more about one of the failures: requested POC = 5; LtMask = (1 << 4) - 1 = 15; ref[0]->poc =

[FFmpeg-devel] [PATCH v2 1/4] lavc/vaapi_encode: add EQUAL_MULTI_ROWS support for slice structure

2020-05-12 Thread Linjie Fu
slice encoding for VAEntrypointEncSliceLP. [1]<https://github.com/intel/libva/commit/0e6d5441f19bdc674b4da3169d614d10fd644778> Signed-off-by: Linjie Fu --- libavcodec/vaapi_encode.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libavcodec/vaapi_encode.c b/libavcodec/vaapi_encode.c in

[FFmpeg-devel] [PATCH v2 2/4] lavc/vaapi_encode: wrap slice codes into row slice functions

2020-05-12 Thread Linjie Fu
Wrap current whole-row slice codes into following functions: - vaapi_encode_make_row_slice() - vaapi_encode_init_row_slice_structure() Signed-off-by: Linjie Fu --- libavcodec/vaapi_encode.c | 190 ++ 1 file changed, 109 insertions(+), 81 deletions

[FFmpeg-devel] [PATCH] lavc/vaapi_hevc: add missing max_8bit_constraint_flag

2020-05-12 Thread Linjie Fu
This is accidentally missed while rebasing. Signed-off-by: Linjie Fu --- libavcodec/vaapi_hevc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavcodec/vaapi_hevc.c b/libavcodec/vaapi_hevc.c index c83d481..9083331 100644 --- a/libavcodec/vaapi_hevc.c +++ b/libavcodec/vaapi_hevc.c

[FFmpeg-devel] [PATCH v2 3/4] lavc/vaapi_encode: add tile slice encoding support

2020-05-12 Thread Linjie Fu
tile encoding is supposed to be supported with the the capability of ARBITRARY_MACROBLOCKS slice structures. N X 1 tile encoding should also work in ARBITRARY_ROWS slice structure. Signed-off-by: Linjie Fu --- libavcodec/vaapi_encode.c | 128

[FFmpeg-devel] [PATCH v2 4/4] lavc/vaapi_encode_h265: add h265 tile encoding support

2020-05-12 Thread Linjie Fu
Signed-off-by: Linjie Fu --- doc/encoders.texi | 13 + libavcodec/vaapi_encode_h265.c | 38 +- 2 files changed, 50 insertions(+), 1 deletion(-) diff --git a/doc/encoders.texi b/doc/encoders.texi index aa3a6ee..ea4ae28 100644 --- a/doc

[FFmpeg-devel] [PATCH] lavc/vaapi_encode: Convert P to B-frames if driver doesn't support

2020-06-01 Thread Linjie Fu
version, convert P to B by default for low power mode to avoid unexpected errors. Signed-off-by: Linjie Fu --- Since the query support is ready in LIBVA and media-driver, this patch is now ready for upstream: https://github.com/intel/libva/commit/0014ada0eb0fd09a0dd928e5a132ecf12ed85c2e https

[FFmpeg-devel] [PATCH 2/3] fftools/ffmpeg: check caps of encoders for encoding with variable dimension

2020-06-08 Thread Linjie Fu
This ensures that an encoder is able to cope with input frames with resolution changing only if it declares the capability of AV_CODEC_CAP_VARIABLE_DIMENSIONS. Signed-off-by: Linjie Fu --- fftools/ffmpeg.c | 9 + 1 file changed, 9 insertions(+) diff --git a/fftools/ffmpeg.c b/fftools

[FFmpeg-devel] [PATCH 1/3] lavc/avcodec: Add caps for the support of variable dimension encoding

2020-06-08 Thread Linjie Fu
And declare AV_CODEC_CAP_VARIABLE_DIMENSIONS for rawvideo and wrapped_avframe. Signed-off-by: Linjie Fu --- doc/APIchanges | 3 +++ fftools/cmdutils.c | 2 ++ libavcodec/avcodec.h | 4 +++- libavcodec/codec.h | 5 + libavcodec/rawenc.c | 1

[FFmpeg-devel] [PATCH 3/3] fftools/ffmpeg_filter: add -autoscale to disable/enable the default scale

2020-06-08 Thread Linjie Fu
ed-by: Nicolas George Signed-off-by: U. Artie Eoff Signed-off-by: Linjie Fu --- doc/ffmpeg.texi | 16 fftools/ffmpeg.h| 3 +++ fftools/ffmpeg_filter.c | 2 +- fftools/ffmpeg_opt.c| 6 ++ 4 files changed, 22 insertions(+), 5 deletions(-) diff --git

Re: [FFmpeg-devel] [PATCH 1/3] lavc/avcodec: Add caps for the support of variable dimension encoding

2020-06-08 Thread Linjie Fu
> From: "Anton Khirnov" > Sent Time: 2020-06-08 18:50:43 (Monday) > To: "FFmpeg development discussions and patches" > Cc: > Subject: Re: [FFmpeg-devel] [PATCH 1/3] lavc/avcodec: Add caps for the > supportof variable dimension encoding >

[FFmpeg-devel] [PATCH 4/5] fftools/ffmpeg: flush and recreate encoder instance if resolution changes

2020-06-09 Thread Linjie Fu
Signed-off-by: Linjie Fu --- Should be squashed with: https://patchwork.ffmpeg.org/project/ffmpeg/list/?series=1434 fftools/ffmpeg.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c index 5859781..8cdd532 100644 --- a/fftools/ffmpeg.c +++ b

[FFmpeg-devel] [PATCH 5/5] lavc/encoder: declare caps for encoding with variable dimension

2020-06-09 Thread Linjie Fu
Signed-off-by: Linjie Fu --- This patch is for RFC: Did some tests on some of the encoders and find some encoders not suitable for now, hence didn't declare the caps for them: 1. libx264: seems have frame drop. 2. hardware encoders like vaapi: failed. Hence before we got all encoders supp

[FFmpeg-devel] [PATCH v2 4/5] fftools/ffmpeg: flush and recreate encoder instance if resolution changes

2020-06-11 Thread Linjie Fu
Add recreate_encoder_instance() function. If resolution changing is allowed, discard AV_CODEC_FLAG_GLOBAL_HEADER even if the avformat/container declares AVFMT_GLOBALHEADER flag. Place header information in every keyframe instead of single global header. Signed-off-by: Linjie Fu --- Should be

[FFmpeg-devel] [PATCH v2 5/5] lavc/encoder: declare caps for encoding with variable dimension

2020-06-11 Thread Linjie Fu
Signed-off-by: Linjie Fu --- Tested following encoders with container muxer(like mp4 muxer for x264, which previously use extradata to store a global header) and raw video muxer, results are good. libavcodec/libopenh264enc.c | 4 +++- libavcodec/libvpxenc.c | 4 +++- libavcodec/libx264.c

Re: [FFmpeg-devel] [PATCH v2 1/4] lavc/vaapi_encode: add EQUAL_MULTI_ROWS support for slice structure

2020-06-17 Thread Linjie Fu
On Tue, May 12, 2020 at 9:49 PM Linjie Fu wrote: > > VA_ENC_SLICE_STRUCTURE_EQUAL_MULTI_ROWS is added to in the latest > libva (1.8.0) which matches the hardware behaviour: > > /** \brief Driver supports any number of rows per slice but they must be the > same > * for

[FFmpeg-devel] [PATCH] lavc/qsvdec: fix the regression on linux for init_hw_device

2019-09-02 Thread Linjie Fu
play inside MSDK library on Linux." Details in ticket #7030 and issue in MSDK: https://github.com/Intel-Media-SDK/MediaSDK/issues/1611 Signed-off-by: Linjie Fu --- libavcodec/qsvdec.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavcodec/qsvdec.c b/libavcodec/qsvdec.c index ee

[FFmpeg-devel] [PATCH] swscale/output: fix some code indentations

2019-09-04 Thread Linjie Fu
Signed-off-by: Linjie Fu --- libswscale/output.c | 70 ++--- 1 file changed, 35 insertions(+), 35 deletions(-) diff --git a/libswscale/output.c b/libswscale/output.c index 26b0ff3..7eb4644 100644 --- a/libswscale/output.c +++ b/libswscale/output.c

[FFmpeg-devel] [PATCH 1/2] lavu/pixfmt: add 4:2:2 10 bit pixel format Y210

2019-09-06 Thread Linjie Fu
Add support for packed 4:2:2 10 bit pixel format Y210. It is the format that VAAPI/QSV uses when coping with 4:2:2 10bit surfaces. Signed-off-by: Linjie Fu --- libavutil/pixdesc.c | 23 +++ libavutil/pixfmt.h | 4 libavutil/version.h | 2 +- 3 files changed, 28

[FFmpeg-devel] [PATCH 2/2] swscale: Add swscale input support for Y210

2019-09-06 Thread Linjie Fu
Make it possible to convert Y210 to other pixel format. Also add query support in fate. Signed-off-by: Linjie Fu --- libswscale/input.c | 47 libswscale/utils.c | 2 ++ tests/ref/fate/sws-pixdesc-query | 7 ++ 3 files

[FFmpeg-devel] [PATCH 1/6] lavu/pixfmt: add new pixel format ayuv/y210/y410

2019-09-10 Thread Linjie Fu
Add some packed pixel formats for hardware decode support in VAAPI and QSV: 4:2:2 10 bit: Y210 4:4:4 8 bit: AYUV 4:4:4 10 bit: Y410 Signed-off-by: Linjie Fu --- libavutil/pixdesc.c | 62 +++ libavutil/pixfmt.h| 9

[FFmpeg-devel] [PATCH 2/6] swscale: add swscale support for 422/444 decode outputs

2019-09-10 Thread Linjie Fu
Signed-off-by: Linjie Fu --- libswscale/input.c | 74 libswscale/output.c | 50 +++ libswscale/utils.c | 3 +++ libswscale/version.h | 2 +- 4 files changed, 128 insertions(+), 1 deletion(-) diff --git a

[FFmpeg-devel] [PATCH 3/6] fate: add tests support for AYUV/Y210/Y410

2019-09-10 Thread Linjie Fu
Signed-off-by: Linjie Fu --- tests/ref/fate/filter-pixdesc-ayuv | 1 + tests/ref/fate/filter-pixfmts-copy | 1 + tests/ref/fate/filter-pixfmts-crop | 1 + tests/ref/fate/filter-pixfmts-field | 1 + tests/ref/fate/filter-pixfmts-fieldorder | 1 + tests/ref/fate/filter

[FFmpeg-devel] [PATCH 4/6] lavu/hwcontext_vaapi: add vaapi_format_map support for AYUV/Y210/Y410

2019-09-10 Thread Linjie Fu
There is no VA_RT_FORMAT_AYUV in defined in libva, and currently in media-driver, VA_FOURCC_AYUV is used to represent VA_RT_FORMAT_AYUV. Another patch could be sent to refine the code after this issue is addressed: https://github.com/intel/libva/issues/335 Signed-off-by: Linjie Fu

[FFmpeg-devel] [PATCH 5/6] lavc/qsv: add pixfmt fourcc map for AYUV/Y210/Y410

2019-09-10 Thread Linjie Fu
Signed-off-by: Linjie Fu --- libavcodec/qsv.c | 15 +++ 1 file changed, 15 insertions(+) diff --git a/libavcodec/qsv.c b/libavcodec/qsv.c index 65ad070..adfe09a 100644 --- a/libavcodec/qsv.c +++ b/libavcodec/qsv.c @@ -218,6 +218,9 @@ enum AVPixelFormat ff_qsv_map_fourcc(uint32_t

[FFmpeg-devel] [PATCH 6/6] lavu/hwcontext_qsv: add frame map support for HEVC rext support

2019-09-10 Thread Linjie Fu
Signed-off-by: Linjie Fu --- libavutil/hwcontext_qsv.c | 25 + 1 file changed, 25 insertions(+) diff --git a/libavutil/hwcontext_qsv.c b/libavutil/hwcontext_qsv.c index 0329a81..7f8f2de 100644 --- a/libavutil/hwcontext_qsv.c +++ b/libavutil/hwcontext_qsv.c @@ -103,6

[FFmpeg-devel] [PATCH] qsv: get FrameInfo.Shift by desc->comp[0].shift

2019-09-10 Thread Linjie Fu
Since Y410 is a pixel format with depth > 8 but shift = 0, get Shift info by depth is not quite accurate. Signed-off-by: Linjie Fu --- libavcodec/qsvenc.c | 4 ++-- libavutil/hwcontext_qsv.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/libavcodec/qsvenc.

[FFmpeg-devel] [PATCH, v2 1/6] lavu/pixfmt: add new pixel format ayuv/y210/y410

2019-09-11 Thread Linjie Fu
: AYUV 4:4:4 10 bit: Y410 Signed-off-by: Linjie Fu --- libavutil/pixdesc.c | 62 +++ libavutil/pixfmt.h| 9 +++ libavutil/tests/pixfmt_best.c | 1 + libavutil/version.h | 2 +- 4 files changed, 73 insertions(+), 1

[FFmpeg-devel] [PATCH 1/3] lavu/pixfmt: add new pixel format ayuv/y210/y410

2019-09-16 Thread Linjie Fu
: AYUV 4:4:4 10 bit: Y410 Add query support in fate. Signed-off-by: Linjie Fu --- libavutil/pixdesc.c | 62 libavutil/pixfmt.h | 9 ++ libavutil/version.h | 2 +- tests/ref/fate/sws-pixdesc-query | 19

[FFmpeg-devel] [PATCH 3/3] swscale: Add swscale input support for Y210

2019-09-16 Thread Linjie Fu
Add swscale input support for Y210, output support and fate test could be added later if there is requirement for software CSC to this packed format. Signed-off-by: Linjie Fu --- libswscale/input.c | 36 libswscale/utils.c | 2 ++ 2 files changed, 38

[FFmpeg-devel] [PATCH 2/3] swscale: Add swscale and fate support for AYUV

2019-09-16 Thread Linjie Fu
Add input and output support in swscale for AYUV. Add fate test for AYUV. Signed-off-by: Linjie Fu --- libavutil/tests/pixfmt_best.c| 1 + libswscale/input.c | 26 + libswscale/output.c | 50

[FFmpeg-devel] [PATCH 1/5] lavc/vaapi_hevc: extend parameter buffer to ParameterBufferHEVCExtension

2019-09-16 Thread Linjie Fu
Extend ParameterBufferHEVC to ParameterBufferHEVCExtension for both VAPicture and VASlice. Pass Range Extension flags to support the decode for HEVC REXT. Separate the behaviour of ff_vaapi_decode_make_slice_buffer for base and rext to avoid potential regression. Signed-off-by: Linjie Fu

[FFmpeg-devel] [PATCH 2/5] lavc/hevc_ps: parse constraint flags for HEVC REXT

2019-09-16 Thread Linjie Fu
Parse all the constraint flags according to ITU-T Rec. H.265 (02/2018). It can be passed to hw decoders to determine the exact profile for Range Extension HEVC. Signed-off-by: Linjie Fu --- libavcodec/hevc_ps.c | 44 libavcodec/hevc_ps.h | 13

[FFmpeg-devel] [PATCH 3/5] lavc/vaapi_hevc: add function to find exact va_profile for REXT

2019-09-16 Thread Linjie Fu
Add vaapi_parse_rext_profile and use profile constraint flags to determine the exact va_profile for HEVC_REXT. Add build object in Makefile for h265_profile_level dependency. Signed-off-by: Linjie Fu --- libavcodec/Makefile | 2 +- libavcodec/vaapi_hevc.c | 69

[FFmpeg-devel] [PATCH 4/5] lavc/vaapi_decode: add profile_parser and format map support for HEVC REXT

2019-09-16 Thread Linjie Fu
Add function pointer field in vaapi_profile_map[], set profile_parser for HEVC_REXT to find the exact va_profile. Also add format map support. Signed-off-by: Linjie Fu --- libavcodec/vaapi_decode.c | 83 ++- 1 file changed, 53 insertions(+), 30

[FFmpeg-devel] [PATCH 5/5] lavc/hevcdec: add VAAPI decode support for HEVC Rext

2019-09-16 Thread Linjie Fu
Add decode support for 422/444, 8/10bit HEVC REXT clips. Signed-off-by: Linjie Fu --- libavcodec/hevcdec.c | 18 +- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/libavcodec/hevcdec.c b/libavcodec/hevcdec.c index eed0319..f1ff177 100644 --- a/libavcodec/hevcdec.c

[FFmpeg-devel] [PATCH, v2 3/3] swscale: Add swscale input support for Y210

2019-09-18 Thread Linjie Fu
Add swscale input support for Y210, output support and fate test could be added later if there is requirement for software CSC to this packed format. Signed-off-by: Linjie Fu --- libswscale/input.c | 48 libswscale/utils.c | 2 ++ 2 files

[FFmpeg-devel] [PATCH, v2] lavf/vf_deinterlace_vaapi: flush queued frame for field in DeinterlacingBob

2019-09-18 Thread Linjie Fu
cel_device /dev/dri/renderD128 -hwaccel_output_format vaapi -i input.h264 -an -vf deinterlace_vaapi=mode=bob:rate=field -f null - Signed-off-by: Linjie Fu --- libavfilter/vf_deinterlace_vaapi.c | 44 -- 1 file changed, 38 insertions(+), 6 deletion

[FFmpeg-devel] [PATCH] lavc/vaapi_decode: Add 4:4:4 8/10 bit decode support for VP9

2019-09-19 Thread Linjie Fu
Add decode support for VP9 4:4:4 8 bit and 10 bit. Supported since ICL. Signed-off-by: Linjie Fu --- libavcodec/vaapi_decode.c | 2 ++ libavcodec/vp9.c | 6 ++ 2 files changed, 8 insertions(+) diff --git a/libavcodec/vaapi_decode.c b/libavcodec/vaapi_decode.c index 69512e1

[FFmpeg-devel] [PATCH] lavc/vaapi_encode: remove consistency check of depth for each component

2019-09-24 Thread Linjie Fu
Previously, consistency check of depth is introduced to make sure each component of the pixel format has the same depth. Since Y410(with a different depth in alpha channel) is supported for ICL+, this check should be removed to make the encoder work. Signed-off-by: Linjie Fu --- libavcodec

[FFmpeg-devel] [PATCH, v2] lavc/qsvdec: Add GPU-accelerated memory copy support

2019-09-26 Thread Linjie Fu
-gpu_copy on -i input.h264 -f null - or: ffmpeg -c:v h264_qsv -gpu_copy on -i input.h264 -f null - Signed-off-by: Linjie Fu Signed-off-by: ChaoX A Liu --- Rebased and send again. libavcodec/qsv.c | 31 +--- libavcodec/qsv_internal.h | 7

[FFmpeg-devel] [PATCH, v2] lavu/hwcontext_vaapi: add vaapi_format_map support for AYUV/Y210/Y410

2019-09-26 Thread Linjie Fu
VA_RT_FORMAT describes the desired sampling format for surface. Add vaapi_format_map support for new pixel formats. Signed-off-by: Linjie Fu --- This patch is part of the HEVC Rext support for qsv and vaapi, refined and resent separately. libavutil/hwcontext_vaapi.c | 7 +++ 1 file

[FFmpeg-devel] [PATCH, v3] lavc/qsvdec: Add GPU-accelerated memory copy support

2019-09-29 Thread Linjie Fu
input.h264 -f null - or: ffmpeg -c:v h264_qsv -gpu_copy on -i input.h264 -f null - Signed-off-by: Linjie Fu Signed-off-by: ChaoX A Liu --- libavcodec/qsv.c | 31 +++--- libavcodec/qsv_internal.h | 7 ++--- libavcodec/qsvdec.c | 54

[FFmpeg-devel] [PATCH, v4] lavc/qsvdec: Add GPU-accelerated memory copy support

2019-10-08 Thread Linjie Fu
input.h264 -f null - or: ffmpeg -c:v h264_qsv -gpu_copy on -i input.h264 -f null - Signed-off-by: Linjie Fu Signed-off-by: ChaoX A Liu --- [v4]: add an assert check. libavcodec/qsv.c | 31 ++-- libavcodec/qsv_internal.h | 7 +++-- libavcodec/qsvdec.c | 60

[FFmpeg-devel] [PATCH] lavc/qsvenc: Fix bitrate_limit to allow AVC encode in limited bitrate

2019-10-15 Thread Linjie Fu
to TargetKbps by default. 1080P AVC encoding with option "-bitrate_limit 0 -b:v 100k": Before patch: 902 kbps After patch: 156 kbps Signed-off-by: Linjie Fu --- libavcodec/qsvenc.c | 38 +++--- 1 file changed, 19 insertions(+), 19 delet

[FFmpeg-devel] [PATCH] lavc/qsvdec: remove unused check_dec_param

2019-10-18 Thread Linjie Fu
Signed-off-by: Linjie Fu --- libavcodec/qsvdec.c | 27 --- 1 file changed, 27 deletions(-) diff --git a/libavcodec/qsvdec.c b/libavcodec/qsvdec.c index ae5023989c..0d34021b42 100644 --- a/libavcodec/qsvdec.c +++ b/libavcodec/qsvdec.c @@ -164,33 +164,6 @@ static inline

[FFmpeg-devel] [PATCH] lavc/qsv: improve the default GPU memory usage

2019-10-31 Thread Linjie Fu
-look_ahead_depth 50 -y output.h264 Fix #7943. Reported-by: Eero T Signed-off-by: Linjie Fu --- fftools/ffmpeg_qsv.c | 2 +- libavcodec/qsvdec.c | 5 - libavcodec/qsvenc_h264.c | 4 ++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/fftools/ffmpeg_qsv.c b/fftools

[FFmpeg-devel] [PATCH] lavc/vaapi_decode: Set surfaces reference pool size according to SPS for H.264/HEVC

2019-11-05 Thread Linjie Fu
-i bbb_sunflower_1080p_30fps_normal.mp4 -f null - Source: https://download.blender.org/demo/movies/BBB/ GEM Object memory usage: watch cat /sys/kernel/debug/dri/0/i915_gem_objects Before: ~112M After: ~80M Signed-off-by: Linjie Fu --- libavcodec/vaapi_decode.c | 39

[FFmpeg-devel] [PATCH] lavc/vaapi_encode: Async the encoding and output procedure of encoder

2019-11-07 Thread Linjie Fu
pi -i bbb_sunflower_1080p_30fps_normal.mp4 -c:v h264_vaapi -f h264 -y /dev/null Source: https://download.blender.org/demo/movies/BBB/ Before: ~164 fps After: ~198 fps Fix #7706. Signed-off-by: Linjie Fu --- libavcodec/vaapi_encode.c | 27 +++ 1 file changed, 19 insertions(

[FFmpeg-devel] [PATCH] lavc/qsv: Standardize some usages of ff_qsv_print_error

2019-11-11 Thread Linjie Fu
ff_qsv_print_error would output the ":" and "\n" internally in the function. Signed-off-by: Linjie Fu --- libavcodec/qsv.c| 2 +- libavcodec/qsvdec.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libavcodec/qsv.c b/libavcodec/qsv.c index b0

[FFmpeg-devel] [PATCH] lavc/vaapi_encode: reconfigure sequence parameter in case it changes

2019-11-13 Thread Linjie Fu
Aspect ratio change should be preserved in the output result of transcoding. A better choice is to reconfigure when parameter changing is detected, but a fix to reconfigure on IDR frame is simple and effective with no performance drop. Fix #6276 for VAAPI. Signed-off-by: Linjie Fu

[FFmpeg-devel] [PATCH] lavc/qsvenc: Fix some code indentations

2019-11-25 Thread Linjie Fu
Signed-off-by: Linjie Fu --- libavcodec/qsvenc.c | 8 libavcodec/qsvenc.h | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/libavcodec/qsvenc.c b/libavcodec/qsvenc.c index 93d49ba..e176d57 100644 --- a/libavcodec/qsvenc.c +++ b/libavcodec/qsvenc.c @@ -764,10 +764,10

[FFmpeg-devel] [PATCH] lavc/qsvenc: add Tiles encode support for HEVC

2019-11-25 Thread Linjie Fu
run time. Fix the enhancement #8400. Signed-off-by: Linjie Fu --- libavcodec/qsvenc.c | 32 +++- libavcodec/qsvenc.h | 7 +++ libavcodec/qsvenc_hevc.c | 3 +++ 3 files changed, 41 insertions(+), 1 deletion(-) diff --git a/libavcodec/qsvenc.c b

[FFmpeg-devel] [PATCH] libavformat/utils: Fix code indentation

2019-12-01 Thread Linjie Fu
Introduced since 077939626eeaa0c1364065414c18ab9b3a072281. Signed-off-by: Linjie Fu --- libavformat/utils.c | 22 +++--- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/libavformat/utils.c b/libavformat/utils.c index 8196442..4d18880 100644 --- a/libavformat

[FFmpeg-devel] [PATCH 0/7] Add decoding/encoding support for QSV HEVC REXT

2019-12-04 Thread Linjie Fu
Add decoding support for: 4:2:2 8 bit: yuyv422 4:2:2 10 bit:y210 4:4:4 8 bit:0yuv 4:4:4 10 bit:y410 Add encoding support for: 4:4:4 8 bit:0yuv 4:4:4 10 bit:y410 Linjie Fu (7): lavu/pixfmt: add new pixel format 0yuv/y210/y410 swscale: Add swscale

[FFmpeg-devel] [PATCH, v3, 2/7] swscale: Add swscale and fate support for 0YUV

2019-12-04 Thread Linjie Fu
Add input and output support in swscale for 0YUV. Since AV_PIX_FMT_0RGB would be treated as AV_PIX_FMT_ARGB, the default X(0) channel for 0YUV is set to 0xFF as well. Add fate test for 0YUV. Signed-off-by: Linjie Fu --- libswscale/input.c | 25

[FFmpeg-devel] [PATCH, v3, 1/7] lavu/pixfmt: add new pixel format 0yuv/y210/y410

2019-12-04 Thread Linjie Fu
: 0YUV 4:4:4 10 bit: Y410 Add query support in fate and update the minor version. Signed-off-by: Linjie Fu --- libavutil/pixdesc.c | 60 libavutil/pixfmt.h | 9 ++ libavutil/version.h | 4 +-- tests/ref/fate

[FFmpeg-devel] [PATCH, v3, 3/7] swscale: Add swscale input support for Y210

2019-12-04 Thread Linjie Fu
Add swscale input support for Y210, output support and fate test could be added later if there is requirement for software CSC to this packed format. Signed-off-by: Linjie Fu --- libswscale/input.c | 48 libswscale/utils.c | 2 ++ 2 files

[FFmpeg-devel] [PATCH, 4/7] lavu/hwcontext_vaapi: add vaapi_format_map support for 0YUV/Y210/Y410

2019-12-04 Thread Linjie Fu
pixel_format. This is fundamental for both VA-API and QSV. Signed-off-by: Linjie Fu --- libavutil/hwcontext_vaapi.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/libavutil/hwcontext_vaapi.c b/libavutil/hwcontext_vaapi.c index cf11764..296234b 100644 --- a/libavutil/hwcontext_vaapi.c

[FFmpeg-devel] [PATCH, v3, 5/7] qsv: get FrameInfo.Shift by desc->comp[0].shift

2019-12-04 Thread Linjie Fu
Since Y410 is a pixel format with depth > 8 but shift = 0, get Shift info by depth is not quite accurate. Signed-off-by: Linjie Fu --- libavcodec/qsvenc.c | 4 ++-- libavutil/hwcontext_qsv.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/libavcodec/qsvenc.

[FFmpeg-devel] [PATCH 6/7] lavc/qsv: Add decoding support for HEVC Range Extension

2019-12-04 Thread Linjie Fu
Add some pix_fmt, fourcc and frame map support for new pixel formats. This enables decoding support for HEVC Range Extension. 4:2:2 8 bit: yuyv422 4:2:2 10 bit:y210 4:4:4 8 bit:0yuv 4:4:4 10 bit:y410 Signed-off-by: Linjie Fu --- libavcodec/qsv.c | 26

[FFmpeg-devel] [PATCH 7/7] lavc/qsvenc: Add support for 4:4:4 8/10 bit HEVC REXT encoding

2019-12-04 Thread Linjie Fu
-low_power 1 -y ./qsv_444_10.h265 Signed-off-by: Linjie Fu --- libavcodec/qsvenc.c | 4 +++- libavcodec/qsvenc_hevc.c | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/libavcodec/qsvenc.c b/libavcodec/qsvenc.c index 2068853..f0c06fb 100644 --- a/libavcodec/qsvenc.c +++ b

Re: [FFmpeg-devel] [PATCH] lavc/qsvenc: add Tiles encode support for HEVC

2019-12-06 Thread linjie fu
; Subject: Re: [FFmpeg-devel] [PATCH] lavc/qsvenc: add Tiles encode support > > for HEVC > > > > Linjie Fu 于2019年11月26日周二 下午12:04写道: > > > > > > Add -tile_rows and -tile_cols option to specify the number of tile rows > > > and columns for ICL+ (gen 11) p

[FFmpeg-devel] [PATCH 1/4] tests/checkasm: add overflow test for hevc_add_res

2019-12-11 Thread Linjie Fu
-off-by: Xu Guangxin Signed-off-by: Linjie Fu --- tests/checkasm/hevc_add_res.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/checkasm/hevc_add_res.c b/tests/checkasm/hevc_add_res.c index e92c6b4..a6e3b8a 100644 --- a/tests/checkasm/hevc_add_res.c +++ b/tests/checkasm/hevc_add_res.c

[FFmpeg-devel] [PATCH 2/4] lavc/x86/hevc_add_res: Fix overflow in ADD_RES_MMX_4_8

2019-12-11 Thread Linjie Fu
: - hevc_add_res.add_residual [OK] hevc_add_res_4x4_8_mmxext: 15.0 Signed-off-by: Xu Guangxin Signed-off-by: Linjie Fu --- libavcodec/x86/hevc_add_res.asm | 23 +++ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/libavcodec/x86/hevc_add_res.asm b/libavcodec/x86

[FFmpeg-devel] [PATCH 4/4] lavc/x86/hevc_add_res: Fix coeff overflow in ADD_RES_SSE_16_32_8

2019-12-11 Thread Linjie Fu
Add overflow test case: - hevc_add_res.add_residual [FAILED] After: - hevc_add_res.add_residual [OK] hevc_add_res_32x32_8_sse2: 126.8 hevc_add_res_32x32_8_avx: 128.3 hevc_add_res_32x32_8_avx2: 86.8 Signed-off-by: Xu Guangxin Signed-off-by: Linjie Fu --- libavcodec/x86

[FFmpeg-devel] [PATCH 3/4] lavc/x86/hevc_add_res: Fix overflow in ADD_RES_SSE_8_8

2019-12-11 Thread Linjie Fu
: - hevc_add_res.add_residual [OK] hevc_add_res_8x8_8_sse2: 15.5 Signed-off-by: Xu Guangxin Signed-off-by: Linjie Fu --- libavcodec/x86/hevc_add_res.asm | 45 - 1 file changed, 22 insertions(+), 23 deletions(-) diff --git a/libavcodec/x86/hevc_add_res.asm b/libavcodec/x86

[FFmpeg-devel] [PATCH] lavc/mips: simplify the switch code

2019-12-11 Thread Linjie Fu
Signed-off-by: Linjie Fu --- libavcodec/mips/h264pred_init_mips.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/libavcodec/mips/h264pred_init_mips.c b/libavcodec/mips/h264pred_init_mips.c index 63637b8..e537ad8 100644 --- a/libavcodec/mips/h264pred_init_mips.c +++ b/libavcodec/mips

[FFmpeg-devel] [PATCH] lavc/hevc_cabac: fix cbf_cb and cbf_cr for transform depth 4

2019-12-11 Thread Linjie Fu
The max transform depth is 5(from 0 to 4), so we need 5 cabac states for cbf_cb and cbf_cr. See Table 9-4 for details. Signed-off-by: Xu Guangxin Signed-off-by: Linjie Fu --- libavcodec/hevc_cabac.c | 42 +- 1 file changed, 21 insertions(+), 21

[FFmpeg-devel] [PATCH] lavc/utils.c: fix code indentations

2019-12-11 Thread Linjie Fu
Introduced since 4b4a02b8. Signed-off-by: Linjie Fu --- libavcodec/utils.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/libavcodec/utils.c b/libavcodec/utils.c index 75e7035..8a49234 100644 --- a/libavcodec/utils.c +++ b/libavcodec/utils.c @@ -654,12 +654,12

[FFmpeg-devel] [PATCH] lavf/zf_zscale: remove unused code

2019-12-11 Thread Linjie Fu
Signed-off-by: Linjie Fu --- libavfilter/vf_zscale.c | 7 --- 1 file changed, 7 deletions(-) diff --git a/libavfilter/vf_zscale.c b/libavfilter/vf_zscale.c index db2dd17..bd5825f 100644 --- a/libavfilter/vf_zscale.c +++ b/libavfilter/vf_zscale.c @@ -287,13 +287,6 @@ static int config_props

[FFmpeg-devel] [PATCH,v2] lavfi/vf_zscale: remove unused code

2019-12-12 Thread Linjie Fu
Signed-off-by: Linjie Fu --- libavfilter/vf_zscale.c | 7 --- 1 file changed, 7 deletions(-) diff --git a/libavfilter/vf_zscale.c b/libavfilter/vf_zscale.c index db2dd17..bd5825f 100644 --- a/libavfilter/vf_zscale.c +++ b/libavfilter/vf_zscale.c @@ -287,13 +287,6 @@ static int config_props

[FFmpeg-devel] [PATCH] FATE: add test for hevc files with 4 TUDepth(0..4) of cbf_cb/cbf_cr

2019-12-12 Thread Linjie Fu
5 cabac states for cbf_cb and cbf_cr are supported according to Table 9-4. Add a test for 64x64 4:4:4 8bit HEVC clips with TUDepth = 4, cbf_cr > 0. Signedoff-by: Xu Guangxin Signed-off-by: Linjie Fu --- tests/fate/hevc.mak | 3 +++ tests/ref/fate/hevc-cabac-tudepth | 6 ++

[FFmpeg-devel] [PATCH, v2] FATE: add test for hevc files with 4 TUDepth(0..4) of cbf_cb/cbf_cr

2019-12-12 Thread Linjie Fu
5 cabac states for cbf_cb and cbf_cr are supported according to Table 9-4. Add a test for 64x64 4:4:4 8bit HEVC clips with TUDepth = 4, cbf_cr > 0. Signed-off-by: Xu Guangxin Signed-off-by: Linjie Fu --- tests/fate/hevc.mak | 3 +++ tests/ref/fate/hevc-cabac-tudepth

[FFmpeg-devel] [PATCH, v3] FATE: add test for hevc files with 4 TUDepth(0..4) of cbf_cb/cbf_cr

2019-12-13 Thread Linjie Fu
5 cabac states for cbf_cb and cbf_cr are supported according to Table 9-4. Add a test for 64x64 4:4:4 8bit HEVC clips with TUDepth = 4, cbf_cr > 0. Signed-off-by: Xu Guangxin Signed-off-by: Linjie Fu --- tests/fate/hevc.mak | 3 +++ tests/ref/fate/hevc-cabac-tudepth

[FFmpeg-devel] [PATCH] FATE/hevc.mak: cosmetic for fate-hevc-paired-fields

2019-12-13 Thread Linjie Fu
Adjust the order of fate-hevc-paired-fields. Signed-off-by: Linjie Fu --- tests/fate/hevc.mak | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/fate/hevc.mak b/tests/fate/hevc.mak index 735949a..35af3e4 100644 --- a/tests/fate/hevc.mak +++ b/tests/fate/hevc.mak

[FFmpeg-devel] [PATCH] lavfi/vf_scale_qsv: set the correct class_name for scale_qsv

2019-12-17 Thread Linjie Fu
Fix the AVOptions name for scale_qsv while dumping help message: $ ffmpeg -h full Before: qsvscale AVOptions: After: scale_qsv AVOptions: Signed-off-by: Linjie Fu --- libavfilter/vf_scale_qsv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavfilter/vf_scale_qsv.c b

<    1   2   3   4   5   >