Re: [FFmpeg-devel] [PATCH] fix memory leak in qsvenc.c

2020-08-14 Thread Linjie Fu
On Thu, Aug 13, 2020 at 10:15 AM Alex Pokotilo wrote: > > > ___ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > To unsubscribe, visit link above, or email > ffmpeg-devel-requ...@ffmpeg.org with

Re: [FFmpeg-devel] [PATCH] lavu/hwcontext_qsv: add 10-bit RGB support for QSV

2020-08-09 Thread Linjie Fu
On Mon, Aug 10, 2020 at 4:31 AM Mark Thompson wrote: > > On 09/08/2020 06:11, Linjie Fu wrote: > > After adding a copy pass through path inside MSDK, x2rgb10 is now > > available as an output of VPP. > > > > Command line for CSC: > > ffmpeg -hwaccel qsv -v ve

[FFmpeg-devel] [PATCH] lavu/hwcontext_qsv: add 10-bit RGB support for QSV

2020-08-08 Thread Linjie Fu
After adding a copy pass through path inside MSDK, x2rgb10 is now available as an output of VPP. Command line for CSC: ffmpeg -hwaccel qsv -v verbose -c:v hevc_qsv -i p010.h265 -vf scale_qsv=format=x2rgb10,hwdownload,format=x2rgb10 -vframes 1 out.yuv Signed-off-by: Linjie Fu --- [1

Re: [FFmpeg-devel] [PATCH] avcodec/nvenc: support dynamic resolution change

2020-08-08 Thread Linjie Fu
On Sat, Aug 8, 2020 at 7:21 PM Timo Rothenpieler wrote: > > On 08.08.2020 02:48, Linjie Fu wrote: > > On Fri, Aug 7, 2020 at 4:19 PM leozhang wrote: > >> > >> Allow dynamic resolution change, this is useful for real time video > >> communication applicatio

Re: [FFmpeg-devel] [PATCH] avcodec/nvenc: support dynamic resolution change

2020-08-07 Thread Linjie Fu
On Fri, Aug 7, 2020 at 4:19 PM leozhang wrote: > > Allow dynamic resolution change, this is useful for real time video > communication application. > > Use below commands to test it, > ffmpeg -i reinit-large_420_8-to-small_420_8.h264 -noautoscale -c:v hevc_nvenc > out.265 -loglevel verbose -y >

Re: [FFmpeg-devel] [PATCH 4/4] vaapi_encode_h265: Enable 4:2:2 support

2020-07-23 Thread Linjie Fu
On Mon, Jul 20, 2020 at 10:32 PM Linjie Fu wrote: > > On Fri, May 15, 2020 at 3:21 PM Fu, Linjie wrote: > > > > > From: ffmpeg-devel On Behalf Of > > > Mark Thompson > > > Sent: Sunday, March 8, 2020 00:15 > > > To: ffmpeg-devel@ffmpeg.

Re: [FFmpeg-devel] [PATCH 4/4] vaapi_encode_h265: Enable 4:2:2 support

2020-07-20 Thread Linjie Fu
On Fri, May 15, 2020 at 3:21 PM Fu, Linjie wrote: > > > From: ffmpeg-devel On Behalf Of > > Mark Thompson > > Sent: Sunday, March 8, 2020 00:15 > > To: ffmpeg-devel@ffmpeg.org > > Subject: Re: [FFmpeg-devel] [PATCH 4/4] vaapi_encode_h265: Enable 4:2:2 > > support > > > > On 05/03/2020 02:49, Fu,

[FFmpeg-devel] [PATCH] lavc/vaapi_encode: Add render target support for 422 10-bit

2020-07-20 Thread Linjie Fu
This enables VAAPI encoding support for 422 10-bit(Y210). 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 index 1de43cc..6766641 100644 --- a/libavcodec/vaapi_encode.c +++ b

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

2020-07-19 Thread Linjie Fu
On Thu, Jun 18, 2020 at 1:36 PM Linjie Fu wrote: > > 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 s

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

2020-07-09 Thread Linjie Fu
On Fri, Jul 10, 2020 at 12:54 AM James Almer wrote: > > On 7/9/2020 1:51 PM, James Almer wrote: > > On 7/9/2020 1:17 PM, Linjie Fu wrote: > >> According to 7.3.2.2.3 in T-REC-H.265-201911. > >> > >> Signed-off-by: Linjie Fu > >> --- > >>

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

2020-07-09 Thread 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 1164af2..464eb7c 100644 --- a/libavcodec/hevcdec.h

[FFmpeg-devel] [PATCH 3/7] lavc/hevc_ps: Add pps parse support for hevc scc extension

2020-07-09 Thread Linjie Fu
Signed-off-by: Linjie Fu --- libavcodec/hevc_ps.c | 53 ++-- libavcodec/hevc_ps.h | 17 + 2 files changed, 68 insertions(+), 2 deletions(-) diff --git a/libavcodec/hevc_ps.c b/libavcodec/hevc_ps.c index 7610d3b..887b960 100644

[FFmpeg-devel] [PATCH 7/7] lavc/hevc: update reference list for SCC

2020-07-09 Thread Linjie Fu
Screen Content Coding allows P slice in an IDR frame, and would add frames themselves to the short term rps in RefList0 (8-10 in spec), hence some previous restricts are not suitable any more. [Request for comments]. Signed-off-by: Linjie Fu --- libavcodec/hevc_refs.c | 21

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

2020-07-09 Thread 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 | 1 + 2 files

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

2020-07-09 Thread 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 e363e68..8194f18 100644 --- a/libavcodec/hevcdec.c +++ b/libavcodec/hevcdec.c @@ -800,6 +800,12 @@ static

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

2020-07-09 Thread Linjie Fu
According to 7.3.2.2.3 in T-REC-H.265-201911. Signed-off-by: Linjie Fu --- libavcodec/hevc.h| 3 +++ libavcodec/hevc_ps.c | 32 +--- libavcodec/hevc_ps.h | 15 +++ 3 files changed, 47 insertions(+), 3 deletions(-) diff --git a/libavcodec/hevc.h b

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

2020-07-09 Thread Linjie Fu
Version bump would be added when upstreamed. 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 c91b2fd..32e4770 100644 --- a

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

2020-07-09 Thread Linjie Fu
. [Request for comment]. Linjie Fu (7): 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 scc extension lavc/hevc_ps: Add slice parse support for HEVC SCC extension lavc

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

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

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

[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 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] 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 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_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 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 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 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 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 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 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 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, 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] 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 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 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 v5 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 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 1/5] lavc/libopenh264enc: Add qmin/qmax support

2020-04-28 Thread Linjie Fu
libopenh264 with a warning: Warning:Change QP Range from(0,51) to (12,42) <https://github.com/cisco/openh264/blob/master/codec/encoder/core/src/encoder_ext.cpp#L375> <https://github.com/cisco/openh264/issues/3259> Signed-off-by: Linjie Fu --- libavcodec/libopenh264enc.c | 12

[FFmpeg-devel] [PATCH v4 7/9] lavc/libopenh264enc: add profile high option support

2020-04-14 Thread Linjie Fu
Add support for PRO_HIGH/PRO_BASELINE in SVC Encoding extention mode, which determined by iEntropyCodingModeFlag in ParamTranscode(). <https://github.com/cisco/openh264/blob/master/codec/encoder/core/inc/param_svc.h#L394> Signed-off-by: Linjie Fu --- libavcodec/libopenh264enc.

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

2020-04-14 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 v4 3/9] lavc/libopenh264enc: add bit rate control select support

2020-04-14 Thread Linjie Fu
: Linjie Fu --- libavcodec/libopenh264enc.c | 12 +++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/libavcodec/libopenh264enc.c b/libavcodec/libopenh264enc.c index 57313b1..f994f95 100644 --- a/libavcodec/libopenh264enc.c +++ b/libavcodec/libopenh264enc.c @@ -47,6 +47,9

[FFmpeg-devel] [PATCH v4 6/9] lavc/libopenh264enc: separate svc_encode_init() into several functions

2020-04-14 Thread Linjie Fu
Separate the initialization procedure into different functions. Make it more readable and easier to be extended. Signed-off-by: Linjie Fu --- libavcodec/libopenh264enc.c | 283 +++- 1 file changed, 174 insertions(+), 109 deletions(-) diff --git a

[FFmpeg-devel] [PATCH v4 8/9] lavc/libopenh264enc: allow specifying the profile through AVCodecContext

2020-04-14 Thread Linjie Fu
Signed-off-by: Linjie Fu --- libavcodec/libopenh264enc.c | 16 1 file changed, 16 insertions(+) diff --git a/libavcodec/libopenh264enc.c b/libavcodec/libopenh264enc.c index 0fe8cf4..4d337d2 100644 --- a/libavcodec/libopenh264enc.c +++ b/libavcodec/libopenh264enc.c @@ -113,6

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

2020-04-14 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 v4 9/9] lavc/libopenh264enc: Add coder option to replace cabac

2020-04-14 Thread Linjie Fu
Set DEPRECATED flag to option cabac, replace with coder. Change the default option to -1 and allow the default cabac to be determined by profile. Add FF_API_OPENH264_CABAC macro for cabac to remove this option after LIBAVCODEC_VERSION_MAJOR = 59. Signed-off-by: Linjie Fu --- libavcodec

[FFmpeg-devel] [PATCH v4 1/9] lavc/libopenh264enc: Add default qmin/qmax support

2020-04-14 Thread Linjie Fu
sco/openh264/blob/master/codec/encoder/core/src/encoder_ext.cpp#L375> [2] <https://github.com/cisco/openh264/issues/3259> Signed-off-by: Linjie Fu --- libavcodec/libopenh264enc.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/libavcodec/libopenh264enc.c b/libavcodec/libopenh26

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

2020-04-14 Thread Linjie Fu
It would be 200kbps bitrate with gop size = 12 by default which generated too many IDR frames in rather low bit rate. The quality would be poor. Set these default values according to vaapi encoder, and use 2Mbps bitrate if user doesn't set it explicitly as nvenc sugguested. Signed-off-by: L

[FFmpeg-devel] [PATCH v4 0/9] Enhancement for libopenh264 encoder

2020-04-14 Thread Linjie Fu
Docs would be provided later. Linjie Fu (9): lavc/libopenh264enc: Add default 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 libopenh264 lavc

[FFmpeg-devel] [PATCH, v2] lavc/vaapi_encode_h265: add private b_strategy option for hevc_vaapi

2020-04-14 Thread Linjie Fu
add it once it's ready: https://github.com/intel/libva/pull/220 https://github.com/intel/libva/pull/364 https://github.com/intel/media-driver/issues/721 Signed-off-by: Linjie Fu --- Further step for low delay B would be refining the reference management to enable support for more forward-referen

[FFmpeg-devel] [PATCH] lavc/vaapi_encode_h265: add low_delay_b option for HEVC

2020-04-12 Thread Linjie Fu
querys support for low delay b, would add it once it's ready: https://github.com/intel/libva/pull/220 https://github.com/intel/libva/pull/364 https://github.com/intel/media-driver/issues/721 Signed-off-by: Linjie Fu --- doc/encoders.texi | 8 libavcodec/vaapi_encode_

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

2020-04-12 Thread Linjie Fu
cumentation/intel-gfx-prm-osrc-kbl-vol10-hevc.pdf> Signed-off-by: Linjie Fu --- Fixed value for intel platform, makes more sense on TGL+ platform. (If conflict with other driver capability, we may add query support later) libavcodec/vaapi_encode_h265.c | 5 +++-- 1 file changed, 3 insertions(+

[FFmpeg-devel] [PATCH v2] lavc/vaapi_decode: fix the build failure when hevc_vaapi is disabled

2020-04-12 Thread Linjie Fu
Verified with ./configure --enable-vaapi --disable-hwaccel=hevc_vaapi Failure reported in: http://fate.ffmpeg.org/report.cgi?time=20200401135031&slot=x86_64-archlinux-gcc-random Signed-off-by: Linjie Fu --- libavcodec/vaapi_decode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

[FFmpeg-devel] [PATCH v3 6/9] lavc/libopenh264enc: separate svc_encode_init() into several functions

2020-04-11 Thread Linjie Fu
Separate the initialization procedure into different functions. Make it more readable and easier to be extended. Signed-off-by: Linjie Fu --- libavcodec/libopenh264enc.c | 283 +++- 1 file changed, 174 insertions(+), 109 deletions(-) diff --git a

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

2020-04-11 Thread Linjie Fu
Set DEPRECATED flag to option cabac, replace with coder. Change the default option to -1 and allow the default cabac to be determined by profile. Add OPENH264_API_CABAC macro for cabac to remove this option after LIBAVCODEC_VERSION_MAJOR = 59. Signed-off-by: Linjie Fu --- libavcodec

[FFmpeg-devel] [PATCH v3 8/9] lavc/libopenh264enc: allow specifying the profile through AVCodecContext

2020-04-11 Thread Linjie Fu
Signed-off-by: Linjie Fu --- libavcodec/libopenh264enc.c | 16 1 file changed, 16 insertions(+) diff --git a/libavcodec/libopenh264enc.c b/libavcodec/libopenh264enc.c index 3a205b7..df2d6ee 100644 --- a/libavcodec/libopenh264enc.c +++ b/libavcodec/libopenh264enc.c @@ -119,6

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

2020-04-11 Thread Linjie Fu
: Linjie Fu --- libavcodec/libopenh264enc.c | 12 +++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/libavcodec/libopenh264enc.c b/libavcodec/libopenh264enc.c index 57313b1..f994f95 100644 --- a/libavcodec/libopenh264enc.c +++ b/libavcodec/libopenh264enc.c @@ -47,6 +47,9

[FFmpeg-devel] [PATCH v3 7/9] lavc/libopenh264enc: add profile high option support

2020-04-11 Thread Linjie Fu
Add support for PRO_HIGH/PRO_BASELINE in SVC Encoding extention mode, which determined by iEntropyCodingModeFlag in ParamTranscode(). <https://github.com/cisco/openh264/blob/master/codec/encoder/core/inc/param_svc.h#L394> Signed-off-by: Linjie Fu --- libavcodec/libopenh264enc.

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

2020-04-11 Thread Linjie Fu
ices. Add OPENH264_API_SLICE_MODE to remove this option after LIBAVCODEC_VERSION_MAJOR = 59. Signed-off-by: Linjie Fu --- libavcodec/libopenh264enc.c | 15 --- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/libavcodec/libopenh264enc.c b/libavcodec/libopenh264enc.c index e556f0

[FFmpeg-devel] [PATCH v3 1/9] lavc/libopenh264enc: Add default qmin/qmax support

2020-04-11 Thread Linjie Fu
sco/openh264/blob/master/codec/encoder/core/src/encoder_ext.cpp#L375> [2] <https://github.com/cisco/openh264/issues/3259> Signed-off-by: Linjie Fu --- libavcodec/libopenh264enc.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/libavcodec/libopenh264enc.c b/libavcodec/libopenh26

[FFmpeg-devel] [PATCH v3 0/9] patchset for the enhancement of libopenh264 encoder

2020-04-11 Thread Linjie Fu
Docs will be provided later. Linjie Fu (9): lavc/libopenh264enc: Add default 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 libopenh264 lavc

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

2020-04-11 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 v3 2/9] lavc/libopenh264enc: add default gop size and bit rate

2020-04-11 Thread Linjie Fu
It would be 200kbps bitrate with gop size = 12 by default which generated too many IDR frames in rather low bit rate. The quality would be poor. Set these default values according to vaapi encoder, and use 2Mbps bitrate if user doesn't set it explicitly as nvenc sugguested. Signed-off-by: L

[FFmpeg-devel] [PATCH 10/10] lavc/libopenh264enc: replace cabac option with coder

2020-04-06 Thread Linjie Fu
Change the default option to -1 and allow the default cabac to be decided by profile. Signed-off-by: Linjie Fu --- libavcodec/libopenh264enc.c | 27 --- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/libavcodec/libopenh264enc.c b/libavcodec

[FFmpeg-devel] [PATCH 06/10] lavc/libopenh264enc: set slice_mode option to deprecated

2020-04-06 Thread Linjie Fu
s could be removed later. Signed-off-by: Linjie Fu --- libavcodec/libopenh264enc.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/libavcodec/libopenh264enc.c b/libavcodec/libopenh264enc.c index 01a85fb..e89cedf 100644 --- a/libavcodec/libopenh264enc.c +++ b/

[FFmpeg-devel] [PATCH 07/10] lavc/libopenh264enc: separate svc_encode_init() into several functions

2020-04-06 Thread Linjie Fu
Separate the initialization procedure into different functions. Make it more readable and easier to be extended. Signed-off-by: Linjie Fu --- libavcodec/libopenh264enc.c | 283 +++- 1 file changed, 174 insertions(+), 109 deletions(-) diff --git a

[FFmpeg-devel] [PATCH 03/10] lavc/libopenh264enc: add default gop size and bit rate

2020-04-06 Thread Linjie Fu
Signed-off-by: Linjie Fu --- libavcodec/libopenh264enc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavcodec/libopenh264enc.c b/libavcodec/libopenh264enc.c index c7ae5b1..3ff5be7 100644 --- a/libavcodec/libopenh264enc.c +++ b/libavcodec/libopenh264enc.c @@ -335,6 +335,8 @@ static

[FFmpeg-devel] [PATCH 09/10] lavc/libopenh264enc: allow specifying the profile through AVCodecContext

2020-04-06 Thread Linjie Fu
Signed-off-by: Linjie Fu --- libavcodec/libopenh264enc.c | 16 1 file changed, 16 insertions(+) diff --git a/libavcodec/libopenh264enc.c b/libavcodec/libopenh264enc.c index d331cfd..70ded55 100644 --- a/libavcodec/libopenh264enc.c +++ b/libavcodec/libopenh264enc.c @@ -111,6

[FFmpeg-devel] [PATCH 02/10] lavc/libopenh264enc: fix the if-else coding style

2020-04-06 Thread Linjie Fu
Signed-off-by: Linjie Fu --- libavcodec/libopenh264enc.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/libavcodec/libopenh264enc.c b/libavcodec/libopenh264enc.c index 364926f..c7ae5b1 100644 --- a/libavcodec/libopenh264enc.c +++ b/libavcodec/libopenh264enc.c @@ -202,8

[FFmpeg-devel] [PATCH 05/10] lavc/libopenh264enc: prompt slice number changing according to cpus

2020-04-06 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 | 3 +++ 1 file changed, 3 insertions(+) diff --git a

[FFmpeg-devel] [PATCH 08/10] lavc/libopenh264enc: add profile high option support

2020-04-06 Thread Linjie Fu
Add support for PRO_HIGH/PRO_BASELINE in SVC Encoding extention mode, which determined by iEntropyCodingModeFlag in ParamTranscode(). <https://github.com/cisco/openh264/blob/master/codec/encoder/core/inc/param_svc.h#L394> Signed-off-by: Linjie Fu --- libavcodec/libopenh264enc.

[FFmpeg-devel] [PATCH 04/10] lavc/libopenh264enc: add bit rate control select support

2020-04-06 Thread Linjie Fu
: Linjie Fu --- libavcodec/libopenh264enc.c | 12 +++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/libavcodec/libopenh264enc.c b/libavcodec/libopenh264enc.c index 3ff5be7..dab8244 100644 --- a/libavcodec/libopenh264enc.c +++ b/libavcodec/libopenh264enc.c @@ -47,6 +47,9

[FFmpeg-devel] [PATCH 01/10] lavc/libopenh264enc: Add default qmin/qmax support

2020-04-06 Thread Linjie Fu
sco/openh264/blob/master/codec/encoder/core/src/encoder_ext.cpp#L375> [2] <https://github.com/cisco/openh264/issues/3259> Signed-off-by: Linjie Fu --- libavcodec/libopenh264enc.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/libavcodec/libopenh264enc.c b/libavcodec/libopenh26

[FFmpeg-devel] [PATCH 00/10] Patch set for the enhancement of libopenh264 encoder

2020-04-06 Thread Linjie Fu
Docs will be provided later. Linjie Fu (10): lavc/libopenh264enc: Add default qmin/qmax support [v2] fix the av_clip logic for iMinQp. lavc/libopenh264enc: fix the if-else coding style lavc/libopenh264enc: add default gop size and bit rate lavc/libopenh264enc: add bit rate control

Re: [FFmpeg-devel] [PATCH 00/10] Patch set for the enhancement of libopenh264 encoder

2020-04-05 Thread Linjie Fu
> From: "Linjie Fu" > Sent Time: 2020-04-03 23:12:20 (Friday) > To: ffmpeg-devel@ffmpeg.org > Cc: "Linjie Fu" > Subject: [FFmpeg-devel] [PATCH 00/10] Patch set for the enhancement of > libopenh264 encoder > > Docs will be provided later. >

[FFmpeg-devel] [PATCH] lavc/vaapi_encode: adapt to the new internal encode API

2020-04-04 Thread Linjie Fu
64 -y /dev/null Performance improved from 120 fps to 136 fps after applying this patch. Signed-off-by: Linjie Fu --- Futher more, if integrated with the fix to async the encoding and output procedure in [1], the fps reaches 155 fps. [1] https://patchwork.ffmpeg.org/project/ffmpeg

[FFmpeg-devel] [PATCH 08/10] lavc/libopenh264enc: add profile high option support

2020-04-03 Thread Linjie Fu
Add support for PRO_HIGH/PRO_BASELINE in SVC Encoding extention mode, which determined by iEntropyCodingModeFlag in ParamTranscode(). <https://github.com/cisco/openh264/blob/master/codec/encoder/core/inc/param_svc.h#L394> Signed-off-by: Linjie Fu --- libavcodec/libopenh264enc.

[FFmpeg-devel] [PATCH 07/10] lavc/libopenh264enc: separate svc_encode_init() into several functions

2020-04-03 Thread Linjie Fu
Separate the initialization procedure into different functions. Make it more readable and easier to be extended. Signed-off-by: Linjie Fu --- libavcodec/libopenh264enc.c | 283 +++- 1 file changed, 174 insertions(+), 109 deletions(-) diff --git a

[FFmpeg-devel] [PATCH 10/10] lavc/libopenh264enc: replace cabac option with coder

2020-04-03 Thread Linjie Fu
Change the default option to -1 and allow the default cabac to be decided by profile. Signed-off-by: Linjie Fu --- libavcodec/libopenh264enc.c | 27 --- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/libavcodec/libopenh264enc.c b/libavcodec

[FFmpeg-devel] [PATCH 09/10] lavc/libopenh264enc: allow specifying the profile through AVCodecContext

2020-04-03 Thread Linjie Fu
Signed-off-by: Linjie Fu --- libavcodec/libopenh264enc.c | 16 1 file changed, 16 insertions(+) diff --git a/libavcodec/libopenh264enc.c b/libavcodec/libopenh264enc.c index d331cfd..70ded55 100644 --- a/libavcodec/libopenh264enc.c +++ b/libavcodec/libopenh264enc.c @@ -111,6

[FFmpeg-devel] [PATCH 05/10] lavc/libopenh264enc: prompt slice number changing according to cpus

2020-04-03 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 | 3 +++ 1 file changed, 3 insertions(+) diff --git a

[FFmpeg-devel] [PATCH 04/10] lavc/libopenh264enc: add bit rate control select support

2020-04-03 Thread Linjie Fu
: Linjie Fu --- libavcodec/libopenh264enc.c | 12 +++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/libavcodec/libopenh264enc.c b/libavcodec/libopenh264enc.c index 3ff5be7..dab8244 100644 --- a/libavcodec/libopenh264enc.c +++ b/libavcodec/libopenh264enc.c @@ -47,6 +47,9

[FFmpeg-devel] [PATCH 06/10] lavc/libopenh264enc: set slice_mode option to deprecated

2020-04-03 Thread Linjie Fu
s could be removed later. Signed-off-by: Linjie Fu --- libavcodec/libopenh264enc.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/libavcodec/libopenh264enc.c b/libavcodec/libopenh264enc.c index 01a85fb..e89cedf 100644 --- a/libavcodec/libopenh264enc.c +++ b/

[FFmpeg-devel] [PATCH 02/10] lavc/libopenh264enc: fix the if-else coding style

2020-04-03 Thread Linjie Fu
Signed-off-by: Linjie Fu --- libavcodec/libopenh264enc.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/libavcodec/libopenh264enc.c b/libavcodec/libopenh264enc.c index 364926f..c7ae5b1 100644 --- a/libavcodec/libopenh264enc.c +++ b/libavcodec/libopenh264enc.c @@ -202,8

[FFmpeg-devel] [PATCH 03/10] lavc/libopenh264enc: add default gop size and bit rate

2020-04-03 Thread Linjie Fu
Signed-off-by: Linjie Fu --- libavcodec/libopenh264enc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavcodec/libopenh264enc.c b/libavcodec/libopenh264enc.c index c7ae5b1..3ff5be7 100644 --- a/libavcodec/libopenh264enc.c +++ b/libavcodec/libopenh264enc.c @@ -335,6 +335,8 @@ static

[FFmpeg-devel] [PATCH 01/10] lavc/libopenh264enc: Add default qmin/qmax support

2020-04-03 Thread Linjie Fu
sco/openh264/blob/master/codec/encoder/core/src/encoder_ext.cpp#L375> [2] <https://github.com/cisco/openh264/issues/3259> Signed-off-by: Linjie Fu --- libavcodec/libopenh264enc.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/libavcodec/libopenh264enc.c b/libavcodec/libopenh26

[FFmpeg-devel] [PATCH 00/10] Patch set for the enhancement of libopenh264 encoder

2020-04-03 Thread Linjie Fu
Docs will be provided later. Linjie Fu (10): lavc/libopenh264enc: Add default qmin/qmax support [v2] fix the av_clip logic for iMinQp. lavc/libopenh264enc: fix the if-else coding style lavc/libopenh264enc: add default gop size and bit rate lavc/libopenh264enc: add bit rate control

[FFmpeg-devel] [PATCH] lavc/vaapi_decode: fix the build failure when hevc_vaapi is disabled

2020-04-01 Thread Linjie Fu
Verified with ./configure --enable-vaapi --disable-hwaccel=hevc_vaapi Failure reported in: http://fate.ffmpeg.org/report.cgi?time=20200401135031&slot=x86_64-archlinux-gcc-random Signed-off-by: Linjie Fu --- libavcodec/vaapi_decode.c | 2 ++ 1 file changed, 2 insertions(+) diff --g

<    1   2   3   4   5   >