Commit Graph

3555 Commits

Author SHA1 Message Date
Zhihua Wang
acd257349c [vepu541]: Support h265e slice split
Signed-off-by: Zhihua Wang <hogan.wang@rock-chips.com>
Change-Id: Icddbda95b818aa9ce779d38b62cda59f8a1273f7
2023-05-13 11:48:08 +08:00
Yandong Lin
376a4e25a2 [mpp_buf_slot]: fix impl->slots maybe invalid issue
After realloc, the source pointer maybe invalid,
need assign the new pointer.

Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: I324f379540cab2d6463a829470f11ff2d57b0b42
2023-05-11 10:42:37 +08:00
Yandong Lin
287ce67137 [h264d_vdpu382]: hack for err ref check
The hw ref used may not correct, cause mark frame err info incorrectly.
So if is err frame, set fd = 0, err for trigger pagefault if the cur frame
use the err ref. This makes it possible to correctly identify whether an
err ref frame is being used.

Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: I4e7f042731f22e3ab8f4c90e51120fb8d841142a
2023-05-10 18:26:23 +08:00
Yandong Lin
193309a852 [driver]: add MPP_CMD_SET_ERR_REF_HACK api
support hack for err ref check for decoder

Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: Ib61336b50dde626d85f9f6bb25950ea70149ea49
2023-05-10 18:24:13 +08:00
Chandler Chen
a7f94086ff [vepu540c] modify h264/h265 encode reg config
Signed-off-by: Chandler Chen <chandler.chen@rock-chips.com>
Change-Id: I9f6ec8b1d801a1159cd0bd2e43e3a57b34d91238
2023-05-10 17:58:30 +08:00
Yandong Lin
d86f0fc707 [mpp_service]: fix query_cfg name issue
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: Ib594f7e892fdd8831fd49fa8fa4aeb8ac0dd533e
2023-05-09 18:12:49 +08:00
Johnson Ding
669bf366ec [avs2d]: Fix PTS out of order problem
It is wrong to using PTS of the next packet as PTS of current paring
frame.

Change-Id: I858d4bd2831e63eefc8815be3cabe460444528bd
Signed-off-by: Johnson Ding <johnson.ding@rock-chips.com>
2023-05-09 15:20:15 +08:00
Yandong Lin
b04033f8c2 [mpi_enc_test]: fix some cmd config issue
1. Fix qc param config issue.
2. Fix some param help description issue.

Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: I47b88c6f1c0c2db67139cae55957019572b5cd20
2023-05-08 17:12:47 +08:00
Xingwen Fang
a8102ad4c7 [mpp_frame]: fix mpp meta memory leak
Change-Id: I263f0cc3da523b5d5304937e926d4a9c03114242
Signed-off-by: Xingwen Fang <fxw@rock-chips.com>
2023-05-08 14:49:37 +08:00
Yandong Lin
5209fe4dd2 [vp9d_parser]: fix ref frame early release issue
The commit that cause the issue:
commit eaa250d1fc
Author: Yandong Lin <yandong.lin@rock-chips.com>
Date:   Thu Apr 13 10:57:35 2023 +0800

    [vp9d_parser]: fix frame mark errinfo issue

    Key Frame or intra only frame do not reference other frame,
    so need not check errinfo of ref frame.

    Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
    Change-Id: I4fbfca7ba7dedfef6d6a721528ba536dba50a8f3

err log:
mpp_buf_slot: Assertion slot->status.has_frame failed at mpp_buf_slot_get_prop:1085
hal_vp9d_vdpu34x: ref buff address is no valid used out as base slot index 0x2

Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: Ie280d732a48ae326f1c9bb6470ca452dc974d296
2023-05-04 11:53:21 +08:00
xueman.ruan
c794d353c5 [allocator_dma_heap]: add file permission check.
Change-Id: Icfffaf3594f029b87e3a87f17de408a681c49dfb
Signed-off-by: xueman.ruan <xueman.ruan@rock-chips.com>
2023-05-04 08:57:02 +08:00
Yandong Lin
13794992d9 [mpp_mem_pool]: fix MppMemPoolNode double put issue
When a object is double put by mpp_mem_pool_put,
it will destroy the info of MppMemPoolImpl.

So set node->check = NULL when mpp_mem_pool_put, and it will check
failed adn return when double mpp_mem_pool_put.

Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: I54be2eae3a1d7e81579f89d3e80304abface3049
2023-04-27 17:45:28 +08:00
xueman.ruan
8c1f82c939 [mpp_cfg]: fix set ptr err.
The same poiner address may have different value in memory.
So we need to update pointer config at each time.

Issue is introduced by commit as followed.
Change-Id: Ia15a0128d03b1a2624410b6f2a13effe3a03c47c

Change-Id: Ia10fe1f3faff257d5276473cb7829ac1cb0f1795
Signed-off-by: xueman.ruan <xueman.ruan@rock-chips.com>
2023-04-26 10:13:14 +08:00
Yandong Lin
eaa250d1fc [vp9d_parser]: fix frame mark errinfo issue
Key Frame or intra only frame do not reference other frame,
so need not check errinfo of ref frame.

Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: I4fbfca7ba7dedfef6d6a721528ba536dba50a8f3
2023-04-25 09:13:22 +08:00
Chandler Chen
d2a3eda478 [m2vd_parser] mark resetFlag when frame alloc failed
frame alloc failed cause by stream error, such as:
receive top field while top_field_first = 0,
or bottom filed while top_field_first = 1;
mark resetFlag to wait for another I frame

Signed-off-by: Chandler Chen <chandler.chen@rock-chips.com>
Change-Id: I0bf6152db84459b06141ab0fa5232c0fffd51f92
2023-04-24 16:56:52 +08:00
Johnson Ding
e32018de55 [h265d]: Skip decoding special encoder stream
Change-Id: I1c7aebce531452349fd5bbf20221906a81a163a7
Signed-off-by: Johnson Ding <johnson.ding@rock-chips.com>
2023-04-23 17:42:50 +08:00
Johnson Ding
b45d8b16cb [h264d]: Skip decoding special encoder stream
Change-Id: I9bdd32bc3b00b9a038d9429295b045a8b6bd97ef
Signed-off-by: Johnson Ding <johnson.ding@rock-chips.com>
2023-04-23 17:41:31 +08:00
Johnson Ding
1a8161c845 [dec]: Add common code for AVC and HEVC
Change-Id: I48f0bddbbb6762a653dca0eec3dc8b6acba03673
Signed-off-by: Johnson Ding <johnson.ding@rock-chips.com>
2023-04-23 17:10:11 +08:00
Johnson Ding
66e2f65ff2 [h265d]: Fix SEI parsing
Change-Id: If7a504882385a9d41d9ab22b319c30b6b67f3b1c
Signed-off-by: Johnson Ding <johnson.ding@rock-chips.com>
2023-04-23 11:44:36 +08:00
Johnson Ding
8d7e66474b [h264d]: Fix paring SEI_BUFFERING_PERIOD
SEI payload parsing should be aligned with bytes. So bits remaining at
tail should be skipped. In case of bits remained is more than 32,
skipping the whole payload directly from the beginning of the current
payload being parsed.

Change-Id: I003a51b8347011ad310b55452192b07ae63e7df3
Signed-off-by: Johnson Ding <johnson.ding@rock-chips.com>
2023-04-23 11:44:36 +08:00
Johnson Ding
ef4d266eb7 [jpegd]: Fix multi DHT parsing
Change-Id: I101654fcb87921ef4e9bbc35a2b4ff7ede974071
Signed-off-by: Johnson Ding <johnson.ding@rock-chips.com>
2023-04-23 10:22:18 +08:00
xueman.ruan
7d6c39741d [mpp_dec]: add info when decode mpeg2/4 beyond cap.
Change-Id: I0aaf6b9f411557462cd2bf810b86cc7f04884ad9
Signed-off-by: xueman.ruan <xueman.ruan@rock-chips.com>
2023-04-20 09:55:30 +08:00
Johnson Ding
0de995aa8b [misc]: Fix Clang warning
Change-Id: I0e6241c6ecd3d77bf111d7ce7184b458b05fe1f9
Signed-off-by: Johnson Ding <johnson.ding@rock-chips.com>
2023-04-18 11:52:54 +08:00
Johnson Ding
b92d30ee7c [avs2d]: Fix stuck on eos problem
Change-Id: I9d60dff526b8330afb2eee9c85563f56d6043736
Signed-off-by: Johnson Ding <johnson.ding@rock-chips.com>
2023-04-14 17:44:24 +08:00
Johnson Ding
9f540430f5 [avs2d]: fix SEGV when realloc
For larger NALU header, eg: userdata or extradata, header buffer
initialized at first will not be enough. But previous data pointers that
point to header buffers are not valid after doing reallocation. So a
better way to recording buffer entry is to record offset.

Change-Id: I13f59e142af6d1a932279cb8eb43c28e72141af9
Signed-off-by: Johnson Ding <johnson.ding@rock-chips.com>
2023-04-14 17:42:22 +08:00
Yandong Lin
0380ab2453 [hal_h265d_rkv]: fix cut slice header extension data issue
In 64-bit env, memcpy in the same buffer may cause err stream.
Use memmove replace memcpy to resolve the issue.

Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: I55326e03c1af04ec617bd213c7dcd84d5d92406d
2023-04-11 14:17:59 +08:00
Yandong Lin
2d6ba2a3c6 [h264d]: modify prop rkv_h264d_parse_debug -> h264d_debug
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: I0a2c3a980182049da71badd025138f5d896e1cc4
2023-04-10 15:57:40 +08:00
xueman.ruan
f387c6dac2 [mpp_allocator]: disable std allocator.
Signed-off-by: xueman.ruan <xueman.ruan@rock-chips.com>
Change-Id: I27441d49c2072176b848b5d80d408ebcb50926df
2023-04-07 09:06:37 +08:00
Xinhuang Li
55c5f0cb5b [rc_v2] fixed avbr min_still_percent initialization err
- Fixed min_still_percent overflow
- Fixed incorrect initialization value after dynamic
change of bit rate

Signed-off-by: Xinhuang Li <buluess.li@rock-chips.com>
Change-Id: I8a0cf501f5995731d1ad8173c3d8880b33c63f73
2023-04-06 16:15:21 +08:00
xueman.ruan
a3689ee547 [hal_avsd_plus]: fix avs+ decode error.
issue occurs in 64 bit env.

Signed-off-by: xueman.ruan <xueman.ruan@rock-chips.com>
Change-Id: Iceab22b7ded40189de1aa81451227ca5a25ed778
2023-04-06 11:18:44 +08:00
Yandong Lin
837fd4f014 [vdpu382_com]: modify set_rcb_mode to RCB_SET_BY_PRIORITY_MODE
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: Ie501c562fe93640b97f6f7ef5ad15a966c65f0ee
2023-03-29 18:06:58 +08:00
Yandong Lin
3f1e714b3b [vdpu34x_com]: filter out iner row when config rcb info
If the inter row rcb buf is placed in sram, may conflict with other
buffer in ddr, will result in slower access to data and degraded
decoding performance.

The issue will be resolved in chips after rk3588

Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: I79f5402c259ca5fa3a1223e5fb0f47bd0caa5b6d
2023-03-29 18:06:58 +08:00
xueman.ruan
ef67776801 [mpp_dec]: fix hdr stream dump yuv error.
Signed-off-by: xueman.ruan <xueman.ruan@rock-chips.com>
Change-Id: Ibf13d81dfec194bb607a1fe881227951bb1509e0
2023-03-29 15:17:31 +08:00
Ding Wei
6056a6283d [h264d]: add cmd to contorl the max buffer size for dpb use
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
Change-Id: I0771388fbd2cfe8cbb5380808e6339c84b54b660
2023-03-29 14:49:53 +08:00
Yandong Lin
d1ef8d9eda [av1d_parser]: fix hor_stride when 10bit conver to 8bit
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: I08a1a2a9144f8a6b40dcc1bbaf95181bddde70f5
2023-03-28 14:53:44 +08:00
Yandong Lin
bd94623641 [mpp_frame]: add 10bit yuv fmt check macro
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: Ic045a031c23eb697478492251e940d83fb5cb5ad
2023-03-28 14:51:59 +08:00
Yandong Lin
92199393a0 [vp9d_vdpu382]: fix segment id base update issue
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: I9702bd5aacec4949501d9d092665d1dac8f25d05
2023-03-27 11:40:23 +08:00
Yandong Lin
8bbb9045c3 [mpp_soc]: fix enc cap for rk3562
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: I9166ae8288c1c7d4fb4c691779b5a37bcd87318e
2023-03-24 14:54:28 +08:00
Herman Chen
95f472e373 [cmake]: export json compile cmd for VSC
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I25e1f660a2fc9629399ac5b298141b54a952cd2d
2023-03-24 10:23:56 +08:00
Herman Chen
64cf1d5a16 [mpp_dec/mpp_enc]): Fix error on control notify
When notify goes with control process the control notify should not
clear the other remaining notifies.

Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: Ie5adbf10047ccbaed8717d008b60e89e08817840
2023-03-24 09:39:45 +08:00
Yandong Lin
7c02c505e9 [h264d_init]: fix some 10bit h264 dec err when fbc mode
Rootcause:
The frame_mbs_only_flag is zero in the 10bit h264 source.
then, fbc fmt is disable because of frame_mbs_only_flag=0
means the source may contain filed that need go to iep.
Solution:
Add filter for 10bit.

Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: I29163af98afbc92534863b979b38c8180b91c564
2023-03-23 18:36:52 +08:00
Johnson Ding
3d2fc1d66b [h264d]: Abort parsing for High 4:4:4 video
Hardware does not support H.264 stream at profile High 4:4:4
Predictive@L4.

Change-Id: I5c9d1bd83e731be3c7e9261d0e9db820d01a8cf7
Signed-off-by: Johnson Ding <johnson.ding@rock-chips.com>
2023-03-23 16:03:13 +08:00
Johnson Ding
4b2b48fb66 [avs2d]: fix compiler warning
Change-Id: I171ed034338124327412e0f7256baf65fffd9373
Signed-off-by: Johnson Ding <johnson.ding@rock-chips.com>
2023-03-23 15:09:11 +08:00
Yandong Lin
9ece1dabbf [avs2d_vdpu382]: support scale down decode
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: I938d38ae7f7ddc3c3bfa5d8ef3f5b33f8e3728e5
2023-03-23 14:54:03 +08:00
Yandong Lin
ada8aed9a1 [mpp_dec/enc_cfg]: fix out of bounds issue
mpp_dec_cfg and mpp_enc_cfg are same issue.

e.g. mpp_enc_cfg:

In 64-bit, the sizeof(MppEncCfgImpl) > cfg_size + sizeof(p->size)
    because of memory alignment.

So malloc a memory with size cfg_size + sizeof(p->size) and cast into
MppEncCfgImpl will case out of bounds.

Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: I7f23930ef44599332d465c49e7bd4422d45d7c3a
2023-03-22 11:53:47 +08:00
Grey Li
7ca45cef83 [mpp_buf_slot]: fix hol stride err when hdr stride 256 odd align
Signed-off-by: Grey Li <grey.li@rock-chips.com>
Change-Id: Ib608953fbe2415fdbc834266054c49aaabda2eb1
2023-03-22 10:17:37 +08:00
Johnson Ding
95dbbaa549 [avs2d]: Fix player blocked issue
For some live stream, DOI may not be consecutive. Frames decoded by
referenced may remain at DPB and never removed since no video_edit_code
or video_sequence_end_code is inserted between sequences.

Change-Id: I341a9fa02af1172fd7e49fef4738bc32fae370a2
Signed-off-by: Johnson Ding <johnson.ding@rock-chips.com>
2023-03-21 16:19:55 +08:00
Johnson Ding
72dc91bfe3 [avs2d]: fix dpb blocked issue
Frame DOI parsed from picture header may not equals to DOI recomputed.
So when judging a frame at DPB should be output or not, it may goes
wrong. Because a frame with smallest POI at DPB will have larger DOI than
DOI of a frame being parsing currently.

Change-Id: I534f56fcca7426383b671b9e34209e712f4c8a1e
Signed-off-by: Johnson Ding <johnson.ding@rock-chips.com>
2023-03-21 16:19:55 +08:00
xueman.ruan
0466c8aa6b [mpp_enc_cfg]: combine gop and ref cfg config.
Signed-off-by: xueman.ruan <xueman.ruan@rock-chips.com>
Change-Id: Ia15a0128d03b1a2624410b6f2a13effe3a03c47c
2023-03-21 09:29:37 +08:00
Herman Chen
35db8f909f [mpp_dec]: Fix log error
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
Change-Id: I46fd3b0fe2954a3fbee2acd0cc990719bed63032
2023-03-15 09:22:42 +08:00