Commit Graph

2797 Commits

Author SHA1 Message Date
Herman Chen
fc8fcacc49 [mpi]: Change mpi return value meaning
The 0 and positive return is success. The negative return is failure.

Change-Id: I9c4586286ce7368a52b7d9dd776fd40c6af4a1da
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2021-04-08 09:08:48 +08:00
Johnson Ding
078b4aab41 [mpeg4]: Fix split conflict problem
For Linux platform running Gstreamer, enable need_split may conflict
with bitstream parser within Gstreamer.

Change-Id: I8616e173cbae43aaf8fc18aec4dbd680ad38bdf8
Signed-off-by: Johnson Ding <johnson.ding@rock-chips.com>
2021-03-29 16:05:04 +08:00
Johnson Ding
2e611ffac7 [jpegd]: Fix jpeg decoder timeout issue
FF00 before EOI should be kept. The test source file is at
"server=172.16.4.246,share=mediaframework/jpeg_ff00_before_eoi/CIF_98.jpg"

Change-Id: Ic5e7781a329f8effb5b674a1816350be732fffbb
Signed-off-by: Johnson Ding <johnson.ding@rock-chips.com>
2021-03-29 15:12:39 +08:00
Johnson Ding
9ba1054f17 [vepu_common]: Fix YUV420SP offset calculation
Change-Id: I4a53b49b0de27cb49fe120ae2f54d341ba597af3
Signed-off-by: Johnson Ding <johnson.ding@rock-chips.com>
2021-03-29 11:37:04 +08:00
Yandong Lin
bb6cd661cd [hal_h265d_vdpu34x]: Fix input a wrong param issue
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: I914cab4a0f08dea79dcdfd1463bda61295bb918d
2021-03-26 18:07:04 +08:00
sayon.chen
d8bc45a936 [mpp_enc_impl]: Fix rc print issue
Change-Id: Idc109d9ec29a85cd6ce8c9276eb77ac298eac1bc
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
2021-03-26 16:15:47 +08:00
Johnson Ding
99d8c99902 [hal_h265d]: fix build warning
Change-Id: I197d57c1c7652bde350d3c570a75ed5e413c01d7
Signed-off-by: Johnson Ding <johnson.ding@rock-chips.com>
2021-03-26 11:08:59 +08:00
Herman Chen
f35aae8a04 [jpege]: Add jpeg slice encoding mode
Change-Id: Ib0a919bd2e1c4da5968a0d7f378e455e9a40367c
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2021-03-25 20:57:59 +08:00
Herman Chen
ed7e3af8fd [vepu_common]: Add function for offset calculation
Change-Id: I792239329bc62fa05ec3a8f2f76634628aa521fb
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2021-03-25 20:56:53 +08:00
Johnson Ding
e0025fd3bd [jpegd]: Use memchr instead of memrchr
The memchr() function is a GNU extension, available since glibc 2.1.91.
Glibc at some platform may be too old, or some platform may using uclibc
instead of glibc. So it's better to use memchr().

Change-Id: Id400e9d347a7abd231b417208abc5d02452462a6
Signed-off-by: Johnson Ding <johnson.ding@rock-chips.com>
2021-03-25 11:06:59 +08:00
Johnson Ding
a54b395fd6 [hal_h265d]: Correct register definition and print
Change-Id: I0b77a9e59d13b72db2995501d6f8450843132485
Signed-off-by: Johnson Ding <johnson.ding@rock-chips.com>
2021-03-25 10:14:05 +08:00
Johnson Ding
0250dab00c [h264d]: fix field combination error
Change-Id: Iad69f04299911d3b593d6719eff80e8c6436e5d8
Signed-off-by: Johnson Ding <johnson.ding@rock-chips.com>
2021-03-22 09:27:44 +08:00
Johnson Ding
cfa8d380bd [h264d]: fix ref list check error
Change-Id: I2e0b44f92b95711de2bf3caa4c25c5ceead065ea
Signed-off-by: Johnson Ding <johnson.ding@rock-chips.com>
2021-03-22 09:26:23 +08:00
Herman Chen
2b69a5e190 [hal_h264e_vepu1]: Fix error on sei_mode
The remain stream msb/lsb is rewrited by mistake.

Change-Id: I99bf21852b49bcecda103e7c9bd8051364c29c32
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
2021-03-19 11:34:24 +08:00
Herman Chen
a4ed23117b [mpi_dec_test]: Add MppDecCfg to setup decoder
Add MppDecCfg and string control to add more extra control.

Change-Id: Iead4bd938691af3eac76368421c04c3ebd1f6272
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2021-03-17 11:42:04 +08:00
sayon.chen
4fa1aa8604 [hal_h265e_api_v2]: modify v2 api func register
Change-Id: I75032f6d26c705190a4a8432f52b178e04aa64db
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
2021-03-17 11:42:04 +08:00
sayon.chen
128c1054bc [hal_hevc_541]: Fix madp get error issue
Change-Id: I5d43d6142970c8c6dc73a5801daf4475d8a4bb12
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
2021-03-17 11:30:46 +08:00
Yandong Lin
b1813791df [vp9d_parser]: Fix invisible frame being released prematurely issue
The invisible frame will not be output normally, so it must be released
 when unref_frame.
But sometimes, the invisible frame will be instructed to output, and
then it cannot be released when unref_frame, otherwise the user will
get the buffer that has been released.

Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: I6bb014e0e5b6d52312639c4ad858b93b45f5d622
2021-03-17 11:28:12 +08:00
Herman Chen
85dcfcc8e6 [rk_mpi]: Add rk_vdec_cfg.h
Change-Id: If15b5eb8b0222c1a3978d3ca7c3d4a7fc83faa73
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2021-03-17 10:55:48 +08:00
Herman Chen
690e96685e [mpp]: Return buffer full when poll failed
For ffmpeg plugin compatible.

Change-Id: Iba580bd63de249f6a633e2c0ec8618addeee9ef1
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
2021-03-17 10:38:24 +08:00
Yandong Lin
5599465f7d [hal_vepu]: Support fd and offset to be set separately
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: Ie186589473420cc10551b6c113b9f9c8a3ed4d5d
2021-03-16 16:36:19 +08:00
Herman Chen
eee95d181d [hal_h264e_vepu541]: Reduce intra block in P frame
Increase intra block cost in inter frame.

Change-Id: Ie913467bf2ceec37a00a63e89d6a08765ce4008b
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2021-03-15 14:10:35 +08:00
Siyong Chen
66efd29e8b [hal_h264e_541]:Fine tuning L2 paramet cfg
Change-Id: Ie568cb5dae40b65a7960b106dc8cb23b5acf9a23
Signed-off-by: Siyong Chen <sayon.chen@rock-chips.com>
2021-03-15 14:08:24 +08:00
Siyong Chen
dbc46a11ec [h264e]: Rkvenc set chroma_qp_index default -6
Change-Id: Ia62983b7721fbcb2450e9481c85346d90769990e
Signed-off-by: Siyong Chen <sayon.chen@rock-chips.com>
2021-03-15 14:03:03 +08:00
Siyong Chen
b2414627c3 [rc_v2] Modify cbr reenc ratio calc
Change-Id: Id857a03d128e912e68093dcd9a2cede0fdcfd190
Signed-off-by: Siyong Chen <sayon.chen@rock-chips.com>
2021-03-15 13:58:29 +08:00
Herman Chen
c6f2c43afa [mpp_dec]: Add more detail debug log
Change-Id: Ic5516a5e6746f563cfeb77f415d0f98d2fd6f453
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2021-03-13 16:44:08 +08:00
Yandong Lin
f2231d1473 [mpp/vcodec service]: Check whether the offset is configured repeatedly
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: I217a138b62a7a17f7f371d76a591a02852950a10
2021-03-12 11:39:27 +08:00
Yandong Lin
095be71345 [hal_h265e_vepu541]: Fix h265 enc err when multi tile
In the first tile, the offset of some regs be configured twice,
when multi tiles.

Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: I6a4f6851cd635b4ea8a52f056bcf5f097636ece3
2021-03-12 11:37:44 +08:00
Herman Chen
bb5e42b781 [h264e]: Fix separate chroma qp offset issue
Only set different chroma qp offset on High profile.

Change-Id: Iabcbc3d256cdbf521369262f011ac77db998f54f
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2021-03-10 14:16:04 +08:00
Yandong Lin
5be47f31f0 [hal_vdpu]: Support fd and offset to be set separately
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: I38214c5d692fce76b60fe71536fab9863605e64e
2021-03-05 14:22:35 +08:00
Herman Chen
7dd312a457 [test]: Use different function name in dec tests
Change-Id: I672abbcc654f084b52d337c61d55218d7f342f7b
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2021-03-05 14:11:06 +08:00
Herman Chen
b45e1f5352 [hal_h264d_vdpu34x]: Reduce buffer fd usage
Change-Id: Ifc1c7fe28fcb04e0e6d3b0f03c827d4abb1bfce9
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2021-03-03 15:31:56 +08:00
Yandong Lin
5fae84dcfb [h265d_vdpu34x]: Fix invalid fd issue
fd and offset should be set separately

Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: I87a041c549ec9c5a713aeb37b23c1c4d0efde744
2021-03-03 15:18:37 +08:00
Herman Chen
6b5ee5a122 [mpp_dec]: Implement put_packet by dequeue/enqueue
1. Use dequeue/enqueue to implement decoder put_packet interface.
2. Change task check on deinit. Only check the metadata size in task.
   If MppTask is destroyed with valid metadata just should warning.
3. Reserve one task at input queue for eos packet.

Change-Id: Ib445b148bb5a10c588104ee1fd96bad6f52f1388
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2021-03-03 15:18:37 +08:00
Herman Chen
914d28a9e1 [mpp]: Rename I/O port
Change-Id: Ieb154da4802873d5f534aba6fd38a90e2ffaa9fc
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2021-03-03 15:18:37 +08:00
Herman Chen
d3ed1d9e6e [mpp_task]: Add positive return for port poll
When poll the port task and there is task for dequeue just return
positive valid task count value to caller.

Change-Id: I6c078cee69e34ba9b6cc5ffa77c704b8c59683b4
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2021-03-03 15:18:37 +08:00
Ding Wei
27a8f219d3 [mpp_service]: add msg flag for offset alone
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
Change-Id: Ifba9f4da888e2229e3c36b7f6de0d35be4179e95
2021-03-03 13:46:27 +08:00
Herman Chen
8b5ad54522 [mpi]: Prepare to change internal poll return
The external mpi poll interface only return zero and non-zero value.
Zero return for success and non-zero return for failure.

But later we will use both zero and positive value to indicate success
return. Now for backward compatibility set all positive return to zero.

Change-Id: Id2969a2fb3f5a61137ffc40d108d29090ba1a998
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2021-03-03 10:11:39 +08:00
Herman Chen
9ec098a981 [rc]: Fix pre_i_qp update error
1. The pre_i_qp should use scale_qp to update rather then the start_qp
which has substracted by ip_qp_delta.
2. Reduce default ip_qp_delta to 2 for H.264 and 4 for H.265.

Change-Id: Ie43ba15c8bd524bd10aac6053306f72e8759370c
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2021-03-01 16:12:31 +08:00
Herman Chen
da2745f829 [iep2]: Fix compile error when asan check enabled
Change-Id: Id85aab6f1d4d6cdf4559d6da5d0d46c93871c8be
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2021-03-01 16:12:31 +08:00
Yandong Lin
e4dd718e24 [hal_vdpu34x]: Fix refine rcb size err
When refine rcb size, width and height need to be aligned with ctu size
first.

Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: Iaf3d51c6ff049792aeddb2452e1b1a75699eae59
2021-03-01 16:12:31 +08:00
sayon.chen
943690e384 [vepu540_hevc]: Fix refbuf body_offset cfg issue
Change-Id: I18be1281e1ec76beaa947d8e695d90f5973b1118
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
2021-03-01 16:12:31 +08:00
Herman Chen
70ea32f3df [mpp_dec]: Do not release input packet with buffer
NOTE: on advanced mode the input packet should not be released when the
thread is finished.

Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I66656f6f2e484aabd28f74469c29d4bd44a7dcc2
2021-02-25 17:09:04 +08:00
Herman Chen
b21305dc02 [mpp_enc]: Fix task queue metadata release issue
When encoder dequeue the completed task the input frame should be get
from metadata.

Change-Id: I134f89974e3655b8c40e358071a32ae4a0c28bc0
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2021-02-25 14:00:14 +08:00
Herman Chen
22e73ba651 [mpp_dec]: Add decoder hal_info (with 403 kmsg)
NOTE: When MppDev is not output to mpp_dec the codec info update is
disabled.

This patch may cause kernel show the following log on old kernel:
mpp_process_request:1078: unknown mpp ioctl cmd 403

This log has no harm at all and new kernel will disable this log.

Change-Id: I26c8d78e279b5809bb2d1e51baf2c48e7f6e5a33
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2021-02-25 08:42:46 +08:00
Herman Chen
7906945016 [mpp_packet]: Add get_status function
Change-Id: Idd7314d33345854f4577d8a68b37d4ab274cf462
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2021-02-25 08:42:46 +08:00
Ding Wei
0a4817c8e6 [hal_info]: Add decoder hal info
Change-Id: Ie57bf1403fb3ba7009bba4bb406b91238301918b
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2021-02-23 11:09:46 +08:00
Ding Wei
945168e91b [mpp_hal]: Add MppDev to MppHalCfg
Get MppDev on hal module init.

Change-Id: Ie0c6f7aa04b23f09ee154239ccda3d77c1bb2895
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
2021-02-22 20:28:58 +08:00
Yandong Lin
7ae6041138 [jpege_vepu]: Support rotation for jpeg enc
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: Id230d61801e7dfb4d3fa8ae6c81955ae8255fad3
2021-02-21 11:33:33 +08:00
Herman Chen
7009324f0f [vp8d_vdpu2]: Fix 10bit fd limit
Use 32bit fd and 32bit offset to replace 10bit fd and 22bit offset.

Change-Id: Ic89ed79c3b00e9c8530455f61513588acd121999
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2021-02-21 08:58:32 +08:00