Commit Graph

3625 Commits

Author SHA1 Message Date
Herman Chen
1b822d1fdd [rc]: Fix invalid init qp error
Change-Id: I15cdbab2fda156bd2fdc3ef6daf535c584bea4d1
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2021-01-29 15:12:56 +08:00
Herman Chen
8dd7e8f37f [mpp_soc]: rk356x has jpeg decoder with pp
Change-Id: I5e9225299b842796e6e57f481b25ed5af26f6edf
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2021-01-27 15:28:47 +08:00
Herman Chen
86a1849bd5 [mpp_enc_cfg]: Fix node length mismatch
Change-Id: If5d5e93981a32a19e36d4601190ca250b22272b9
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2021-01-27 15:00:31 +08:00
Herman Chen
fb714ced4c [mpp_enc]: Add qp check on rc config
Change-Id: I7f8978db79821bb19e8af5391653ae5e1e01cacc
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2021-01-22 18:06:17 +08:00
Yandong Lin
6cecbf071b [hal_vdpu34x]: Refine rcb size
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: I63c4badc6659862509d638d00a5db1e8da200071
2021-01-22 16:43:08 +08:00
Johnson Ding
a2caeb423a [mpp_soc]: Fix vdpu jpeg with pp failed issue
Change-Id: I0d8418d187a3a44773342dccd1f8730cd6b54168
Signed-off-by: Johnson Ding <johnson.ding@rock-chips.com>
2021-01-20 18:26:34 +08:00
Johnson Ding
a1070cced0 [jpegd]: Support NV21 format for rkv jpegd
Change-Id: If3b5006d0abd17ddd525c88b7922bf6eb796b61f
Signed-off-by: Johnson Ding <johnson.ding@rock-chips.com>
2021-01-20 18:17:58 +08:00
Johnson Ding
abac9c3abe [jpegd]: reset table counter before parsing
In mjpeg decoding without re-init case, qtable counter and htable
counter will keep growing. And generating regs will fail.

Change-Id: Ic48f919d80e5fc73f3e0d0380625da7aa254cdb8
Signed-off-by: Johnson Ding <johnson.ding@rock-chips.com>
2021-01-20 18:17:47 +08:00
Herman Chen
c440a5ee28 [mpp_enc]: Deprecate MPP_ENC_PRE_ALLOC_BUFF
Change-Id: I42ea6ce9897af4e5b6f1a1d1bf3beb5173a8f568
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2021-01-20 17:19:13 +08:00
Herman Chen
0ce3ed3048 [mpp_list]: Use class inheritance
Change-Id: I3ef33ca9bdcfea80a6c05a8c69db2d4938a5d0eb
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2021-01-19 17:06:16 +08:00
sayon.chen
3f5b640345 [mpp_enc_v2]: Modify idr set flow
Move idr request to mpp_enc_proc_cfg

Change-Id: Ic93af13297971b9fd2766bc18b7c6fd71ce18d09
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
2021-01-19 08:35:23 +08:00
Herman Chen
55440c0d56 [rc]: On intra reenc do not add ration to scale_qp
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I995ce9e5867374fafa701061fbb5866afb7b76d4
2021-01-15 17:00:43 +08:00
Johnson Ding
e6d2ab3c60 [h264e]: Add gaps in frame_num config entry
Some of NVR product may do some thing special when decoding the first
GOP of bitstream encoded by MPP, and report "gaps in frame_num is not
allowed" although frame_num is bitstream is continuous. Setting
gaps_in_frame_num_allowed_flag to true will avoid this problem.

1. Set gaps_in_frame_num_allowed_flag true as default
2. call mpp_enc_cfg_set_u32(cfg, "h264:gaps_not_allowed", 1) if you
want gaps_in_frame_num_allowed_flag to be false.

Change-Id: I8242fb318e051a61772c02a2c8bb59e4b589ff6d
Signed-off-by: Johnson Ding <johnson.ding@rock-chips.com>
2021-01-15 16:40:48 +08:00
sayon.chen
6f16b401d7 [rc_v2]: Add I frame debreath process
Change-Id: I17a5fb8515b51170e3a1066b69870045775bca82
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
2021-01-15 16:37:48 +08:00
sayon.chen
bae7d889e7 [rc_api]: Reorganize RcMode same as MppEncRcMode
Change-Id: I04f5b7a1335aa0b6d7f9a03f98950dbedc5cd4cf
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
2021-01-15 15:23:46 +08:00
sayon.chen
816f1a4f7d [rc_v2]: Add debreath cfg interface
Change-Id: Id8a729dc35e1b4fd2c9d3eab95d902bd5d7d96f2
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
2021-01-15 14:55:14 +08:00
sayon.chen
148a2b0b7a [rc_v2]: Add iblk4_prop info
Change-Id: I2d573a2170226472ad913e6b5068d80a18d220e5
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
2021-01-15 14:11:52 +08:00
Herman Chen
ac65d47d55 [rc]: Change vepu541 tuning parameter
1. Set H.265 initial ip_qp_delta to 6.
2. When ip_qp_delta is enabled the minimum value is limited to 4.
3. Increase vepu541 H.264 encoder I frame bias to get better detail.

Change-Id: I6b000f2afe27fbeaffe966d88256cc3589ddef99
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2021-01-14 15:45:36 +08:00
Herman Chen
5569c2c68d [rc]: Set statistic time to minimum 2s
NOTE: Gop is better to be integer multiples of output fps.

Change-Id: Id42e2e0c076d6c0a3f67756dc73dca7451b95ff6
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2021-01-14 15:21:36 +08:00
Ding Wei
b64d32cac8 [hal_h264d]: refine rcb_size for rcb_info
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
Change-Id: I0cfc9d38f92a4ffe842786baaba22285c80a4966
2021-01-14 15:00:12 +08:00
Ding Wei
b3ce4085f7 [vdpu34x]: add rcb_info for rkvdec
tips:
    according to rcb_size descending, and sent rcb_info to the kernel.

Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
Change-Id: I85e951d9cc1c15962e702ab9781df35e6739bb6a
2021-01-14 14:53:37 +08:00
Herman Chen
b84425e15d [mpp_meta]: Add meta key average qp for encoder
Change-Id: Iab3fde1a2a3e8e6f6150dfbeb6f5803d6e3cc240
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2021-01-14 10:01:46 +08:00
Yandong Lin
4d82e3e9ab [dec_test]: Optimizing mt/multi test
1. Add FileReader
2. Implement frame_num(-n) param setting

Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: I15c169e6d8a8ce74f838402d4360436ecd0a1829
2021-01-14 08:51:41 +08:00
Ding Wei
82691156fd [vdpu34x_com]: add regs info for rcb_buf
Change-Id: I1268b905e87020a9097443cdf09b7cdc3669f083
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
2021-01-13 18:28:52 +08:00
Ding Wei
0d6a0e28d5 [mpp_device]: add MPP_DEV_RCB_INFO for rkvdec34x
Change-Id: I0fe59f27f74fdd6a5eafd91b91870fdbf1253e33
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
2021-01-13 18:25:28 +08:00
Herman Chen
4df6a06807 [rc]: Fix ip_qp_delta on reenc
1. Fix error of removing ip_qp_delta on reenc.
2. Set H.264 qp_row_i to 0.

Change-Id: Ib8810bd5baebc7d6ed0188b078e708c1c3d0b5c2
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2021-01-13 16:30:38 +08:00
Johnson Ding
643d2116f8 [build]: support NDK-17 and above
Change-Id: I59bb0a1ad06a3e6d2a2b51610c528ade61e9c5d3
Signed-off-by: Johnson Ding <johnson.ding@rock-chips.com>
2021-01-13 11:23:55 +08:00
Yandong Lin
5f748ee931 [mpi_dec_test]: Add FileReader for mpi_dec_utils
Support different format files as input:
1. Normal file, e.g. h264/h265 raw stream
2. Ivf file , e.g vp8/vp9 stream with ivf header

Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: I034693ae3e23bdde57c90ded7dd7248c50728122
2021-01-11 16:26:49 +08:00
Herman Chen
4b4335581e [vepu541]: Add rc_qp_range and aq config
Change-Id: I011c1b88aa1ed8d210015f60a94c42cd7fde44d1
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2021-01-11 16:26:49 +08:00
Herman Chen
17e3a2fefd [mpp_enc]: Use qp config in rc to setup encoder
1. Unify H.264/H.265/vp8 qp config
2. H.264/H.265 encoder setup default rc qp config.
3. Move rc_cfg process all to mpp_enc module.
4. Fix some encoder config in encoder test.

Change-Id: I2a31c6abf904f1c16c2acd937c8d467d48db531d
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
2021-01-11 16:26:49 +08:00
Herman Chen
f04fabc136 [mpp_enc_cfg]: Add global rc qp config
1. Add rc:qp config for user rate control config at frame level.
2. Add hw:qp config for hardware detail config.

NOTE: hardware config is only recommended for expert developer.

Change-Id: I8e28de97304577bcf77d67521f945355779ae102
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2021-01-08 16:26:53 +08:00
Herman Chen
e0df28b509 [mpp_cfg]: Add general config function
1. Add struct config function.
2. Do not check data type when data size is matched.
3. Use type/size/offset to define data and update info.

Change-Id: Ief21107cf9a8a6b89c2b01c1a430d88e0cf827f4
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2021-01-08 16:26:53 +08:00
Johnson Ding
2e5ea77cb2 [jpegd]: Optimize marker searching
Change-Id: I25accfc85fc2978a0cb44572cea9b33c833c13df
Signed-off-by: Johnson Ding <johnson.ding@rock-chips.com>
2021-01-05 18:50:10 +08:00
Johnson Ding
597ca81624 [jpegd]: Add table entries counter
Change-Id: Iae98752d7977af5f03612cb7bfbd53e77f39a8bd
Signed-off-by: Johnson Ding <johnson.ding@rock-chips.com>
2021-01-05 18:45:14 +08:00
Johnson Ding
fd7db64eed [jpegd]: Call RKV jpegd prior to old jpegd
Change-Id: I4af49a28a6ce23289c690b5ff185a863e99f8926
Signed-off-by: Johnson Ding <johnson.ding@rock-chips.com>
2021-01-05 18:44:54 +08:00
Johnson Ding
149bb3d090 [jpegd]: Add RKV jpegd implementation
Change-Id: I10497fea20a0a4bbd5bd32a4d3a3e398f6e1aa95
Signed-off-by: Johnson Ding <johnson.ding@rock-chips.com>
2021-01-05 18:44:45 +08:00
Johnson Ding
533ccf5546 [jpegd]: Add rkv jpegd register definition
Change-Id: Id157c79459b19c9c6dec9b57af065d29bfac3998
Signed-off-by: Johnson Ding <johnson.ding@rock-chips.com>
2021-01-05 18:44:38 +08:00
Herman Chen
35947058ed [h265e]: Enable luma and chroma SAO by default
Change-Id: I652617c6235d8503ba96dca98e5bf6c003c12c51
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2021-01-04 14:53:37 +08:00
Herman Chen
e0a0de0914 [h265e]: Fix sps color info error
Change-Id: Ibf85735c83e72e0001d369e96bfce117759c3cbb
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-12-31 18:10:14 +08:00
Herman Chen
4aa5b4a046 [mpp_enc]: Restore max_qp_step
1. Restore max_qp_step which limit the qp change between two frames.
2. Set default H.265 ip_qp_delta to 5.

Change-Id: Iacd795da7f2df46e60ab3f5c45bc8b0f30aff5a5
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-12-31 18:03:17 +08:00
Herman Chen
fb13523e51 [hal_h265e_vepu541]: Optimize quantization param
1. Set rounding bias to 0 to reduce noise crawling.
2. Reduce complex context qp delta.

Change-Id: I35b15631b964fb0a59cfd4986ed1aedf9ba0e851
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-12-31 11:31:55 +08:00
Herman Chen
1292f6a99c [hal_h265e_vepu541]: Optimize tuning parameters
1. Enable chroma klut function.
2. Reduce qp_range in Intra frame to get better result.

Change-Id: Ieeae73c6efa06f86bd6fe1b8687c5fcb3bd15da0
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-12-31 11:09:36 +08:00
Herman Chen
d69900c75d [h265e]: Use 16x16 qp for H.265 encoding
Change-Id: Idabc956b6bf8934df7ba3b3b0281c317bd50e7e2
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-12-31 11:02:45 +08:00
Yandong Lin
eaf1e8f76b [mpi_dec_test]: Organize the common func of each dec test
1. Set these func into mpi_dec_utils
2. Note: num of threads: -n -> -s

Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: If733fb0fdd7110313d2e140d3c50aad37260b6d2
2020-12-31 10:59:43 +08:00
Yandong Lin
2111a438c5 [mpp_enc]: Update osd data cfg
1. Add new structure: MppEncOSDData2
2. Different osd layer use separate buffer

Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: I3be533eb602f23192086f56e06a1439dbb19c35c
2020-12-31 10:00:13 +08:00
sayon.chen
fdc4af2c04 [hevc_vepu541]: Add prepare implement
The prepare implement is to pre-alloc buffer and reduce the delay
of the first frame.

Change-Id: I063888e93539b44cd6d102fb864b729580858e23
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
2020-12-31 08:42:09 +08:00
sayon.chen
1790d9585e [vepu541_hevc]: Modify title buf alloc flow
Change-Id: I23f237711d49083bfebe7ce5b32dedb43ff39c7c
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
2020-12-31 08:33:50 +08:00
sayon.chen
fe25c5da3e [hevc_vepu541]: Modify Roi buf alloc flow
Change-Id: I6e38a8881f7baa16552ced1eb82df6827b512a58
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
2020-12-31 08:32:51 +08:00
sayon.chen
640bc83793 [hevc_vepu541]: Close vepu540 title debug log
Change-Id: I3c84dde0265fb37f3f6757931435af9629dbe39d
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
2020-12-31 08:29:25 +08:00
sayon.chen
41c9c809b0 [mpp2str]: Add rc_gop_mode 2 str
Change-Id: I3fd4334cf108d62726e3caae5eda9801922d8ef9
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
2020-12-24 17:21:33 +08:00