Commit Graph

2434 Commits

Author SHA1 Message Date
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
Herman Chen
c106a5bdd0 [mpp_soc]: Add mpp_soc with more detail feature
1. Add soc definition structure to replace old one.
2. Use mpp_soc.h to replace soc detection in mpp_platform.h.
3. Add vcodec_type to each device definition.
4. Add check on soc info init.

Change-Id: Iecc44bd79e6fd09c58afbc1b5c526ecf31acc663
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-12-08 19:42:53 +08:00
Herman Chen
13b4f27390 [mpp_dec]: Use callback to handle hardware status
Change-Id: Iff972f276f00621dc0289633178e487d897b2e0e
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-12-08 19:42:53 +08:00
Herman Chen
02e1d717c8 [mpp_callback]: Add callback module
Callback module is used for async communication between different
modules.
It should be used only when there is no better way to use.

Change-Id: I2d30252e63ade3be953339a2d4568047e4e228e8
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-12-08 19:42:53 +08:00
Herman Chen
134de17b36 [mpp_dec]: Sync mpp_dec_control process
Add mpp_dec_proc_cfg in parser thread. The external control will be sync
in decoder thread.

Change-Id: Ic680f055fd1568815fe9f28b62c8ddcc837311bc
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-12-08 19:42:53 +08:00
Herman Chen
d9c59b7c0a [mpp_dec]: Add MppDecCfg ctrl process to mpp_dec
Change-Id: I767e7b248922904d61aa19afd657a5543a2b9995
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-12-08 17:48:09 +08:00
Herman Chen
ec99f54791 [mpp_dec_cfg]: Enable mpp_dec_cfg
Change-Id: I427366035de4c25c62e14582a2d23d25c71a3ef4
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-12-08 17:48:09 +08:00
Herman Chen
3be3d97054 [mpp_device]: Add regs offset helper function
This helper function is for address register setup its offset.

When offset is less than 4M (20bit) the offset and buffer fd (10bit) can
be filled in 32bit word.

When offset is larger than 4M the full offset should be sent by ioctl
MPP_DEV_REG_OFFSET.

Change-Id: I5f59f3c941e41cf85fa2ab8895d2a177f4412e64
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-12-08 17:48:09 +08:00
sayon.chen
fe89da930f [vp9_dec]: Fix 10bit stride set issue
Change-Id: I7c4b342c7229322e589dd10a0582c71dc025a3a2
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
2020-12-08 17:48:09 +08:00
Herman Chen
d71e3ffce9 [hal_h264e_vepu541]: Enable ccwa by default
Change-Id: I0f972af256d718ac78f813bfa5d9208d46051211
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-12-08 17:48:09 +08:00
sayon.chen
8631f70f9a [rc_v2]: Fix outrate < 1 cause stat_bit issue
Change-Id: I66f6bfe5a087308b52c61a6b60566533a1974af5
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
2020-12-08 17:48:09 +08:00
Herman Chen
8c91fa0cbf [mpp_service]: Fix supports-cmd path
New kernel use /proc/mpp_service/supports-cmd

Change-Id: I7c1d258c3652ecf5346c2e19383b90975a30a629
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-12-01 17:25:25 +08:00
Herman Chen
e2ad911c00 [mpp_dec_cfg]: Add more decoder cfg string
Change-Id: Ic686b15f36530c7695ee907de9f72da99c30d404
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-12-01 16:35:20 +08:00
Herman Chen
6ff78b1bd6 [mpp_buffer]: Fix error on release orphan group
Change-Id: Ib915000941a2380c908b6c6f934b4b8bb8680fa9
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Signed-off-by: Fu Yuhao <fuyuhao@sunniwell.net>
2020-12-01 16:35:20 +08:00
Yandong Lin
08fac3c3f8 [iep2_test]: fix yuv422 input issue
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: I1fdf83672d32e1d73121c07d24479bcfc2a1dd1b
2020-12-01 08:52:38 +08:00
Herman Chen
5d648bad8b [mpp_dec_cfg]: Add mpp_dec_cfg implement
Change-Id: Ic57fb37604930e841af8cdd6784120662f529110
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-11-30 09:46:27 +08:00
Herman Chen
a5afd38076 [mpp_dec_cfg]: Add mpp_dec_cfg header
Change-Id: I98830f3e8466ffee0d3232a8bb44694cb46b8fff
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-11-30 09:46:27 +08:00
yandong.lin
570478924c [mpi_enc_multi_test]: Set qfactor for jpeg
Signed-off-by: yandong.lin <yandong.lin@rock-chips.com>
Change-Id: I4cde2336ea3c7ccb5724c0916aded6604888b40f
2020-11-30 09:46:27 +08:00
sayon.chen
e4f4b4f690 [vepu54x]: Compatible different device fbc input
RK isp fbc output use AFBC_V1 format.
RK rkvdec fbc output use AFBC_V2 format.
These two formats have different fbc payload offset calculation method.

Change-Id: Id050cbd58e33a1249098a2dc226d47c376d7c163
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
2020-11-30 09:46:27 +08:00
sayon.chen
dfe9428017 [rc_v2]: Support super frame cfg process
Change-Id: I4de4d3e27925d81f26ed5819e07d3e45ed42061e
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
2020-11-30 09:46:27 +08:00
Herman Chen
7ae2f73bca [mpp_enc_cfg]: Add super frame config
Change-Id: I0df2db8fd7c5e10412584ded557da3962b77f882
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-11-30 09:46:27 +08:00
yandong.lin
c124e1c247 [vdpu34x_com]: rename rcb buffer coef
Signed-off-by: yandong.lin <yandong.lin@rock-chips.com>
Change-Id: Id455a1d6280dc2d0ff96998ded48317ea33ecdaa
2020-11-26 09:22:30 +08:00
sayon.chen
6ced066386 [vepu54x]: Support crop set from mpp_frame
Change-Id: I2d7884889fa9390efc6a118f4328c95ec7be7576
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
2020-11-26 09:06:52 +08:00
Herman Chen
2f2e4224b9 [mpp_platform]: Move codec_type detection
1. Move codec_type detection code to vcodec_service.
   Only vcodec_service needs to detect vcodec_type. Mpp_service will
   report this flag from kernel.

2. Remove kernel device detection code when soc type not detected.

3. Add mpp_soc.h for soc definition.

Change-Id: Ic83897bddbcf0fceb0c5d19a05491f75231092c1
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-11-25 15:11:28 +08:00
Herman Chen
9956bdb1ac [mpp_service]: Add mpp_service device detection
Change-Id: Ie63d0dc9964801b1f85b3d0e289c84f89798ffb1
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-11-25 14:11:49 +08:00
Herman Chen
a875c5a308 [mpp_frame]: Add comment for MppFrame parameters
Add comment for width, height, hor_stride, ver_stride, offset_x and
offset_y.

Change-Id: If0297eafdd550902d40485d786f9494c85123622
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-11-24 14:09:20 +08:00
Herman Chen
302582b3b9 [mpp_frame]: Add offset x/y for cropping
Change-Id: Id3da30527fe709f7f89044a667c089b3dab6ef4f
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-11-24 11:53:30 +08:00
Herman Chen
85b37b9581 [hal_h264d_vdpu]: Add common header for H.264 vdpu
Change-Id: I8782ee5fff52fca25664875fe84746eb6269705a
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-11-24 11:45:10 +08:00
Herman Chen
1a9aaa03f9 [hal_h265d_vdpu34x]: Reduce colmv size
1. Reduce colmv size to 1/8 of 64 aligned width * 64 aligned height.
2. Enable colmv compression by default.

Change-Id: I799f95e791f0f3a48b2b085a46350185f644850a
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-11-24 10:17:55 +08:00
Herman Chen
d059a25c00 [vdpu34x]: Enlarge rcb buffer
Change-Id: I4a61d612e7926f12e65f5f8a266e658f51d21568
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Signed-off-by: yandong.lin <yandong.lin@rock-chips.com>
2020-11-24 10:17:38 +08:00
Herman Chen
0a88bcb413 [hal_h264d_vdpu34x]: Fix crash on field mode
When H.264 stream is field mode the colmv buffer need double size and
the colmv compression should be disabled.

Change-Id: I6933ef062cd255f00967e17356cbf40c7143eb0d
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-11-24 09:32:59 +08:00
Herman Chen
fa98795992 [hal_h264d_vdpu34x]: Fix fast mode error
Change-Id: I49b33c279b25584aea045683b8cc99fc7527e9ab
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-11-23 15:30:45 +08:00
sayon.chen
3c5dc7fe45 [h265d_syntax]: Fix h265 syntax fill sps rps issue
Change-Id: Ifbc101a9c4755546875777978bed06a375f6cf49
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
2020-11-23 14:26:16 +08:00
sayon.chen
472a0b7563 [rc_v2]: Fix pre_i_bit struct leak issue
Change-Id: I4bf173923226de5fb22d14b9ec13d673b53b1a15
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
2020-11-23 14:22:28 +08:00
Justa
db2492ed9c [hal_jpege_vepu]: Fixed jpeg encode abnormal color
1. Fixed uninitialized variable(qtable[2])

Change-Id: Ibe481760cdcef25a9b8fbccc822606e006c8e679
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-11-23 09:53:56 +08:00
yandong.lin
a6c4efe04d [hal_vp9d]: Reconstruct HalVp9dCtx Structure
Separate HalVp9dCtx to Vdpu34xVp9dCtx and Vp9dRkvCtx

Signed-off-by: yandong.lin <yandong.lin@rock-chips.com>
Change-Id: I48618d01edba3f8b828f8904d1386347a1b833d4
2020-11-20 20:54:25 +08:00
yandong.lin
36e20cff29 [vdpu34x]: Update register naming
Signed-off-by: yandong.lin <yandong.lin@rock-chips.com>
Change-Id: I1a264b7d6ed8923779a25fc7a116fffe8877cae6
2020-11-20 17:57:58 +08:00
yandong.lin
06ef6826c4 [mpp_init]: Handle initialization failures correctly
clear resource and return when init fail

Signed-off-by: yandong.lin <yandong.lin@rock-chips.com>
Change-Id: I0fa8aa7c0742ce101127ffc26cccd0fe5809906f
2020-11-20 16:53:01 +08:00
Herman Chen
4ddca6514b [hal_vp9d_vdpu34x]: Add vdpu34x vp9 decoder
Change-Id: I93ea875788326699d4b0411805a792218fd9012a
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Signed-off-by: yandong.lin <yandong.lin@rock-chips.com>
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
2020-11-19 15:04:33 +08:00
Herman Chen
65eb5f980f [vdpu34x]: Add vdpu34x rcb buffer alloc function
Change-Id: Idc6912968a979fc1e37617f9877054a4f9d4dbfc
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-11-19 15:04:33 +08:00
sayon.chen
2a6fb9fe28 [vdpu34x]: Support cmv alone set for h264&hevc
Change-Id: Iaf9a668c79c2fa34ce5dab2454df78fc912b5bf1
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
2020-11-19 15:04:33 +08:00
Herman Chen
ca353b876e [hal_bufs]: Enlarge max buffer elem count
Change-Id: Ib42de8d2f206a048d2cfc7615b61789466439b20
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-11-18 10:49:23 +08:00
Herman Chen
7307f1bcc2 [vdpu34x]: Add clock gating by default
Change-Id: Idede84f638db679ac06af7bcdf526a9a3b7225bb
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-11-18 09:16:39 +08:00