Commit Graph

2797 Commits

Author SHA1 Message Date
Ding Wei
0c9718e266 [hal_h264d]: vdpu34x: simplify some put_buts writing
1. combine some fixed values when put_bits.
2. assign data value instead of put_buts 8 bits.

Change-Id: I153399194a35ad17e9a95e402725009b82b6a60e
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
2021-05-11 11:45:19 +08:00
Ding Wei
547ec685a1 [h264d]: optimize refer info relative process
1. add mvc flag for interview process.
2. reduce empty loop when init ref info.

Change-Id: Ie2745cbe1b78b26a8f26e97c02fb76d4bf6ca315
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
2021-05-11 11:37:26 +08:00
sayon.chen
4d7d1b5b79 [h265d_parser]: Use new method for pps change check
Change-Id: I768631486e1b5d93ed4f7e498b455240872bc994
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
2021-05-11 11:14:26 +08:00
sayon.chen
891a416961 [mpp_thread]: Rewrite Autolock function
Add extra flag to disable Autolock

Change-Id: Ibbaf4b7a011f830728401facd49ac30ab0c7c9ad
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
2021-05-11 10:00:33 +08:00
Herman Chen
507c36af90 [mpp_enc_cfg]: Fix chroma qp offset typos
https://github.com/rockchip-linux/mpp/issues/198

Change-Id: I5ba4fbf002ce1b07ae2bc829f845986639b9b91d
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Signed-off-by: imxys <532076008@qq.com>
2021-05-11 08:55:14 +08:00
sayon.chen
b75f833e74 [h265d_parser2_syntax]: Optimize syntax fill
Change-Id: Ia60e1b3df5e7b72d5c6c2f67a359669e3903b08c
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
2021-05-10 15:51:33 +08:00
sayon.chen
a73905adae [h265d_34x]: Ps hal_buf not update every frame
Change-Id: If925584df1bff7efc2ce7f44268b1f3a2bcf3f7b
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
2021-05-10 15:50:49 +08:00
Ding Wei
25bd6716e2 [hal_h264d]: use memcpy instead of mpp_buffer_write
Change-Id: Ibc617789a3f7554993a3f5df1fd1ab7f1a7ca2b9
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
2021-05-10 14:28:57 +08:00
Ding Wei
d6d5670480 [h264d]: if scanlist is not enable, skip it
1. it not need to fill when init dxva_ctx.
2. it not nend to write and send scalist buffer in hal module.

Change-Id: I68e0a899eb1f5d29a9f5c06fdffc60b23e6bdedf
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
2021-05-10 11:39:42 +08:00
Ding Wei
b6e11a5aae [h264d]: use impl's variable instead of mpp_frame_xx
Change-Id: I8c033940512bd00c9c65478bc3b47f47fbb63ada
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
2021-05-10 10:32:40 +08:00
Yandong Lin
60ffcb9375 [mpp_mem_pool]: Fix put_pool err
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: I3a36d5c709cd37b13d8b587074f1ab500e9c8017
2021-05-10 10:06:54 +08:00
Yandong Lin
14f93e251b [vp9d/vp8d/m2vd_parser]: Fix deinit MppFrame with mpp_free error
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: Ia50b5b8b802cf604251ee0076f2b89cba9b05017
2021-05-10 10:05:30 +08:00
Herman Chen
f86fcc7663 [osal]: Add mpp_trace using ftrace
Change-Id: I6c6597d722f574524f1b993a18f6cd868b20fbab
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2021-05-10 09:15:41 +08:00
sayon.chen
b2bf57c2f8 [h265d]: Fix slot->status.has_frame assert issue
fix generate_missing_ref slot_index not set SLOT_FRAME cause
get SLOT_FRAME_PTR assert has_frame

Change-Id: I6c0936efab8eb83a0d2acd6b5e94fbb7e1b987f5
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
2021-05-08 15:17:43 +08:00
Herman Chen
cee0762db9 [mpp_mem_pool]: Fix destruction error on Android
The Mutex is destroyed before MppMemService. Use get_lock() to avoid it.

Change-Id: Iba5852280ee2e5804fdfa45da008500fb1dc9225
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2021-05-07 15:58:04 +08:00
Herman Chen
b2bbadf045 [jpegd]: Fix deinit MppFrame with mpp_free error
Change-Id: Ie6570b4ff9f899c5d0684c4488c208480e1fb321
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2021-05-07 15:40:46 +08:00
Herman Chen
4d7b67bf6e [mpp_buf_slot]: Use preallocated log storage
Change-Id: I4e6711bcba64e867db22d5caa6fe6699449e3b42
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2021-05-06 14:54:47 +08:00
Herman Chen
90b1c01b55 [h264d]: Reduce malloc / free
Change-Id: Id33f6928d31de4832bad3807ad4a1c5e6a637853
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2021-05-06 14:03:32 +08:00
Herman Chen
c6d2144afa [mpp_buffer]: Use mem pool reduce malloc/free
Use mpp_mem_pool to reduce MppBufferImpl and MppBufferGroupImpl malloc
and free.

Change-Id: I6331aefddf7ee8eb578a638d86a276891aa61ee7
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2021-05-06 14:03:32 +08:00
Herman Chen
ca0b9b8264 [mpp_mem_pool]: Add put_pool function
Change-Id: I8b0723c90969c781537f7ff1a7815c241c9f1481
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2021-05-06 14:03:32 +08:00
Johnson Ding
03f94da031 [h264d]: Revert 0250dab00c
The changes done by 0250dab00c will cause
dbp combination error. So revert it.

Change-Id: Ia1fd3157eafebe52332e3beacd979c1497008a75
Signed-off-by: Johnson Ding <johnson.ding@rock-chips.com>
2021-05-01 16:27:05 +08:00
Yandong Lin
91cbd85488 [mpp_frame/packet]: Reduce malloc/free
Reduce malloc/free of MppFrame/MppPacket

Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: Iffa042e162ad1da749305b131f68a52a140763e2
2021-05-01 16:27:05 +08:00
Yandong Lin
ed69e9077f [mpp_mem_pool]: Add common module MppMemPool
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: Id778f4395f457a773812db78164ecad4038b2ff4
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2021-05-01 16:27:00 +08:00
Herman Chen
dbda66de53 [test]: Add quiet flag to decoder test log
Change-Id: I9472760ede918a913957b336665d7e0367b661c5
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2021-04-30 18:43:16 +08:00
Herman Chen
cdec28698c [mpp_buffer]: Add info dump on buffer leaked
Change-Id: Ida823d6bbfa06a846546b554d6b3a218418deadd
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2021-04-30 18:43:16 +08:00
Ding Wei
ff5c5aec39 [hal_h265d]: fix issue for rcb_buf not free
Change-Id: Ie2bf272ffc66d94c73229645d0a44d53427296b5
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
2021-04-30 18:43:16 +08:00
Herman Chen
aed7c380c5 [mpp]: Fix block input error
1. put_packet support block mode now.
2. The EosTask should be insure to be block mode.
3. NOTE: When set to block mode use put_packet and get_frame in single
thread may cause deadlock for the info change or eos may be blocked and
the put_packet can not return.

Change-Id: I8cf73f833e5d29c3b330c4b56fbd6be8d7432e60
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2021-04-30 18:43:16 +08:00
Herman Chen
7d8b6414c3 [mpp_buffer]: Use new mutex lock
Replace service lock with buffer lock, group lock and smaller service
lock.

Change-Id: Ic8ff9fae714b0362f43df23008efce49fe16b9ce
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2021-04-30 18:43:16 +08:00
Herman Chen
841022f529 [mpi_dec_multi_test]: Add quiet flag to disable log
Change-Id: Iea28d4377212e4c18a91f30762ae8ec135702c16
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2021-04-30 18:43:16 +08:00
Johnson Ding
c01259d4fe [jpegd]: fix marker parsing error
If there is an 0xff between two section, parser will stop searching
marker. But if we skip this byte and contine parsing, it may be
successfully decoded.

Ref to https://redmine.rock-chips.com/issues/295017

Change-Id: Ia73bf66b05ea109ac19a7a5a37241a6381b468d3
Signed-off-by: Johnson Ding <johnson.ding@rock-chips.com>
2021-04-30 18:43:16 +08:00
Yandong Lin
025275ab26 [mpi_dec_utils]: Fix build warning under 64-bit
Note:
    warning: ignoring return value of 'fread', declared with attribute
    warn_unused_result [-Wunused-result]
         fread(ivf_data, 1, IVF_FRAME_HEADER_LENGTH, reader->fp_input);

Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: Ic2ec8c0a46d56f584be048f933fa17532a77ce20
2021-04-30 18:43:16 +08:00
Herman Chen
0e0071db2b [mpp_buffer]: Use fixed array to record history
Change-Id: I9d651fd381abe0d25794aefb3f1ca44826b74939
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2021-04-30 18:43:16 +08:00
Herman Chen
ffbd5c042a [mpp_buffer]: Get allocator on MppService created
Store allocator to MppBuffer to remove dependency from buffer to group.

Change-Id: I7ae136d12bb30cb989b6352989df3b0b3477ad98
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2021-04-30 18:43:16 +08:00
sayon.chen
35c84f8210 [iep1]: Fix iep1 ctx double free issue
Change-Id: Ia08ffe74466d756be25069ab28d9be6be7799efd
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
2021-04-30 18:43:16 +08:00
Herman Chen
a4a9effd33 [mpp_mem]: Reduce mutex lock range
Change-Id: Ic70f0d66ad20878bca0b4ad3a5d5e933f96ca4b3
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2021-04-22 16:37:16 +08:00
Chen Jinsen
a26e71291e [vpu_api_legacy]: support fbc fmt setup
Signed-off-by: Chen Jinsen <kevin.chen@rock-chips.com>
Change-Id: If43694ce50a0f163776a260a1a919d2f9d12a4d0
2021-04-22 11:29:48 +08:00
Ding Wei
23fa2f0bd3 [h264d]: avoid every frame to mpp_frame_init/mpp_frame_deinit
Change-Id: Idc5cb835653ce2dfbc1597c8463bd25f2a9172a6
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
2021-04-21 17:02:22 +08:00
Herman Chen
fdbaa67b23 [mpp_buffer]: Use hashtable to search buffer group
When there are a lot of buffer groups created the search speed will be
slow. We should use hashtable to speed up.

Change-Id: I9ceeaa5a72eedf81597eeb83b34d417c74ceae04
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2021-04-21 14:43:56 +08:00
Herman Chen
f026a238de [osal]: Add hash table implement
Change-Id: I190282e2236797f1b452176a82e72117b93cd64f
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2021-04-21 14:39:38 +08:00
Yandong Lin
3452de9352 [h264d_parser]: Fix issue that continuous frame loss when seek with B-frame
After seek, set err frame whose poc is smaller than the poc of the
first i frame.
But the poc record of the first i frame is not update,
resulting in continunous frame loss.

Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: I8d56f6aeca570d66912a6dcdd5690a809fa070e8
2021-04-20 16:38:59 +08:00
Herman Chen
b201b9dc42 [mpi_enc_test]: Fix compile size_t print warning
Change-Id: Icb30a7d8df0f2e3c47aee946ec7fed66fecff5df
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2021-04-20 16:21:38 +08:00
Ding Wei
e957b0b12c [hal_h265d]: cabac_table && spspps && rps && scalist share one fd
Change-Id: If7b176d0f523ac2f6de7f2ffe943e726e8d00998
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
2021-04-20 15:29:38 +08:00
Herman Chen
a91439bef4 [mpp_buffer]: Add mem and buffer usage function
Change-Id: I356ef9311802868fe8d234dbff178ad8463985d0
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2021-04-20 14:39:52 +08:00
Herman Chen
94c123bdb7 [hal_vdpu34x]: Update error check flag
Change-Id: I3cea464910d01a9aa924520a0f69e317cf0d8c01
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2021-04-20 14:30:46 +08:00
Yandong Lin
7335516d41 [hal_vp9d_vdpu34x]: Fix fbc body offset not enough issue
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: Ide84ef495d37c5d8cf42288502362c731b31debf
2021-04-19 14:46:51 +08:00
Johnson Ding
cac9e9a1cd [jpegd]: Fix NV12 ver_stride error
Change-Id: I825bebb603198ab4d36b3b5f03766719e973aada
Signed-off-by: Johnson Ding <johnson.ding@rock-chips.com>
2021-04-19 14:46:31 +08:00
Johnson Ding
75257262e5 [h264d]: fix a typo
Change-Id: I89c1120627eb23557aa784941d72658d98345624
Signed-off-by: Johnson Ding <johnson.ding@rock-chips.com>
2021-04-14 11:28:51 +08:00
sayon.chen
bc38dbac7e [h265d_parser]: Fix no more start_code cause dec error
Change-Id: I9c3dc9ab8e5b38b6730d6732e1346bd288bea2b6
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
2021-04-13 09:54:47 +08:00
Yandong Lin
5b1156a47b [vcodec_service]: Fix array out of bounds issue
Note:
1. In kernel 4.4 and previous version, the array may cross the boundary
and cover an unknown memory address
2. The array is out of bounds caused by the following submission:

 commit 5be47f31f0
  Author: Yandong Lin <yandong.lin@rock-chips.com>
  Date:   Wed Feb 24 19:44:32 2021 +0800

      [hal_vdpu]: Support fd and offset to be set separately

Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: Ie3fc4324dde497732424cf3023ce81997401fd96
2021-04-09 11:12:56 +08:00
Herman Chen
ae49194de1 [readme]: Add more chipset support in readme
Add RK3566/RK3568/RV1109/RV1126 support in readme.

Change-Id: I9c7c191f2a1c0e5302af7df6edfbefc6457d397b
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2021-04-08 10:30:06 +08:00