Commit Graph

3026 Commits

Author SHA1 Message Date
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
sayon.chen
476e6adfa5 [mpp_frame]: Add hor_stride_pixel interface
Change-Id: Ia6065b7c3832511c5d01263e6f07713028e8abd6
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
2020-12-24 16:04:21 +08:00
sayon.chen
f2fd3a4d35 [buf_slot]: Fbc case hor_stride defalut 64 align
Change-Id: I56666c128c4178b6aea876012aa477ca49f98261
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
2020-12-24 16:02:39 +08:00
sayon.chen
c6c7498e0a [vproc]: Fix prevfrm free issue
Change-Id: I2305f80a519e06c526cbcfb343ff7558f0fe4a9b
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
2020-12-24 16:01:30 +08:00
Herman Chen
9614080a74 [hal_h264e_vepu541] Add prepare implement
The prepare implement is to pre-alloc buffer and reduce the delay of
the first frame.

Change-Id: I44bc0a016dc8820440c09c3c43a6d78cdb82a137
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-12-24 15:54:35 +08:00
Herman Chen
0be1763725 [mpp_enc]: Add hal prepare function
Add prepare function to hal interface.

NOTE: The hal prepare function is the hal hook on user control.
When user config is changed hal can process some cfg before enc_impl
updated the config through syntax in task.

Also when encoder is in low delay mode the user control should not be
processed if the current frame is not finished.

Change-Id: Ie287e05daff0d139cf04d93d97246fa176d14d53
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-12-24 14:59:37 +08:00
Herman Chen
841775003d [mpp]: Add encoder timing record for each frame
Change-Id: I3e4689bd473b9de272000664ece7fe39c8d3d0d7
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-12-24 14:26:15 +08:00
Herman Chen
ff56c151e2 [mpp_frame]: Add stopwatch to MppFrame for timing
Usage:

1. Enable timing trace
   mpp_frame_set_stopwatch_enable(frame, 1);

2. Get stopwatch and record on each step
   stopwatch = mpp_frame_get_stopwatch(frame);
   mpp_stopwatch_record(stopwatch, "step 0");
   mpp_stopwatch_record(stopwatch, "step 1");
   mpp_stopwatch_record(stopwatch, "step 2");

3. Get timing log on stopwatch disable or MppFrame destroy
   mpp_frame_set_stopwatch_enable(frame, 0);
   or
   mpp_frame_deinit(&frame);

Change-Id: I47c235e95c9f2f39d970ef1f2948b72dcc254146
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-12-24 11:27:25 +08:00
Herman Chen
7b415f98be [mpp_time]: Add more info log on check error
Change-Id: I68e1bb05c87a43ae37754947d8fd83cd3ed4de5d
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-12-24 10:40:08 +08:00
Herman Chen
502e688aa4 [mpi]: Add more 32bit rgb color info
Change-Id: Ife89f6968f9e9f9ce48a437ca4f9c7e0c4ca7c16
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-12-23 15:12:46 +08:00
Herman Chen
7db289c307 [mpi_enc_util]: Add uv swap stride support
Change-Id: I6650d737e61beb91ad31f8979c5fdafe52156102
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-12-23 15:10:44 +08:00
Yandong Lin
eabbc375c0 [mpi_dec_test]: Support jpeg loop decoding
usage: -n -1

Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: Ic184142f771b1e9c68344b3162e491f18d4d33fc
2020-12-23 14:39:02 +08:00
Yandong Lin
80ed6fc527 [hal_vp9d_vdpu34x]: Fix vp9 fast mode err
In case of fast mode, also need prob_loop_base
and prob_default_base.

Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: Ie78eeb78d9230263d9a0736c468c4cc35a539885
2020-12-23 11:35:21 +08:00
Johnson Ding
873f509da9 [osal]: Fix encoder not working problem at vepu2
For vepu2, kernel 4.4 and previous version, '/dev/vepu' should be used
rather than '/dev/vpu_service'.

Change-Id: I2efd4a219bbd7dd3cebf226c8ebcede9bcff9823
Signed-off-by: Johnson Ding <johnson.ding@rock-chips.com>
2020-12-23 10:10:11 +08:00
Herman Chen
b1963d2087 [vepu541]: Fix rgb color error
1. RGB565 need endian swap to help
2. Rework rgb format support to be the same with vepu1/2.

Change-Id: I1cc16b208dbc8968fe313009e06dac380df6df56
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Signed-off-by: Johnson Ding <johnson.ding@rock-chips.com>
2020-12-22 16:51:20 +08:00
Herman Chen
a36d46c44e [utils]: Add more fill image format support
1. Add more yuv fill image functions.
2. Add 24bit rgb fill image functions.

Change-Id: Ief8e3147fad924234156b7005943c5899df2abed
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-12-22 14:51:57 +08:00
Herman Chen
6884534e85 [hal_h264e_vepu541]: Fix crash on invalid color
Change-Id: Idf901ee648c01bbfdce1074877137f1eb0ac58e8
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-12-22 10:35:11 +08:00
Herman Chen
1fb4758a42 [h264d]: Support level 6.0, 6.1 and 6.2
Change-Id: I6061bfe9ecfcb8bd527035a97c5f40c20dc1abdb
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-12-22 10:24:45 +08:00
Herman Chen
cca0ad8fa6 [vdpu34x]: Add statistic register definition
Change-Id: I60e02667cbc1d36d0e760c84f3f73a4343f2e9fb
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-12-22 10:14:07 +08:00
Yandong Lin
a40ce32e4e [hal_vp9d_vdpu34x]: Fix vp9d fbc err
The y/uv hor virstride of the ref frame should be
configured width, just like cur frame, when fbc enable

Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: I49f48164d1921bfd7ccede3eac353f26431939a4
2020-12-21 11:05:48 +08:00
Chen Jinsen
f9ef9976e9 [mpp_dec]: Fix stuck issue on decoder control
Signed-off-by: Chen Jinsen <kevin.chen@rock-chips.com>
Change-Id: I563a899fdfa428f6204934248e0f9b60cc61a186
2020-12-18 16:29:16 +08:00
Herman Chen
11aa95e52f [mpp_log]: Update mpp_log macro
Change-Id: I0e46e93a9a8fa0a7cb7a0e86cec1748503bddcfb
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-12-17 16:07:28 +08:00
Herman Chen
3cf778d714 [vepu541]: Update vepu541 aq mode parameter
Change-Id: Ifeaa2cfc60fcc954625fa07e232a3f623bc2c759
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-12-17 14:33:29 +08:00
sayon.chen
efd6e8e8d7 [vdpu34x]: Support error mode process
Change-Id: Iaac11b645261a8cb69f135963c3b8b8ff7b9284c
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
2020-12-17 14:33:29 +08:00
Yandong Lin
ad8d8a669a [vp9d_vdpu34x]: Vp9d support hw prob
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: I6b4eadad2ea4e08eef8816f76bbabe3ec3f7494c
2020-12-17 14:33:29 +08:00
Herman Chen
de8ace6622 [mpp_enc]: Separate qp change flag
Separate H.264 QP limit change flag into 3 flags

Change-Id: I658ab337569f8f715bde7633dce02b631a7d4239
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-12-17 14:33:17 +08:00
sayon.chen
711459b3c5 [mpp_dec]: Default enable vproc for deinterlace
Change-Id: I724b54de0f4affc7fed8a4841f06aeb6326754d3
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
2020-12-15 16:43:56 +08:00
sayon.chen
e0210723e7 [iep2]: Fix prev_frm0 no free cause mem leak
Change-Id: I14925aa491902f023e026c2ac808d8434aa26a8c
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
2020-12-15 15:31:40 +08:00
sayon.chen
660a378f1a [iep2]: Fix iep2 2 in 1 out case cfg issue
Change-Id: I23a7c86c6e54c01b61f9499dedf963a089fc65f6
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
2020-12-15 15:30:14 +08:00
Yandong Lin
16c29b8e17 [hal_vp8e]: Fix vp8 enc error
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: I97427376c0a98d24a0819958897b5906f7d730d3
2020-12-15 14:52:18 +08:00
Herman Chen
dd7375b8a7 [hal_vepu541]: Reduce lambda table memory usage
Change-Id: If280415a6edba57f0cbf1325fc0046dbc7871e7c
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-12-15 14:38:22 +08:00
Herman Chen
ffb2a40686 [hal_h264e_vepu541]: Unify chroma klut table
Change-Id: I69df85dbd978b8d385baeffac9537724d5ed2873
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-12-14 19:15:43 +08:00
sayon.chen
de3e8d7ecb [iep2]: Disable debug log
Change-Id: I3495cd550c83f795c96cfed23b343e2ece358ddb
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
2020-12-14 18:03:33 +08:00
sayon.chen
c0050b98ca [vp9d]: Fix fbc fmt set case decode issue
Change-Id: Ic2aa46c91ca83a05f1efa1a2fe9d85b335338972
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
2020-12-14 14:19:07 +08:00
Herman Chen
278d9980d9 [mpi_enc_test]: Add partition encoding output path
Change-Id: I977b386e52d5e801d57154bd4d52b9d877072ae9
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-12-12 17:13:30 +08:00
sayon.chen
416aae9d4e [hal_jpege]: Support slice encode for low delay
When jpeg encoder enable partition encoding the following items should
be check:

1. IMPORTANT: This implement is only for single encoder usage that is
hardware can only support this feature without context swith between
different frame encoding.

2. Check input split mode and split arg.

3. Update bitstream address and msb/lsb for each partition encoding.

4. Update mcu height for each encoding.

5. Change restart marker for each encoding.

Change-Id: Ie4e4dea4f66d4f0a1aeca15c8b542d8ada723477
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-12-12 17:13:30 +08:00
Herman Chen
c2466a97b5 [mpp_enc]: Add low delay encoding path
NOTE: low delay path should be used with slice encoding.

Change-Id: I75b774fc5dbbc910d5aa722c4eeffe255415efbb
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-12-12 15:05:48 +08:00
Herman Chen
adb53721c8 [mpp_enc_hal]: Add partition encode check function
Change-Id: I5bd5fd0259be7930326cb311c859fa7441ed79e2
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-12-12 15:05:03 +08:00
Herman Chen
d4dffbdf92 [mpp_enc]: Move mpp_enc_thread to new file
Change-Id: Iaf6ce415662b1bfc0c9a1dd3e51a3ca70ee50086
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-12-12 15:04:25 +08:00
Herman Chen
cb4539fdc3 [enc_impl]: Rename mpp_enc_impl to enc_impl
Change-Id: I751ae2fd21069bb933bf861e2b327c1e7c6b4d44
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-12-12 10:11:12 +08:00
Herman Chen
ff2f267c1e [hal_jpege]: Add more debug log macro
Change-Id: Iee603d74a6ebead30193f0b30c47297853501651
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-12-12 10:07:13 +08:00
Herman Chen
96a7affc2b [mpp_enc_cfg]: Add low delay to MppEncCfgSet
Change-Id: I5f9e595b44cc39cc255c69a875618ea36de5e878
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-12-12 09:47:09 +08:00
Herman Chen
d523aaa888 [mpp_packet]: Add partition property
The partition property is for slice encoding / decoding.

Change-Id: Ibc5fa77293490ed520e7112b3b9ac53f0f5f42c6
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-12-11 21:08:18 +08:00
Herman Chen
062a65cd2a [vdpu34x]: Fix fbc config error
Change-Id: Ie9c2a15e592fe3f4cf89faa150385706305a0e5b
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-12-11 11:45:06 +08:00
shine.liu
9714d846d9 [legacy]: add cfg for FIXQP mode from outside
Change-Id: I6945630c8fb2fc8188c8ff8d608e017c34f4239d
Signed-off-by: shine.liu <shine.liu@rock-chips.com>
2020-12-09 17:46:50 +08:00
Herman Chen
b07f45a708 [mpp_enc]: Add encoder slice encoding function
Add empty function first.

Change-Id: Icb325448a2d1a2216adb01118fbd5afd554e661e
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-12-09 10:59:36 +08:00
Caesar Wang
d9886b794a [hal_h264d_vdpu]: add extern define for these functions
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
Change-Id: I61f0c129ea063c01fa722eb2e3b389c12ca649fc
2020-12-08 19:42:53 +08:00
Herman Chen
5f26c80d95 [hal_dec]: Remove old MppDeviceId
Change-Id: I8285a3f998bb3360dce4c71d0108411dd8bc6f21
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-12-08 19:42:53 +08:00
Herman Chen
fdb769274c [vdpu34x]: Support fbc fmt set for dec_out
1.hevc all resolution support fbc out
2.h264 only support frame mb only for fbc out
3.vp9 all resolution support fbc out

Change-Id: I1d68b75aebea30560a1c6c25bd552121f86097f0
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-12-08 19:42:53 +08:00
Herman Chen
40261ab528 [mpp]: Add soc cap check on mpp_init
Change-Id: Ic44118a32ebf73687b943c3e835dd83a4a567bf1
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-12-08 19:42:53 +08:00