Commit Graph

3555 Commits

Author SHA1 Message Date
Johnson Ding
8103281b96 fix[h265e_vepu580]: flush cache for the first tile
Change-Id: If85fb01a1f72313b1c883309bfda5412d8f58ecd
Signed-off-by: Johnson Ding <johnson.ding@rock-chips.com>
2024-01-12 10:15:52 +08:00
Yanjun Liao
ed77dd7988 feat[mpi_enc_test]: add YUV400 fmt support
Change-Id: I05d149d176e1e692e9706dac07e6d843446309f9
Signed-off-by: Yanjun Liao <yanjun.liao@rock-chips.com>
2024-01-11 18:02:23 +08:00
Herman Chen
c06d3b4a71 fix[dmabuf]: Disable dmabuf partial sync function
For kernel dmabuf driver has bug on partial sync function we deside to
disable partial sync to reduce user's error.

Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I2c69c407eb5b0056ad0377699fef6ef31e1d79cd
2024-01-11 16:17:44 +08:00
xueman.ruan
3a5851e4bb fix[iep_test]: use internal buffer group
Change-Id: I5c61c0d4fa0c9795e92146a2613349e886af453b
Signed-off-by: xueman.ruan <xueman.ruan@rock-chips.com>
2024-01-11 16:12:11 +08:00
Herman Chen
8db63d761a fix[common]: Add mpp_dup function
mpp_dup function use fnctl F_DUPFD_CLOEXEC for fd dup with CLOEXEC flag.

Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: Idd82eb935b06d2885685aeb696b95e910981539d
2024-01-10 18:15:45 +08:00
Yanjun Liao
ccf32c1da3 feat[mpp_enc]: Add YUV400 support for vepu580/540
Add VEPU540/580 YUV400 format support in H.264 and H.265

Change-Id: Id62102dcdc42afea5c3485224d9b4e5bf25efbac
Signed-off-by: Yanjun Liao <yanjun.liao@rock-chips.com>
2024-01-10 18:14:23 +08:00
xiaoxu.chen
ff6032ed80 fix[h265e]: Adapter RK3528 when encoding P frame skip
1.Correct encoding P skip frame on RK3528. For Rk3528, the maxCuSize is 32, which is different to other Chips that maxCUSize of them is 64. So we need to treat them differentlly.
2.The fixed parameters in the original process have been changed to vary based on maxCUSize.
3.Fix m_cuDepth problem, which value was incorrect.

Change-Id: If4ba25d4d221af64d17c4991a708756ab5bc12d9
Signed-off-by: xiaoxu.chen <xiaoxu.chen@rock-chips.com>
2024-01-10 11:12:16 +08:00
xiaoxu.chen
0e99499067 fix[h265e]: fix missing end_of_slice_segment_flag problem
1. Set end_of_slice_segment_flag at the last CTU of one frame.
2. Fix sps->raster2pelx and sps->raster2pely initialization problem.They cause encoding problem for non 64 pixel aligned.
3. The last CTU handled independently, reducing the cost.

Change-Id: I77c565b9bb1eaeaef0d61c8e9c50aa14ef4d0e61
Signed-off-by: xiaoxu.chen <xiaoxu.chen@rock-chips.com>
2024-01-10 10:56:35 +08:00
xueman.ruan
1766466864 chore[script]: add rebuild and clean for build
Change-Id: I73b2d2e9ed11c5aef8c773323b2ab8c5f08b0dc3
Signed-off-by: xueman.ruan <xueman.ruan@rock-chips.com>
2024-01-05 16:03:27 +08:00
shine.liu
56bff5ed8c fix[hal_av1d_vdpu]: change rkv_hor_align to 16 align
Fix checksum mismatch for CtsMediaV2TestCases:
android.mediav2.cts.CodecDecoderTest#
testSimpleDecode[0_c2.rk.av1.decoder_video/av01]

Change-Id: Ib46cd4a05b76c5b76ea63e912051cca816582239
Signed-off-by: shine.liu <shine.liu@rock-chips.com>
2024-01-03 14:30:37 +08:00
Yandong Lin
255b389c2a fix[av1d_parser]: set color info per frame
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: I74358a39fb1987c2df3d86b09cfc5463e8e4f98c
2024-01-03 10:39:00 +08:00
Yandong Lin
261037a8d3 chore[mpp_enc_roi_utils]: change file format dos to unix
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: I816ec6f8a9771b814ea7ac4a313f97ad72abe3a1
2024-01-02 18:05:48 +08:00
Yandong Lin
e7440ce6f4 fix[jpegd]: add sof marker check when parser done
related issue: https://redmine.rock-chips.com/issues/438772

Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: I262b1f1adb8d5cb8d7fa228e2617860510a82f12
2024-01-02 16:05:21 +08:00
Yandong Lin
cc7647240e fix[hal_av1d_vdpu]: realloc tile out buffers when info change
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: Ib6b9248ddfdc9074e538113ab4713a61125b37e7
2023-12-27 16:29:02 +08:00
Yandong Lin
97d58ad0a4 fix[hal_av1d_vdpu]: fix sw_enable_cdef value err
It will cause frame decode software timeout.

Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: I8488dcdde90d268a2a0d6888499b96eb00c77619
2023-12-27 14:56:46 +08:00
Yandong Lin
35a99b5d50 fix[dmabuf]: align offset/len to cache line for partial sync
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: Ib6b0f6714bc4d98daa83f02d17c7659c00df570a
2023-12-27 14:56:46 +08:00
shine.liu
e2eeeb5764 fix[av1d]: add hdr metadata info to frame
Signed-off-by: shine.liu <shine.liu@rock-chips.com>
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: I713b357eb49e6f96267a64dc5c8239eaf2fa6f17
2023-12-27 14:30:56 +08:00
Yandong Lin
d8472abf85 fix[av1d_api]: do not set task valid when empty eos pkt
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: I218a6c76153231b8ae52e00d515565b1cb73ec7a
2023-12-27 14:30:56 +08:00
Rimon Xu
1707d0ce0e fix[h265d]: fix pps parse failed cause crash issue
crash backtrace:
0) crash at pp->PicWidthInMinCbsY  = sps->min_cb_width; sps is 0x0
1) fill_picture_parameters at h265d_parser2_syntax.c:72
2) h265d_parser2_syntax at h265d_parser2_syntax.c:315
3) h265d_parse at h265d_parser.c:1904

While parsing PPS, an incorrect sps_id was parsed, but since the PPS
information is after other decoding frames, the parse_error was not set
to 1. This led to the completion of the parse process reaching
fill_picture_parameters, resulting in an error due to the obtained sps
information being null.

Signed-off-by: Rimon Xu <rimon.xu@rock-chips.com>
Change-Id: I31b8c0371803fb8101fb7ca4aec7e9183c6b218e
2023-12-26 09:24:04 +08:00
Herman Chen
1a4f3d456c feat[vepu580]: Support frame parallel on vepu580
1. Add dpb hal_start/hal_end function to mark hal usage.
2. Use dpb_used in the dpb process flow and hal_used in hal flow.
3. Send dpb ptr to hal for hal notify.
4. Use reg_idx in enc_task to find the register buffer.

Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: Ib728a896826a3039682de75d6a8cc2d4dfe04e3d
2023-12-21 15:57:22 +08:00
Herman Chen
eb14ae5032 [enc_utils]: Remove extra option log
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: Ic9c54399bee41eab69c8a109e7d03eb6ee04d1a0
2023-12-19 18:16:39 +08:00
xueman.ruan
aceceadd84 [h265d]: add compatible for the order of vps
There is a certain error stream that vps is behind
sps and pps while it is still legal and can be
decoded. But the error detection code will stop
the parse process and return error.

To compat this stream by removing return operation
then this kind of stream can be supported.

Change-Id: I2f90a5efa5a8c63a6fa278f9d0408603943001b2
Signed-off-by: xueman.ruan <xueman.ruan@rock-chips.com>
2023-12-18 10:20:11 +08:00
Herman Chen
ed377c99a7 fix[hal_enc]: Add encoder internal buffer sync
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: Ie8ab3f8900e979079aaa1817a25751fc086431ac
2023-12-14 17:31:59 +08:00
Herman Chen
641da510f0 fix[hal_dec]: Add decoder internal buffer sync
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Signed-off-by: Johnson Ding <johnson.ding@rock-chips.com>
Change-Id: I94295c0661becedb79b74ed3eef10e0042ca44b8
2023-12-14 17:31:38 +08:00
xueman.ruan
32148cb689 docs: update mpp developer guide markdown
modify compiling part

Change-Id: Ia24e1371cd0d31c268ad1e4f946c590ac7a8e6e1
Signed-off-by: xueman.ruan <xueman.ruan@rock-chips.com>
2023-12-11 15:26:29 +08:00
Herman Chen
7c721dca78 fix[script]: Optimize changelog.sh
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I5029f2f57bfffc1b8331665b7dcf8a10523b457e
2023-12-08 15:53:33 +08:00
Herman Chen
b4be2b722a docs: Update 1.0.3 CHANGELOG.md
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: Ic94a9b7cdcd10682aaedc7576304948c74b52d83
2023-12-08 15:17:33 +08:00
Yandong Lin
2be06b2a3e fix[av1d_api]: fix loss last frame when empty eos
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: I0769391cd535f400fbceffe6a18c40fa6ca39822
2023-12-08 14:42:50 +08:00
Yandong Lin
8cd49b578c fix[h265e_dpb]: do not check frm status when pass1
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: I488c0d04c963b1ecbc68a89dce3cd20b847043bc
2023-12-06 15:35:50 +08:00
Yandong Lin
b64ba6383c fix[hal_bufs]: clear buffer when hal_bufs get failed
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: I9d1d4d596ecc9379727129e0ab9ee12d20a8d222
2023-12-06 15:35:50 +08:00
Herman Chen
d9fb399576 fix[dma-buf]: Add dma-buf.h for old ndk compiling
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: Id1188a945aa56af165c5957b88aa1a7453f5799b
2023-12-06 14:44:23 +08:00
Herman Chen
b5d8ac4209 fix[enc]: Fix sw enc path segment_info issue
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I321cf0022ef94bd2f5bd94a78f4419e00da8bc07
2023-12-05 14:46:38 +08:00
Herman Chen
318bfc1b78 fix[cmake]: Remove HAVE_DRM option
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I6ce230a7e85472acca5feafc9ad84effb222f57a
2023-11-30 09:22:44 +08:00
Rimon Xu
81a7d8d812 fix[m2vd]: update frame period on frame rate code change
Signed-off-by: Rimon Xu <rimon.xu@rock-chips.com>
Change-Id: I902e5203b17ef6f93c69cd938ac96889e1613e86
2023-11-29 11:41:48 +08:00
Yandong Lin
1bf810c7b1 chore[vp8d]: optimize vp8d debug
1. add dump vp8 stream to ivf
2. add dump reg/prob/segment info

Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: I1004bbf3178d31fb39176f9025ae1e5f4c8b1f30
2023-11-29 10:53:52 +08:00
Herman Chen
5fbde2b49e fix[test]: Fix mpi_enc_mt_test error
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I7a566766972e8e279f48ac4b6f9dc54195ba1ea5
2023-11-29 10:15:24 +08:00
Herman Chen
6ce3007994 refactor[allocator]: Refactor allocator flow
1. Allocator api is determined by buffer type.
2. Allocator ctx is determined by both buffer type and buffer flags.
3. All allocator dma_heap / drm / ion / ext_dma should support different
buffer flags.
4. The buffer flag supports cacheable / 32-bit / contig options.
5. Add flags update flow on allocator create process.
6. Add mpp_dmabuf_has_partial_ops to disable dmabuf partial ops when the
kernel driver has bug.

Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: If36a05c6704112cad3ab46861023597ff02bf14c
2023-11-29 09:54:36 +08:00
Rimon Xu
630bcb9000 [mpp_group]: Add allocator with flags
We need get different allocator when alloc buffer with flags, such
as ion,drm,dma_heap, all must be supported.

Signed-off-by: Rimon Xu <rimon.xu@rock-chips.com>
Change-Id: Id128c7420f0defa65500ef19c25e193ff1b56a8a
2023-11-29 09:54:36 +08:00
Yandong Lin
e155a7eac7 fix[dma_heap]: add dma heap uncached node checking
Currently only support uncached dma heap node access,
because of the cache processing is not yet complete.

So if there are no uncached node in /dev/dma_heap/ path,
mpp will not use dma_heap allocator.

Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: Ic33fca9c445c7668a86454f01f9d7577668de32b
2023-11-29 09:54:36 +08:00
Yanjun Liao
ce39aff31f feat[dec_test]: Add buffer mode option
Add an option in dec_test to demo zero-copy external buffers mode.

use -bufmode to config the buffer mode option
hl - half internal mode
i  - pure internal mode
e  - pure external mode

Change-Id: Ib92c30acd8c370843becb286c935de056b09bcbd
Signed-off-by: Yanjun Liao <yanjun.liao@rock-chips.com>
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2023-11-29 09:54:36 +08:00
Herman Chen
0d773814cf chore[mpp_enc]: Encoder changes to cacheable buffer
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I8df399ff708e354f8e3017da41e1424cba4999ee
2023-11-29 09:54:36 +08:00
Herman Chen
5d89c2cc32 chore[mpp_dec]: Decoder changes to cacheable buffer
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I839cd04d14a38f4553785c44667758df69aa9929
2023-11-29 09:54:36 +08:00
Herman Chen
dbdccc6818 fix[mpp_mem]: Fix MEM_ALIGNED macro error
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I08d403f7e1d67b7d80655278255f31d4c0c6784e
2023-11-27 14:59:04 +08:00
Herman Chen
d4913c1b88 chore[mpp_dmabuf]: Add dmabuf ioctl unit test
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: Ice181f6d8cf312d68c79d6e6a33cddcbf65ef5f6
2023-11-16 16:33:40 +08:00
xueman.ruan
e15972e9af feat[mpp_dmabuf]: Add dmabuf sync operation
sync_begin - cache invalidate, should be called before cpu read
sync_end   - cache flush, should be called after cpu write

MppBuffer sync flow:
1. hw access
2. sync_begin
3. cpu access (read / write)
4. sync_end
5. hw access

NOTE: readonly option is faster for read only buffer.

Signed-off-by: xueman.ruan <xueman.ruan@rock-chips.com>
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I253a6139e9bb30808c07075d64f17b5cfad8519a
2023-11-16 14:27:02 +08:00
Herman Chen
3a2196fc41 feat[jpege]: Allow rk3588 jpege 4 tasks async
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I25a5a30038b6f7fccd6ba3951d7b847a63caeff7
2023-11-16 14:26:38 +08:00
Yandong Lin
cc20dd3efe fix[mpeg4_api]: fix drop frame when two stream switch
There is a case:
In split mode, after sending the last packet of a stream,
the user then continues to send packet with extra data flag for the new
stream.
It will result in the last packet loss.

Change-Id: Iba945dbf4229a49fea2040ecc9f76e4ef7209de8
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
2023-11-03 14:17:50 +08:00
sayon.chen
65439d38a4 feat[rc_v2]: Support flex fps rate control
Change-Id: I45a8544c15ab4baede232e1a3b16c517f965092e
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
2023-11-03 09:11:10 +08:00
xueman.ruan
a4b66352f1 fix[script]: fix shift clear input parameter error
Change-Id: Ia48238e47d110fd049788b3d2abd86d5f69aa0b0
Signed-off-by: xueman.ruan <xueman.ruan@rock-chips.com>
2023-11-02 17:08:16 +08:00
Yandong Lin
3b27843844 fix[hal_h265e_vepu541]: fix roi buffer variables incorrect use
Change-Id: Ia396343b395860560aa24abecf8657d22b798fe4
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
2023-11-01 09:20:54 +08:00