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

2019-08-28 Thread Linjie Fu
Add swscale support for AYUV and make it more robust. Also update the reference in fate. Signed-off-by: Linjie Fu --- libswscale/input.c | 26 + libswscale/output.c | 50 libswscale/utils.c

[FFmpeg-devel] [PATCH 1/2] lavu/pixfmt: add AYUV pixel format

2019-08-28 Thread Linjie Fu
Add support for packed 4:4:4 pixel format AYUV. It is the format that VAAPI/QSV uses when coping with 4:4:4 surfaces. Alpha channel will be set to default value for HEVC REXT hw decode. Signed-off-by: Linjie Fu --- libavutil/pixdesc.c | 13 + libavutil/pixfmt.h

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

2019-09-03 Thread Linjie Fu
K 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 eef4fe7..319b549

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

[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 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/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, 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 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 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 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 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/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 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 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, v4 1/2] fftools/ffmpeg_filter: add -autoscale to disable/enable the default scale

2019-07-28 Thread Linjie Fu
whether auto inserting the scale filter in the filter graph: -noautoscale or -autoscale 0: disable the default auto scale filter inserting. Update docs. Signed-off-by: U. Artie Eoff Signed-off-by: Linjie Fu --- doc/ffmpeg.texi | 16 fftools/ffmpeg.c

[FFmpeg-devel] [PATCH, RFC 2/2] fftools/ffmpeg: add dynamic resolution encode support for libvpx-vp9

2019-07-28 Thread Linjie Fu
./reinit-large_420_8-to-small_420_8.h264 -pix_fmt yuv420p -c:v libvpx-vp9 lena.ivf Signed-off-by: Linjie Fu --- fftools/ffmpeg.c | 9 + libavcodec/libvpxenc.c | 9 + 2 files changed, 18 insertions(+) diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c index 5d52430..e091117

[FFmpeg-devel] [PATCH, v3 2/3] fftools/ffmpeg: support variable resolution encode

2019-07-30 Thread Linjie Fu
Flush encoders when resolution change happens. Use AV_CODEC_CAP_PARAM_CHANGE flag for encoder to indicate whether it supports variable/dynamic resolution encoding. Signed-off-by: Linjie Fu --- [v3]: use AV_CODEC_CAP_PARAM_CHANGE flag fftools/ffmpeg.c| 14 ++ libavcodec/rawenc.c

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

2019-07-30 Thread Linjie Fu
whether auto inserting the scale filter in the filter graph: -noautoscale or -autoscale 0: disable the default auto scale filter inserting. Update docs. Signed-off-by: U. Artie Eoff Signed-off-by: Linjie Fu --- [no updates] doc/ffmpeg.texi | 16 fftools/ffmpeg.c

[FFmpeg-devel] [PATCH, v2 3/3] lavc/libvpxenc: add dynamic resolution encode support for libvpx

2019-07-30 Thread Linjie Fu
yuv420p -c:v libvpx-vp9 lena.ivf Signed-off-by: Linjie Fu --- [v2]: use AV_CODEC_CAP_PARAM_CHANGE flag. libavcodec/libvpxenc.c | 13 +++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/libavcodec/libvpxenc.c b/libavcodec/libvpxenc.c index feb52ea..800ba18 100644

[FFmpeg-devel] [PATCH] lavu/hwcontext_vaapi: cope with race map for YUV420P

2019-07-31 Thread Linjie Fu
=yuv420p' -f rawvideo -vsync passthrough -vframes 10 -y aa.yuv Signed-off-by: Linjie Fu --- libavutil/hwcontext_vaapi.c | 14 +++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/libavutil/hwcontext_vaapi.c b/libavutil/hwcontext_vaapi.c index cf11764..64f14de 100644

[FFmpeg-devel] [PATCH] lavf/vf_deinterlace_vaapi: flush queued frame in field mode

2019-08-02 Thread Linjie Fu
=bob:rate=field,hwdownload,format=nv12' -pix_fmt yuv420p -f rawvideo -vsync passthrough -y dump.yuv Signed-off-by: Linjie Fu --- libavfilter/vf_deinterlace_vaapi.c | 46 -- 1 file changed, 39 insertions(+), 7 deletions(-) diff --git a/libavfilter

[FFmpeg-devel] [PATCH 3/4] fftools/ffmpeg: support variable dimension encode

2019-07-29 Thread Linjie Fu
Flush encoders when dimension change happens, reset draining to resume encode. If encoder doesn't support variable dimension, stop encoding and report errors. Signed-off-by: Linjie Fu --- fftools/ffmpeg.c| 13 + libavcodec/encode.c | 4 2 files changed, 17 insertions

[FFmpeg-devel] [PATCH 4/4] lavc/libvpxenc: add dynamic resolution encode support for libvpx

2019-07-29 Thread Linjie Fu
yuv420p -c:v libvpx-vp9 lena.ivf Signed-off-by: Linjie Fu --- libavcodec/libvpxenc.c | 13 +++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/libavcodec/libvpxenc.c b/libavcodec/libvpxenc.c index feb52ea..6af6c50 100644 --- a/libavcodec/libvpxenc.c +++ b/libavcodec

[FFmpeg-devel] [PATCH 2/4] avc/avcodec: add AV_CODEC_CAP_VARIABLE_DIMENSIONS flag

2019-07-29 Thread Linjie Fu
Add AV_CODEC_CAP_VARIABLE_DIMENSIONS flag to indicate whether encoder supports variable dimension encoding. Signed-off-by: Linjie Fu --- fftools/cmdutils.c | 2 ++ libavcodec/avcodec.h | 5 + libavcodec/rawenc.c | 1 + libavcodec/version.h | 2 +- 4 files changed, 9 insertions(+), 1

[FFmpeg-devel] [PATCH, v4 1/4] fftools/ffmpeg_filter: add -autoscale to disable/enable the default scale

2019-07-29 Thread Linjie Fu
whether auto inserting the scale filter in the filter graph: -noautoscale or -autoscale 0: disable the default auto scale filter inserting. Update docs. Signed-off-by: U. Artie Eoff Signed-off-by: Linjie Fu --- [no update] doc/ffmpeg.texi | 16 fftools/ffmpeg.c

[FFmpeg-devel] [PATCH] lavc/phtread_frame: update hwaccel_priv_data in time for multithread

2019-07-18 Thread Linjie Fu
-by: Linjie Fu --- libavcodec/pthread_frame.c | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/libavcodec/pthread_frame.c b/libavcodec/pthread_frame.c index 36ac0ac..cf7a575 100644 --- a/libavcodec/pthread_frame.c +++ b/libavcodec/pthread_frame.c @@ -282,7 +282,6 @@ static

[FFmpeg-devel] [PATCH, v2 1/2] fftools/ffmpeg_filter: add -autoscale to disable/enable the default scale

2019-07-19 Thread Linjie Fu
whether auto inserting the scale filter in the filter graph: -noautoscale or -autoscale 0: disable the default auto scale filter inserting. Signed-off-by: U. Artie Eoff Signed-off-by: Linjie Fu --- fftools/ffmpeg.c| 1 + fftools/ffmpeg.h| 4 fftools/ffmpeg_filter.c

[FFmpeg-devel] [PATCH, v3 2/2] doc/ffmpeg.texi: update docs for autoscale/autorotate

2019-07-19 Thread Linjie Fu
Add docs for autoscale. Update information for autorotate according to ffplay. Signed-off-by: U. Artie Eoff Signed-off-by: Linjie Fu --- doc/ffmpeg.texi | 17 + 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/doc/ffmpeg.texi b/doc/ffmpeg.texi index cd35eb49c8

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

2019-07-19 Thread Linjie Fu
whether auto inserting the scale filter in the filter graph: -noautoscale or -autoscale 0: disable the default auto scale filter inserting. Update docs. Signed-off-by: U. Artie Eoff Signed-off-by: Linjie Fu --- doc/ffmpeg.texi | 17 + fftools/ffmpeg.c

[FFmpeg-devel] [PATCH] lavu/hwcontext_qsv: fix the memory leak

2019-07-26 Thread Linjie Fu
av_dict_free child_device_opts to fix the memory leak. Signed-off-by: Linjie Fu --- libavutil/hwcontext_qsv.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavutil/hwcontext_qsv.c b/libavutil/hwcontext_qsv.c index 59e4ed9157..0329a81ec3 100644 --- a/libavutil/hwcontext_qsv.c +++ b

[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, 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] 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, 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 1/2] lavc/decode: recreate hw_frames_ctx instead of return if already exists

2019-07-06 Thread Linjie Fu
If hw_frames_ctx exists when calling ff_decode_get_hw_frames_ctx, it is allowed to be recreated instead of just return. Move hw_frames_ctx check outside ff_decode_get_hw_frames_ctx, and check in relevant code. Signed-off-by: Linjie Fu --- libavcodec/decode.c | 2 +- libavcodec/dxva2.c | 8

[FFmpeg-devel] [PATCH 2/2] lavc/vaapi_decode: recreate hw_frames_ctx without destroy va_context

2019-07-06 Thread Linjie Fu
recreating hw_frames_ctx. Could be verified by: ffmpeg -hwaccel vaapi -hwaccel_device /dev/dri/renderD128 -i ./resolutions.ivf -pix_fmt p010le -f rawvideo -vframes 20 -y vaapi.yuv Signed-off-by: Linjie Fu --- libavcodec/decode.c | 8 libavcodec/vaapi_decode.c | 40

[FFmpeg-devel] [PATCH, v3] lavf/vf_vpp_qsv: add support for QSV transpose filter

2019-07-10 Thread Linjie Fu
,vpp_qsv=transpose=cclock_hflip' -f rawvideo -pix_fmt nv12 ./transpose.yuv Signed-off-by: Linjie Fu --- libavfilter/vf_vpp_qsv.c | 101 ++- 1 file changed, 99 insertions(+), 2 deletions(-) diff --git a/libavfilter/vf_vpp_qsv.c b/libavfilter

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

<    1   2