[FFmpeg-devel] [PATCH v5 1/9] cbs_av1: fix incorrect data type

2021-10-12 Thread Fei Wang
Since order_hint_bits_minus_1 range is 0~7, cur_frame_hint can be most 128. And similar return value for cbs_av1_get_relative_dist. So if plus them and use int8_t for the result may lose its precision. Signed-off-by: Fei Wang --- update: 1. move additional film grain frame from av1dec.c to

[FFmpeg-devel] [PATCH v5 2/9] avcodec/av1: extend some definitions in spec section 3

2021-10-12 Thread Fei Wang
Signed-off-by: Fei Wang --- libavcodec/av1.h | 7 +++ 1 file changed, 7 insertions(+) diff --git a/libavcodec/av1.h b/libavcodec/av1.h index 0f99ae4829..951a18ecb2 100644 --- a/libavcodec/av1.h +++ b/libavcodec/av1.h @@ -114,6 +114,13 @@ enum { AV1_WARP_MODEL_TRANSLATION = 1

[FFmpeg-devel] [PATCH v5 3/9] avcodec/av1dec: support setup shear process

2021-10-12 Thread Fei Wang
Defined in spec 7.11.3.6/7.11.3.7. Signed-off-by: Fei Wang --- libavcodec/av1dec.c | 98 + libavcodec/av1dec.h | 1 + 2 files changed, 99 insertions(+) diff --git a/libavcodec/av1dec.c b/libavcodec/av1dec.c index a69808f7b6..db110c50c7 100644 --- a

[FFmpeg-devel] [PATCH v5 4/9] avcodec/av1_vaapi: add gm params valid check

2021-10-12 Thread Fei Wang
Signed-off-by: Fei Wang --- libavcodec/vaapi_av1.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavcodec/vaapi_av1.c b/libavcodec/vaapi_av1.c index 16b7e35747..f577447be4 100644 --- a/libavcodec/vaapi_av1.c +++ b/libavcodec/vaapi_av1.c @@ -213,7 +213,8 @@ static int

[FFmpeg-devel] [PATCH v5 5/9] avcodec/dxva2_av1: fix global motion params

2021-10-12 Thread Fei Wang
From: Tong Wu Defined in spec 5.9.24/5.9.25. Since function void global_motion_params(AV1DecContext *s) already updates gm type/params, the wminvalid parameter only need to get the value from cur_frame.gm_invalid. Signed-off-by: Tong Wu --- libavcodec/dxva2_av1.c | 2 +- 1 file changed, 1 inse

[FFmpeg-devel] [PATCH v5 8/9] avcodec/av1_vaapi: enable segmentation features

2021-10-12 Thread Fei Wang
Signed-off-by: Fei Wang --- libavcodec/vaapi_av1.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/libavcodec/vaapi_av1.c b/libavcodec/vaapi_av1.c index 26476c7738..c57d1b898a 100644 --- a/libavcodec/vaapi_av1.c +++ b/libavcodec/vaapi_av1.c @@ -126,6 +126,9 @@ static int

[FFmpeg-devel] [PATCH v5 6/9] avcodec/vaapi: increase av1 decode pool size

2021-10-12 Thread Fei Wang
For film grain clip, vaapi_av1 decoder will cache additional 8 surfaces that will be used to store frames which apply film grain. So increase the pool size by plus 8 to avoid leak of surface. Signed-off-by: Fei Wang --- libavcodec/vaapi_decode.c | 2 +- 1 file changed, 1 insertion(+), 1

[FFmpeg-devel] [PATCH v5 9/9] avcodec/av1_vaapi: improve decode quality

2021-10-12 Thread Fei Wang
- quantizer delta and matrix level specific. - support loop filter delta. - support use superres. Signed-off-by: Fei Wang --- libavcodec/vaapi_av1.c | 68 +- 1 file changed, 41 insertions(+), 27 deletions(-) diff --git a/libavcodec/vaapi_av1.c b

[FFmpeg-devel] [PATCH v5 7/9] avcodec/av1_vaapi: setting 2 output surface for film grain

2021-10-12 Thread Fei Wang
VAAPI needs 2 output surface for film grain frame. One used for reference and the other used for applying film grain and pushing to downstream. Signed-off-by: Fei Wang --- libavcodec/vaapi_av1.c | 115 ++--- 1 file changed, 108 insertions(+), 7 deletions

[FFmpeg-devel] [PATCH v1] lavc/av1dec: drop redundant frame

2021-10-28 Thread Fei Wang
For some non-standard clip which contains multiple display frame data in a ivf packet, drop the redundant frame can make the decode continuously with some warning message shown. Otherwise decode will interrupt with unexpected error. Signed-off-by: Fei Wang --- libavcodec/av1dec.c | 10

[FFmpeg-devel] [PATCH v2] avfilter: add overlay vaapi filter

2021-11-21 Thread Fei Wang
plex "[0:v][1:v]overlay_vaapi=0:0:100:100:0.5[t1]" \ -map "[t1]" -an -c:v h264_vaapi -y out_vaapi.mp4 Signed-off-by: U. Artie Eoff Signed-off-by: Xinpeng Sun Signed-off-by: Zachary Zhou Signed-off-by: Fei Wang --- V2 update: 1. rebase to master. Changelog

[FFmpeg-devel] [PATCH v1] avcodec/av1_parser: ensure only one show frame packed data parsered

2021-12-03 Thread Fei Wang
Split packed data when it contains multiple show frames in some non-standard bitstream. This can benefit downstream decoder which can decode continuously instead of interrupt with unexpected error. Signed-off-by: Fei Wang --- libavcodec/av1_parser.c | 19 +++ 1 file changed, 15

[FFmpeg-devel] [PATCH 1/3] lavu/pix_fmt: add new pixel format x2rgb10

2020-04-21 Thread Fei Wang
The format is packed RGB with each channel 10 bits available and include 2 bits unused. Signed-off-by: Fei Wang --- libavutil/pixdesc.c | 24 libavutil/pixfmt.h | 3 +++ libavutil/version.h | 2 +- tests

[FFmpeg-devel] [PATCH 2/3] swscale: Add swscale input/output support for X2RGB10LE

2020-04-21 Thread Fei Wang
Signed-off-by: Fei Wang --- libswscale/input.c | 13 - libswscale/output.c | 14 ++ libswscale/utils.c | 1 + libswscale/yuv2rgb.c | 22 ++ 4 files changed, 49 insertions(+), 1 deletion(-) diff --git a/libswscale/input.c b/libswscale/input.c

[FFmpeg-devel] [PATCH 3/3] lavu/hwcontext_vaapi: add vaapi_format_map support for x2rgb10

2020-04-21 Thread Fei Wang
Signed-off-by: Fei Wang --- libavutil/hwcontext_vaapi.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libavutil/hwcontext_vaapi.c b/libavutil/hwcontext_vaapi.c index b306965..50727fb 100644 --- a/libavutil/hwcontext_vaapi.c +++ b/libavutil/hwcontext_vaapi.c @@ -136,6 +136,9 @@ static

[FFmpeg-devel] [PATCH v2 2/3] swscale: Add swscale input/output support for X2RGB10LE

2020-04-21 Thread Fei Wang
Signed-off-by: Fei Wang --- libswscale/input.c | 13 - libswscale/output.c | 14 ++ libswscale/utils.c | 1 + libswscale/yuv2rgb.c | 22 ++ tests/ref/fate/filter

[FFmpeg-devel] [PATCH v2 1/3] lavu/pix_fmt: add new pixel format x2rgb10

2020-04-21 Thread Fei Wang
The format is packed RGB with each channel 10 bits available and include 2 bits unused. Signed-off-by: Fei Wang --- libavutil/pixdesc.c | 24 libavutil/pixfmt.h | 3 +++ libavutil/version.h | 2 +- tests/ref

[FFmpeg-devel] [PATCH v2 3/3] lavu/hwcontext_vaapi: add vaapi_format_map support for x2rgb10

2020-04-21 Thread Fei Wang
Signed-off-by: Fei Wang --- libavutil/hwcontext_vaapi.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libavutil/hwcontext_vaapi.c b/libavutil/hwcontext_vaapi.c index b306965..50727fb 100644 --- a/libavutil/hwcontext_vaapi.c +++ b/libavutil/hwcontext_vaapi.c @@ -136,6 +136,9 @@ static

[FFmpeg-devel] [PATCH 2/2] lavfi/vaapi: add more factors when using VAProcColorStandardExplicit

2020-04-25 Thread Fei Wang
Use VAProcColorStandardExplicit only if the color properties all specificed. Signed-off-by: Fei Wang --- libavfilter/vaapi_vpp.c | 12 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/libavfilter/vaapi_vpp.c b/libavfilter/vaapi_vpp.c index 6ffc09d..e1d3373 100644 --- a

[FFmpeg-devel] [PATCH 1/2] lavfi/vaapi: check avaliable before set color properties

2020-04-25 Thread Fei Wang
If the color proerties is UNSPECIFIED(enum value is 2), do not pass the invalid value to driver. Signed-off-by: Fei Wang --- libavfilter/vaapi_vpp.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/libavfilter/vaapi_vpp.c b/libavfilter/vaapi_vpp.c index b5b245c

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

2021-02-23 Thread Fei Wang
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 --- libavfilter/vf_vpp_qsv.c | 25 +++-- 1 file changed

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

2021-03-14 Thread Fei Wang
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 all QSV plugins. Signed-off-by: Fei Wang --- Change: combine used

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

2021-03-30 Thread Fei Wang
qsv=w=1280:h=720:async_depth=4' -c:v h264_qsv -r:v 30 -preset 7 -g 33 -refs 2 -bf 3 -q 24 -f null - \ -vf 'vpp_qsv=w=1280:h=720:async_depth=4' -c:v h264_qsv -r:v 30 -preset 7 -g 33 -refs 2 -bf 3 -q 24 -f null - \ -vf 'vpp_qsv=w=1280:h=720:async_depth=4' -c:v h264_qsv -r:v

[FFmpeg-devel] [PATCH v1 2/9] doc/APIchanges: add new AV_PIX_FMT_P012

2020-06-18 Thread Fei Wang
Signed-off-by: Fei Wang --- doc/APIchanges | 3 +++ 1 file changed, 3 insertions(+) diff --git a/doc/APIchanges b/doc/APIchanges index 1d6cc36b8c..75bca69393 100644 --- a/doc/APIchanges +++ b/doc/APIchanges @@ -15,6 +15,9 @@ libavutil: 2017-10-21 API changes, most recent first: +2020

[FFmpeg-devel] [PATCH v1 3/9] swscale: Add swscale input support for P012

2020-06-18 Thread Fei Wang
Signed-off-by: Fei Wang --- libswscale/input.c | 52 ++ libswscale/utils.c | 1 + 2 files changed, 53 insertions(+) diff --git a/libswscale/input.c b/libswscale/input.c index 0bd1aa7bc9..b0a7d21e60 100644 --- a/libswscale/input.c +++ b/libswscale

[FFmpeg-devel] [PATCH v1 1/9] lavu/pix_fmt: add P012 pixel format

2020-06-18 Thread Fei Wang
P012 is 12bit planner format which is similar to NV12. It using two bytes to store 12bit valid data and 4bit zero in LSB. This format will be used for hardware decode/encode in VAAPI and QSV. Signed-off-by: Fei Wang --- libavutil/pixdesc.c | 24 libavutil

[FFmpeg-devel] [PATCH v1 7/9] lavu/pix_fmt: consider bits per pixel in finding best pix fmt

2020-06-18 Thread Fei Wang
be chosen finally. So add the bits per pixel as one of conditions will return P010 which should be the best choice compare with src fmt. Signed-off-by: Fei Wang --- libavutil/pixdesc.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libavutil/pixdesc.c b/libavutil

[FFmpeg-devel] [PATCH v1 4/9] lavc/hevcdec: add 4:2:0 12-bit VAAPI decode support

2020-06-18 Thread Fei Wang
Signed-off-by: Fei Wang --- libavcodec/hevcdec.c | 4 1 file changed, 4 insertions(+) diff --git a/libavcodec/hevcdec.c b/libavcodec/hevcdec.c index c9e28f5826..d9c54fbc6a 100644 --- a/libavcodec/hevcdec.c +++ b/libavcodec/hevcdec.c @@ -433,6 +433,10 @@ static enum AVPixelFormat get_format

[FFmpeg-devel] [PATCH v1 5/9] lavu/hwcontext_vaapi: add vaapi_format_map support for P012

2020-06-18 Thread Fei Wang
The format will be used for VAAPI and QSV HEVC/VP9 12bit decode. Signed-off-by: Fei Wang --- libavutil/hwcontext_vaapi.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libavutil/hwcontext_vaapi.c b/libavutil/hwcontext_vaapi.c index b31cf95850..b93d8f23e8 100644 --- a/libavutil

[FFmpeg-devel] [PATCH v1 6/9] lavc/vaapi_hevc: support 4:2:0 12bit decode

2020-06-18 Thread Fei Wang
Signed-off-by: Fei Wang --- libavcodec/vaapi_decode.c | 3 +++ libavcodec/vaapi_hevc.c | 3 +++ 2 files changed, 6 insertions(+) diff --git a/libavcodec/vaapi_decode.c b/libavcodec/vaapi_decode.c index 5e4f62baad..1188f530c2 100644 --- a/libavcodec/vaapi_decode.c +++ b/libavcodec

[FFmpeg-devel] [PATCH v1 9/9] FATE/pixfmt_best: add more test case

2020-06-18 Thread Fei Wang
The new test case can cover the issue mentioned in commit 97ba9c1a Signed-off-by: Fei Wang --- libavutil/tests/pixfmt_best.c | 18 ++ tests/ref/fate/pixfmt_best| 2 +- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/libavutil/tests/pixfmt_best.c b/libavutil

[FFmpeg-devel] [PATCH v1 8/9] FATE/pixfmt_best: fix fail by new rules in commit 97ba9c1a

2020-06-18 Thread Fei Wang
Signed-off-by: Fei Wang --- libavutil/tests/pixfmt_best.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavutil/tests/pixfmt_best.c b/libavutil/tests/pixfmt_best.c index 53f7264207..01387c7c98 100644 --- a/libavutil/tests/pixfmt_best.c +++ b/libavutil/tests/pixfmt_best.c

[FFmpeg-devel] [PATCH v1] avfilter/tonemap_vaapi: set va parameters filters and numbers

2020-06-29 Thread Fei Wang
This can fill VAProcPipelineParameterBuffer correctly and make the pipeline works. Signed-off-by: Fei Wang --- libavfilter/vf_tonemap_vaapi.c | 5 + 1 file changed, 5 insertions(+) diff --git a/libavfilter/vf_tonemap_vaapi.c b/libavfilter/vf_tonemap_vaapi.c index 2f41b90424..9f52590a49

[FFmpeg-devel] [PATCH v1] avfilter: add overlay vaapi filter

2020-06-29 Thread Fei Wang
"[0:v][1:v]overlay_vaapi=w=50:h=50:alpha=0.5" \ -c:v h264_vaapi -y OUTPUT.h264 Signed-off-by: Xinpeng Sun Signed-off-by: Zachary Zhou Signed-off-by: Fei Wang --- Changelog | 1 + configure | 3 + doc/filters.texi | 51

[FFmpeg-devel] [PATCH v2] avcodec/cbs_av1: avoid reading trailing bits when obu type is OBU_TILE_LIST

2019-12-10 Thread Fei Wang
Signed-off-by: Fei Wang --- libavcodec/cbs_av1.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavcodec/cbs_av1.c b/libavcodec/cbs_av1.c index bbe4461130..ab006f4d11 100644 --- a/libavcodec/cbs_av1.c +++ b/libavcodec/cbs_av1.c @@ -1039,6 +1039,7 @@ static int cbs_av1_read_unit

[FFmpeg-devel] [PATCH v2] avcodec/cbs_av1: rename enable_intraintra_compound flag

2019-12-10 Thread Fei Wang
rename enable_intraintra_compound to enable_interintra_compound, which keep same as AV1 sepc(v1.0.0-errata1). Signed-off-by: Fei Wang --- libavcodec/cbs_av1.h | 2 +- libavcodec/cbs_av1_syntax_template.c | 4 ++-- libavformat/av1.c| 2 +- 3 files changed, 4

[FFmpeg-devel] [PATCH] avcodec/cbs_av1: avoid reset some members of loop filter

2019-12-13 Thread Fei Wang
According to spec 6.8.10, loop_filter_ref_deltas & loop_filter_mode_deltas should be keep same as its previous value if it is not presented in current syntax. Signed-off-by: Fei Wang --- libavcodec/cbs_av1.h | 3 +++ libavcodec/cbs_av1_syntax_template.c

[FFmpeg-devel] [PATCH v1] avcodec/vaapi_av1: correct data size when create slice data buffer

2021-05-16 Thread Fei Wang
Set all tiles size to create slice data buffer, hardware will use slice_data_offset/slice_data_size in slice parameter buffer to get each tile's data. This change will let it success to decode clip which has multi tiles data inside one OBU. Signed-off-by: Fei Wang --- libavcodec/vaapi_

[FFmpeg-devel] [PATCH v2] avcodec/vaapi_av1: pass full buffer size for each tile

2021-05-18 Thread Fei Wang
Previously, only the size of a given tile was passed, making the offset and size marked in VASliceParameterBufferAV1 invalid with multiple tiles. Signed-off-by: Fei Wang --- Change: 1. update commit message. libavcodec/vaapi_av1.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

[FFmpeg-devel] [PATCH 1/9] cbs_av1: fix incorrect data type

2021-06-16 Thread Fei Wang
shifted_order_hints is computed by data with int plus data with int. Switch to int8_t may lose its precision. Signed-off-by: Fei Wang --- libavcodec/cbs_av1_syntax_template.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/cbs_av1_syntax_template.c b/libavcodec

[FFmpeg-devel] [PATCH 2/9] avcodec/av1: extend some definitions in spec section 3

2021-06-16 Thread Fei Wang
Signed-off-by: Fei Wang --- libavcodec/av1.h | 7 +++ 1 file changed, 7 insertions(+) diff --git a/libavcodec/av1.h b/libavcodec/av1.h index 0f99ae4829..951a18ecb2 100644 --- a/libavcodec/av1.h +++ b/libavcodec/av1.h @@ -114,6 +114,13 @@ enum { AV1_WARP_MODEL_TRANSLATION = 1

[FFmpeg-devel] [PATCH 3/9] avcodec/av1dec: support setup shear process

2021-06-16 Thread Fei Wang
Defined in spec 7.11.3.6/7.11.3.7. Signed-off-by: Fei Wang --- libavcodec/av1dec.c | 97 + libavcodec/av1dec.h | 1 + 2 files changed, 98 insertions(+) diff --git a/libavcodec/av1dec.c b/libavcodec/av1dec.c index 1dda0f9160..3fca17e84b 100644 --- a

[FFmpeg-devel] [PATCH 4/9] avcodec/av1_vaapi: add gm params valid check

2021-06-16 Thread Fei Wang
Signed-off-by: Fei Wang --- libavcodec/vaapi_av1.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavcodec/vaapi_av1.c b/libavcodec/vaapi_av1.c index 16b7e35747..f577447be4 100644 --- a/libavcodec/vaapi_av1.c +++ b/libavcodec/vaapi_av1.c @@ -213,7 +213,8 @@ static int

[FFmpeg-devel] [PATCH 7/9] avcodec/av1_vaapi: set display surface when apply film grain

2021-06-16 Thread Fei Wang
Signed-off-by: Fei Wang --- libavcodec/vaapi_av1.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/vaapi_av1.c b/libavcodec/vaapi_av1.c index f577447be4..81b13bb1aa 100644 --- a/libavcodec/vaapi_av1.c +++ b/libavcodec/vaapi_av1.c @@ -76,7 +76,7 @@ static int

[FFmpeg-devel] [PATCH 5/9] avcodec/vaapi: increase av1 decode pool size

2021-06-16 Thread Fei Wang
For film grain clip, vaapi_av1 decoder will cache additional 8 surfaces that will be used to store frames which apply film grain. So increase the pool size by plus 8 to avoid leak of surface. Signed-off-by: Fei Wang --- libavcodec/vaapi_decode.c | 2 +- 1 file changed, 1 insertion(+), 1

[FFmpeg-devel] [PATCH 8/9] avcodec/av1_vaapi: enable segmentation features

2021-06-16 Thread Fei Wang
Signed-off-by: Fei Wang --- libavcodec/vaapi_av1.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/libavcodec/vaapi_av1.c b/libavcodec/vaapi_av1.c index 81b13bb1aa..6aaabed2c1 100644 --- a/libavcodec/vaapi_av1.c +++ b/libavcodec/vaapi_av1.c @@ -63,6 +63,9 @@ static int

[FFmpeg-devel] [PATCH 9/9] avcodec/av1_vaapi: improve decode quality

2021-06-16 Thread Fei Wang
- quantizer delta and matrix level specific. - support loop filter delta. - support use superres. Signed-off-by: Fei Wang --- libavcodec/vaapi_av1.c | 67 ++ 1 file changed, 41 insertions(+), 26 deletions(-) diff --git a/libavcodec/vaapi_av1.c b

[FFmpeg-devel] [PATCH 6/9] avcodec/av1dec: add display frame for film grain usage

2021-06-16 Thread Fei Wang
Make it flexible if decode frame(without apply film grain) and display frame(applied film grain) both needed when decode film grain clips. Signed-off-by: Fei Wang --- libavcodec/av1dec.c | 43 ++- libavcodec/av1dec.h | 3 +++ 2 files changed, 45

[FFmpeg-devel] [PATCH v2 2/9] avcodec/av1: extend some definitions in spec section 3

2021-07-04 Thread Fei Wang
Signed-off-by: Fei Wang --- libavcodec/av1.h | 7 +++ 1 file changed, 7 insertions(+) diff --git a/libavcodec/av1.h b/libavcodec/av1.h index 0f99ae4829..951a18ecb2 100644 --- a/libavcodec/av1.h +++ b/libavcodec/av1.h @@ -114,6 +114,13 @@ enum { AV1_WARP_MODEL_TRANSLATION = 1

[FFmpeg-devel] [PATCH v2 1/9] cbs_av1: fix incorrect data type

2021-07-04 Thread Fei Wang
Since order_hint_bits_minus_1 range is 0~7, cur_frame_hint can be most 128. And similar return value for cbs_av1_get_relative_dist. So if plus them and use int8_t for the result may lose its precision. Signed-off-by: Fei Wang --- v2 update: 1. use int16_t instead of int. 2. updated commit

[FFmpeg-devel] [PATCH v2 3/9] avcodec/av1dec: support setup shear process

2021-07-04 Thread Fei Wang
Defined in spec 7.11.3.6/7.11.3.7. Signed-off-by: Fei Wang --- libavcodec/av1dec.c | 97 + libavcodec/av1dec.h | 1 + 2 files changed, 98 insertions(+) diff --git a/libavcodec/av1dec.c b/libavcodec/av1dec.c index 1dda0f9160..3fca17e84b 100644 --- a

[FFmpeg-devel] [PATCH v2 4/9] avcodec/av1_vaapi: add gm params valid check

2021-07-04 Thread Fei Wang
Signed-off-by: Fei Wang --- libavcodec/vaapi_av1.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavcodec/vaapi_av1.c b/libavcodec/vaapi_av1.c index 16b7e35747..f577447be4 100644 --- a/libavcodec/vaapi_av1.c +++ b/libavcodec/vaapi_av1.c @@ -213,7 +213,8 @@ static int

[FFmpeg-devel] [PATCH v2 5/9] avcodec/vaapi: increase av1 decode pool size

2021-07-04 Thread Fei Wang
For film grain clip, vaapi_av1 decoder will cache additional 8 surfaces that will be used to store frames which apply film grain. So increase the pool size by plus 8 to avoid leak of surface. Signed-off-by: Fei Wang --- libavcodec/vaapi_decode.c | 2 +- 1 file changed, 1 insertion(+), 1

[FFmpeg-devel] [PATCH v2 6/9] avcodec/av1dec: add display frame for film grain usage

2021-07-04 Thread Fei Wang
Make it flexible if decode frame(without apply film grain) and display frame(applied film grain) both needed when decode film grain clips. Signed-off-by: Fei Wang --- libavcodec/av1dec.c | 43 ++- libavcodec/av1dec.h | 3 +++ 2 files changed, 45

[FFmpeg-devel] [PATCH v2 7/9] avcodec/av1_vaapi: set display surface when apply film grain

2021-07-04 Thread Fei Wang
Signed-off-by: Fei Wang --- libavcodec/vaapi_av1.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/vaapi_av1.c b/libavcodec/vaapi_av1.c index f577447be4..81b13bb1aa 100644 --- a/libavcodec/vaapi_av1.c +++ b/libavcodec/vaapi_av1.c @@ -76,7 +76,7 @@ static int

[FFmpeg-devel] [PATCH v2 8/9] avcodec/av1_vaapi: enable segmentation features

2021-07-04 Thread Fei Wang
Signed-off-by: Fei Wang --- libavcodec/vaapi_av1.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/libavcodec/vaapi_av1.c b/libavcodec/vaapi_av1.c index 81b13bb1aa..6aaabed2c1 100644 --- a/libavcodec/vaapi_av1.c +++ b/libavcodec/vaapi_av1.c @@ -63,6 +63,9 @@ static int

[FFmpeg-devel] [PATCH v2 9/9] avcodec/av1_vaapi: improve decode quality

2021-07-04 Thread Fei Wang
- quantizer delta and matrix level specific. - support loop filter delta. - support use superres. Signed-off-by: Fei Wang --- libavcodec/vaapi_av1.c | 67 ++ 1 file changed, 41 insertions(+), 26 deletions(-) diff --git a/libavcodec/vaapi_av1.c b

[FFmpeg-devel] [PATCH v3 1/9] cbs_av1: fix incorrect data type

2021-07-05 Thread Fei Wang
Since order_hint_bits_minus_1 range is 0~7, cur_frame_hint can be most 128. And similar return value for cbs_av1_get_relative_dist. So if plus them and use int8_t for the result may lose its precision. Signed-off-by: Fei Wang --- libavcodec/cbs_av1_syntax_template.c | 2 +- 1 file changed, 1

[FFmpeg-devel] [PATCH v3 2/9] avcodec/av1: extend some definitions in spec section 3

2021-07-05 Thread Fei Wang
Signed-off-by: Fei Wang --- libavcodec/av1.h | 7 +++ 1 file changed, 7 insertions(+) diff --git a/libavcodec/av1.h b/libavcodec/av1.h index 0f99ae4829..951a18ecb2 100644 --- a/libavcodec/av1.h +++ b/libavcodec/av1.h @@ -114,6 +114,13 @@ enum { AV1_WARP_MODEL_TRANSLATION = 1

[FFmpeg-devel] [PATCH v3 3/9] avcodec/av1dec: support setup shear process

2021-07-05 Thread Fei Wang
Defined in spec 7.11.3.6/7.11.3.7. Signed-off-by: Fei Wang --- update: 1. add the comment for table div_lut. libavcodec/av1dec.c | 98 + libavcodec/av1dec.h | 1 + 2 files changed, 99 insertions(+) diff --git a/libavcodec/av1dec.c b/libavcodec

[FFmpeg-devel] [PATCH v3 4/9] avcodec/av1_vaapi: add gm params valid check

2021-07-05 Thread Fei Wang
Signed-off-by: Fei Wang --- libavcodec/vaapi_av1.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavcodec/vaapi_av1.c b/libavcodec/vaapi_av1.c index 16b7e35747..f577447be4 100644 --- a/libavcodec/vaapi_av1.c +++ b/libavcodec/vaapi_av1.c @@ -213,7 +213,8 @@ static int

[FFmpeg-devel] [PATCH v3 5/9] avcodec/vaapi: increase av1 decode pool size

2021-07-05 Thread Fei Wang
For film grain clip, vaapi_av1 decoder will cache additional 8 surfaces that will be used to store frames which apply film grain. So increase the pool size by plus 8 to avoid leak of surface. Signed-off-by: Fei Wang --- libavcodec/vaapi_decode.c | 2 +- 1 file changed, 1 insertion(+), 1

[FFmpeg-devel] [PATCH v3 6/9] avcodec/av1dec: add display frame for film grain usage

2021-07-05 Thread Fei Wang
Make it flexible if decode frame(without apply film grain) and display frame(applied film grain) both needed when decode film grain clips. Signed-off-by: Fei Wang --- libavcodec/av1dec.c | 43 ++- libavcodec/av1dec.h | 3 +++ 2 files changed, 45

[FFmpeg-devel] [PATCH v3 9/9] avcodec/av1_vaapi: improve decode quality

2021-07-05 Thread Fei Wang
- quantizer delta and matrix level specific. - support loop filter delta. - support use superres. Signed-off-by: Fei Wang --- libavcodec/vaapi_av1.c | 67 ++ 1 file changed, 41 insertions(+), 26 deletions(-) diff --git a/libavcodec/vaapi_av1.c b

[FFmpeg-devel] [PATCH v3 7/9] avcodec/av1_vaapi: set display surface when apply film grain

2021-07-05 Thread Fei Wang
Signed-off-by: Fei Wang --- libavcodec/vaapi_av1.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/vaapi_av1.c b/libavcodec/vaapi_av1.c index f577447be4..81b13bb1aa 100644 --- a/libavcodec/vaapi_av1.c +++ b/libavcodec/vaapi_av1.c @@ -76,7 +76,7 @@ static int

[FFmpeg-devel] [PATCH v3 8/9] avcodec/av1_vaapi: enable segmentation features

2021-07-05 Thread Fei Wang
Signed-off-by: Fei Wang --- libavcodec/vaapi_av1.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/libavcodec/vaapi_av1.c b/libavcodec/vaapi_av1.c index 81b13bb1aa..6aaabed2c1 100644 --- a/libavcodec/vaapi_av1.c +++ b/libavcodec/vaapi_av1.c @@ -63,6 +63,9 @@ static int

[FFmpeg-devel] [PATCH v4 1/9] cbs_av1: fix incorrect data type

2021-07-08 Thread Fei Wang
Since order_hint_bits_minus_1 range is 0~7, cur_frame_hint can be most 128. And similar return value for cbs_av1_get_relative_dist. So if plus them and use int8_t for the result may lose its precision. Signed-off-by: Fei Wang --- libavcodec/cbs_av1_syntax_template.c | 2 +- 1 file changed, 1

[FFmpeg-devel] [PATCH v4 2/9] avcodec/av1: extend some definitions in spec section 3

2021-07-08 Thread Fei Wang
Signed-off-by: Fei Wang --- libavcodec/av1.h | 7 +++ 1 file changed, 7 insertions(+) diff --git a/libavcodec/av1.h b/libavcodec/av1.h index 0f99ae4829..951a18ecb2 100644 --- a/libavcodec/av1.h +++ b/libavcodec/av1.h @@ -114,6 +114,13 @@ enum { AV1_WARP_MODEL_TRANSLATION = 1

[FFmpeg-devel] [PATCH v4 3/9] avcodec/av1dec: support setup shear process

2021-07-08 Thread Fei Wang
Defined in spec 7.11.3.6/7.11.3.7. Signed-off-by: Fei Wang --- update: 1. fix possible overflow issue. libavcodec/av1dec.c | 98 + libavcodec/av1dec.h | 1 + 2 files changed, 99 insertions(+) diff --git a/libavcodec/av1dec.c b/libavcodec/av1dec.c

[FFmpeg-devel] [PATCH v4 4/9] avcodec/av1_vaapi: add gm params valid check

2021-07-08 Thread Fei Wang
Signed-off-by: Fei Wang --- libavcodec/vaapi_av1.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavcodec/vaapi_av1.c b/libavcodec/vaapi_av1.c index 16b7e35747..f577447be4 100644 --- a/libavcodec/vaapi_av1.c +++ b/libavcodec/vaapi_av1.c @@ -213,7 +213,8 @@ static int

[FFmpeg-devel] [PATCH v4 5/9] avcodec/vaapi: increase av1 decode pool size

2021-07-08 Thread Fei Wang
For film grain clip, vaapi_av1 decoder will cache additional 8 surfaces that will be used to store frames which apply film grain. So increase the pool size by plus 8 to avoid leak of surface. Signed-off-by: Fei Wang --- libavcodec/vaapi_decode.c | 2 +- 1 file changed, 1 insertion(+), 1

[FFmpeg-devel] [PATCH v4 6/9] avcodec/av1dec: add display frame for film grain usage

2021-07-08 Thread Fei Wang
Make it flexible if decode frame(without apply film grain) and display frame(applied film grain) both needed when decode film grain clips. Signed-off-by: Fei Wang --- libavcodec/av1dec.c | 43 ++- libavcodec/av1dec.h | 3 +++ 2 files changed, 45

[FFmpeg-devel] [PATCH v4 8/9] avcodec/av1_vaapi: enable segmentation features

2021-07-08 Thread Fei Wang
Signed-off-by: Fei Wang --- libavcodec/vaapi_av1.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/libavcodec/vaapi_av1.c b/libavcodec/vaapi_av1.c index 81b13bb1aa..6aaabed2c1 100644 --- a/libavcodec/vaapi_av1.c +++ b/libavcodec/vaapi_av1.c @@ -63,6 +63,9 @@ static int

[FFmpeg-devel] [PATCH v4 9/9] avcodec/av1_vaapi: improve decode quality

2021-07-08 Thread Fei Wang
- quantizer delta and matrix level specific. - support loop filter delta. - support use superres. Signed-off-by: Fei Wang --- libavcodec/vaapi_av1.c | 67 ++ 1 file changed, 41 insertions(+), 26 deletions(-) diff --git a/libavcodec/vaapi_av1.c b

[FFmpeg-devel] [PATCH v4 7/9] avcodec/av1_vaapi: set display surface when apply film grain

2021-07-08 Thread Fei Wang
Signed-off-by: Fei Wang --- libavcodec/vaapi_av1.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/vaapi_av1.c b/libavcodec/vaapi_av1.c index f577447be4..81b13bb1aa 100644 --- a/libavcodec/vaapi_av1.c +++ b/libavcodec/vaapi_av1.c @@ -76,7 +76,7 @@ static int

[FFmpeg-devel] [PATCH V3 2/2] avcodec: add av1 VAAPI decoder

2020-09-08 Thread Fei Wang
Example cmdline: ffmpeg -hwaccel vaapi -hwaccel_device /dev/dri/renderD128 -v verbose \ -c:v av1 -i input.ivf -pix_fmt yuv420p -vsync passthrough -f md5 \ -y out.md5 Signed-off-by: Fei Wang --- Changelog | 1 + configure | 3 + libavcodec/Makefile

[FFmpeg-devel] [PATCH V3 1/2] avcodec: add av1 hardware acceleration decoder

2020-09-08 Thread Fei Wang
This av1 decoder is now only used for av1 hardware acceleration decoder. Consider it can be extend to a local decoder like hevc or vp9 in the future, so define its name as "av1" and put it into external libraries codec list. Signed-off-by: Fei Wang --- update: 1. reuse buffer for tile_

[FFmpeg-devel] [PATCH] avcodec/av1dec: check avctx->hwaccel when hwaccel pix_fmt selected

2020-09-17 Thread Fei Wang
Pix fmt with hwaccel flag may not be chosen in format probing, in this case avctx->hwaccel will not be inited. Signed-off-by: Fei Wang --- libavcodec/av1dec.c | 12 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/libavcodec/av1dec.c b/libavcodec/av1dec.c in

[FFmpeg-devel] [PATCH v4] avcodec: add av1 VAAPI decoder

2020-10-02 Thread Fei Wang
Example cmdline: ffmpeg -hwaccel vaapi -hwaccel_device /dev/dri/renderD128 -v verbose \ -c:v av1 -i input.ivf -pix_fmt yuv420p -vsync passthrough -f md5 \ -y out.md5 Signed-off-by: Fei Wang --- Changelog | 1 + configure | 3 + libavcodec/Makefile

[FFmpeg-devel] [PATCH v5] avcodec: add av1 VAAPI decoder

2020-10-29 Thread Fei Wang
Example cmdline: ffmpeg -hwaccel vaapi -hwaccel_device /dev/dri/renderD128 -v verbose \ -c:v av1 -i input.ivf -pix_fmt yuv420p -vsync passthrough -f md5 \ -y out.md5 Signed-off-by: Fei Wang --- change: 1.rebase v4 to master. Changelog | 1 + configure

[FFmpeg-devel] [PATCH v4 1/2] lavc: add HWACCEL_CAP_RESET_WITHOUT_UNINIT capacity for hwaccel

2022-11-08 Thread Fei Wang
resolution clips, need to avoid changing vaContext in avctx->internal->hwaccel_priv_data if current frame resolution change and it reference a pervious frame with different resolution. Otherwise reference frame's information bound in vaContext will be lost, then corrupt current frame. Signed-

[FFmpeg-devel] [PATCH v4 2/2] lavc/vaapi_decode: add support for HWACCEL_CAP_RESET_WITHOUT_UNINIT

2022-11-08 Thread Fei Wang
This can fix vp9 decode image corruption when the frame size is change, but the pervious frames still be referenced. Surfaces don't need to be bound to vaContext only after VAAPI 1.0.0: https://github.com/intel/libva/commit/492b692005ccd0d8da190209d5b3ae7b7825f4b8 Signed-off-by: Fei

[FFmpeg-devel] [PATCH v5 1/2] lavc: add HWACCEL_CAP_RESET_WITHOUT_UNINIT capacity for hwaccel

2022-11-13 Thread Fei Wang
resolution clips, need to avoid changing vaContext in avctx->internal->hwaccel_priv_data if current frame resolution change and it reference a pervious frame with different resolution. Otherwise reference frame's information bound in vaContext will be lost, then corrupt current frame. Signed-

[FFmpeg-devel] [PATCH v5 2/2] lavc/vaapi_decode: add support for HWACCEL_CAP_RESET_WITHOUT_UNINIT

2022-11-13 Thread Fei Wang
This can fix vp9 decode image corruption when the frame size is change, but the pervious frames still be referenced. Surfaces don't need to be bound to vaContext only after VAAPI 1.0.0: https://github.com/intel/libva/commit/492b692005ccd0d8da190209d5b3ae7b7825f4b8 Signed-off-by: Fei

[FFmpeg-devel] [PATCH v1 01/13] lavc/hevc_ps: remove profile limitation of pps_range_extensions()

2022-12-01 Thread Fei Wang
Follow spec 7.3.2.3.1. Signed-off-by: Fei Wang --- libavcodec/hevc_ps.c | 2 +- tests/ref/fate/hevc-conformance-PS_A_VIDYO_3 | 50 ++-- 2 files changed, 26 insertions(+), 26 deletions(-) diff --git a/libavcodec/hevc_ps.c b/libavcodec/hevc_ps.c index

[FFmpeg-devel] [PATCH v1 02/13] lavc/avcodec: Add HEVC Screen Content Coding Extensions profile

2022-12-01 Thread Fei Wang
From: Linjie Fu Described in HEVC spec A.3.7. Signed-off-by: Linjie Fu Signed-off-by: Fei Wang --- 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

[FFmpeg-devel] [PATCH v1 03/13] lavc/hevc_ps: Add SPS/PPS parse support for HEVC extension syntax

2022-12-01 Thread Fei Wang
without this change. 3. Format brace in pps_range_extensions(). Signed-off-by: Linjie Fu Signed-off-by: Haihao Xiang Signed-off-by: Fei Wang --- libavcodec/hevc.h| 3 + libavcodec/hevc_ps.c | 293 +-- libavcodec/hevc_ps.h | 69 ++ 3 files

[FFmpeg-devel] [PATCH v1 04/13] lavc/hevcdec: Add slice parse support for HEVC SCC extension

2022-12-01 Thread Fei Wang
From: Linjie Fu Signed-off-by: Linjie Fu Signed-off-by: Fei Wang --- libavcodec/hevcdec.c | 6 ++ libavcodec/hevcdec.h | 4 2 files changed, 10 insertions(+) diff --git a/libavcodec/hevcdec.c b/libavcodec/hevcdec.c index fb44d8d3f2..edf3a2b134 100644 --- a/libavcodec/hevcdec.c +++ b

[FFmpeg-devel] [PATCH v1 05/13] lavc/hevcdec: Fix the parsing for use_integer_mv_flag

2022-12-01 Thread Fei Wang
From: Linjie Fu According to 7.3.6.1, use_integer_mv_flag should be parsed if motion_vector_resolution_control_idc equals to 2. If not present, it equals to motion_vector_resolution_control_idc. Signed-off-by: Linjie Fu Signed-off-by: Fei Wang --- libavcodec/hevcdec.c | 8

[FFmpeg-devel] [PATCH v1 06/13] lavc/hevcdec: Set max_num_merge_cand to uint8_t

2022-12-01 Thread Fei Wang
From: Linjie Fu uint8_t is big enough and keep consistent with the definition in cbs_h265.h. Signed-off-by: Linjie Fu Signed-off-by: Fei Wang --- libavcodec/hevcdec.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/hevcdec.h b/libavcodec/hevcdec.h index

[FFmpeg-devel] [PATCH v1 07/13] lavc/hevc: Update reference list for SCC

2022-12-01 Thread Fei Wang
e any more. Constructe RefPicListTemp and RefPicList according to 8-8/9/10. Disable slice decoding for SCC profile to avoid unexpected error in hevc native decoder and patch welcome. Signed-off-by: Linjie Fu Signed-off-by: Fei Wang --- libavcodec/hevc_refs.c | 21 -

[FFmpeg-devel] [PATCH v1 09/13] lavc/vaapi_hevc: Add vaapi profile parse support for SCC

2022-12-01 Thread Fei Wang
From: Linjie Fu Note that Screen-Extended Main 4:4:4 and 4:4:4 10 supports chroma_format_idc from 0, 1 or 3, hence both 420 and 444 are supported. Signed-off-by: Linjie Fu Signed-off-by: Fei Wang --- libavcodec/vaapi_decode.c | 4 +++- libavcodec/vaapi_hevc.c | 14

[FFmpeg-devel] [PATCH v1 10/13] lavc/vaapi_hevc: Set correct rps type for scc

2022-12-01 Thread Fei Wang
From: Linjie Fu According to 8.1.3 and 8.3.2. Signed-off-by: Linjie Fu Signed-off-by: Fei Wang --- libavcodec/vaapi_hevc.c | 4 1 file changed, 4 insertions(+) diff --git a/libavcodec/vaapi_hevc.c b/libavcodec/vaapi_hevc.c index 6ce1e17fa8..005d782819 100644 --- a/libavcodec

[FFmpeg-devel] [PATCH v1 11/13] lavc/vaapi_hevc: Loose the restricts for SCC decoding

2022-12-01 Thread Fei Wang
From: Linjie Fu Allow current picture as the reference picture. Signed-off-by: Linjie Fu Signed-off-by: Fei Wang --- libavcodec/vaapi_hevc.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libavcodec/vaapi_hevc.c b/libavcodec/vaapi_hevc.c index 005d782819

[FFmpeg-devel] [PATCH v1 08/13] lavc/vaapi_hevc: Pass SCC parameters Through VA-API

2022-12-01 Thread Fei Wang
From: Linjie Fu Including sps/pps/slice parameters. Signed-off-by: Linjie Fu Signed-off-by: Fei Wang --- libavcodec/vaapi_hevc.c | 52 + 1 file changed, 47 insertions(+), 5 deletions(-) diff --git a/libavcodec/vaapi_hevc.c b/libavcodec/vaapi_hevc.c

[FFmpeg-devel] [PATCH v1 12/13] avcodec/hevcdec: Replace number with enum

2022-12-01 Thread Fei Wang
Keep same style with IS_IDR()/IS_BLA(). Signed-off-by: Fei Wang --- libavcodec/hevcdec.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/hevcdec.h b/libavcodec/hevcdec.h index aab816791e..94609e4699 100644 --- a/libavcodec/hevcdec.h +++ b/libavcodec/hevcdec.h

[FFmpeg-devel] [PATCH v1 13/13] lavc/vaapi_hevc: Remove duplicate code

2022-12-01 Thread Fei Wang
Signed-off-by: Fei Wang --- libavcodec/vaapi_hevc.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/libavcodec/vaapi_hevc.c b/libavcodec/vaapi_hevc.c index ca14052d56..b3ff2f7344 100644 --- a/libavcodec/vaapi_hevc.c +++ b/libavcodec/vaapi_hevc.c @@ -538,12 +538,6 @@ static int

[FFmpeg-devel] [PATCH v2 01/13] lavc/hevc_ps: remove profile limitation of pps_range_extensions()

2022-12-04 Thread Fei Wang
Follow spec 7.3.2.3.1. Signed-off-by: Fei Wang --- update: 1. fix uninitialized variable which may cause segment fault. libavcodec/hevc_ps.c | 2 +- tests/ref/fate/hevc-conformance-PS_A_VIDYO_3 | 50 ++-- 2 files changed, 26 insertions(+), 26 deletions

[FFmpeg-devel] [PATCH v2 02/13] lavc/avcodec: Add HEVC Screen Content Coding Extensions profile

2022-12-04 Thread Fei Wang
From: Linjie Fu Described in HEVC spec A.3.7. Signed-off-by: Linjie Fu Signed-off-by: Fei Wang --- 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

[FFmpeg-devel] [PATCH v2 03/13] lavc/hevc_ps: Add SPS/PPS parse support for HEVC extension syntax

2022-12-04 Thread Fei Wang
without this change. 3. Format brace in pps_range_extensions(). Signed-off-by: Linjie Fu Signed-off-by: Haihao Xiang Signed-off-by: Fei Wang --- libavcodec/hevc.h| 3 + libavcodec/hevc_ps.c | 288 +-- libavcodec/hevc_ps.h | 69 +++ 3 files

  1   2   3   >