Commit Graph

3625 Commits

Author SHA1 Message Date
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
Grey Li
f40928d06e [vdpu34x_vp9d]: Fix hdr stride 256 odd align error
Signed-off-by: Grey Li <grey.li@rock-chips.com>
Change-Id: I1f5c43317ad4d770017fabb459922d55c79e6fcf
2023-03-13 15:23:11 +08:00
Grey Li
3498fffb8a [cmake]: enable fast play once in android
Signed-off-by: Grey Li <grey.li@rock-chips.com>
Change-Id: I5e993f3652eab6ba03e0f549573f5bcd2f1981ec
2023-03-10 17:21:17 +08:00
Herman Chen
fe529b520b [jpege_vepu2]: Enlarge multi-core stream buffer
The original buffer size is too small for complex image and it will
cause iommu pagefault.

Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I3b2f1fb81cfb007fe6718a73c9eaca7d3951806c
2023-03-10 08:34:48 +08:00
Herman Chen
6ff8ad3358 [vdpu382_vp9d]: Fix hdr stride 256 odd align error
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I64312c935dbc9da6d6977e788bc8abfedc3a7505
2023-03-09 15:14:59 +08:00
Herman Chen
7aece2c5d8 [mpp_frame]: Ignore hdr flag on comparing frame
The HDR flag will not change the buffer size just ignore it.

Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: Ibebe60b8c0961e87b2b84236dd28a23e05f9d58f
2023-03-09 14:51:47 +08:00
Herman Chen
da6ad1ee5e [LICENSE]: Add MIT license to some code
1. Add LICENSE directory for Apache-2.0 and MIT
2. Add MIT license to vp8e code for linux kernel porting usage.

Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: Idcd9eb812e0737ae5d90802f33c2726b729f663e
2023-03-09 14:45:23 +08:00
xueman.ruan
cb7db08174 [mpp_enc_cfg]: Fix debug logic error.
Update trie node initial value by now.

Signed-off-by: xueman.ruan <xueman.ruan@rock-chips.com>
Change-Id: I5a01f452a689ad7587d4d249cdb6f760c35b8444
2023-03-08 11:03:20 +08:00
xueman.ruan
e6ef3d1d7a [h264e]: Fix profile compatibility error.
Issue introduced by encoding TSVC.

Signed-off-by: xueman.ruan <xueman.ruan@rock-chips.com>
Change-Id: I98c2c61634c7cc57180459e0427d5672fe407c47
2023-03-08 09:32:21 +08:00
Yandong Lin
919dfeefcc [av1d_api]: fix usr_set_fmt flag assignment err
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: Ia9e1a7025145acda57b0c8ba2ea8eedcb97945cc
2023-03-07 18:30:49 +08:00
Yandong Lin
2c1cbfbb50 [vdpu34x]: Refactor rcb info configuration
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: I83653332e11576d392dee73c30c64ad3d777a8ea
2023-03-02 11:43:54 +08:00
Yandong Lin
eaef6f5871 [av1d_parser]: add some comments
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: I3be8086aa126dc34631f1b2e14db93d5f2d484ad
2023-02-28 16:07:00 +08:00
Yandong Lin
835d8b3e96 [av1d_parser]: fix gm_params update issue
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: Id00be71023fb1ab3c4a67c290d0255f5021b4b71
2023-02-28 16:06:46 +08:00
Yandong Lin
7b7bca623a [av1d]: fix loss frame when eos packet has one more frame
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: Ied836d9947ad563749a23d29f2a4f658f15398bf
2023-02-22 14:43:05 +08:00
Yandong Lin
7786f1f518 [av1d_api]: fix compile warning
warning: unused parameter 'param' [-Wunused-parameter]''

Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: Ibc509112b096ffc381299f7d3346c34fd0c18b60
2023-02-22 14:42:43 +08:00
Yandong Lin
96380e798f [h264d_api]: fix compile warning
warning: unused variable 'hw_ref_miss' [-Wunused-variable]

Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: Ib08446dcba5f0ba0b54043ff185c6e5ed35a3cb2
2023-02-22 14:42:43 +08:00
Yandong Lin
2a69fc807c [av1d_vdpu]: fix segment read base configure err issue
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: I476a18970449082f50fd605fbe54e12e0622ddaa
2023-02-22 14:42:43 +08:00
xueman.ruan
062c175265 [hal_jpege]: Add dma heap options for JPEG encode.
use cachable dma buffer to reduce copy time.

Signed-off-by: xueman.ruan <xueman.ruan@rock-chips.com>
Change-Id: I7fcc0fa5942ea5aa4e247b5f10677843d006ff28
2023-02-21 20:57:26 +08:00
Yandong Lin
59f7ccc6ed [av1d]: add force 8bit output for user configure
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: Ie92713df9b4497fc362cc60bf7673d4e1db89fa9
2023-02-20 18:12:08 +08:00
Yandong Lin
9580df2493 [av1d_vdpu]: fix 10bit fbc confiure
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: Ie6c387a6cd92ff62dd6c9e1b5e46463c5ec4986c
2023-02-20 16:49:56 +08:00
Yandong Lin
4097c3c04d [h264d_dpb]: optimize handling when dpb buf is full
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: If8b490c0a0c64b14e5d6b7b26b9b5a5b6de7280f
2023-02-17 15:51:50 +08:00
Yandong Lin
5d81d75ba8 [h265d]: fix ref err with CRA frame issue
Flush frame when there is a frame in the dpb with poc > cur poc.

Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: Ib3a1f0a8bcdf1fddfa1f5b3928ea1dfd43bd4635
2023-02-16 17:21:13 +08:00
Herman Chen
1e2260727a [h264d]: Add ref miss check
1. Define more decoder frame error level.
2. Setup errInfo according to error type and level

Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I7d0e87d19fc5b24808cda6b2b1bdaa1e60d091f6
2023-02-16 17:18:15 +08:00
Herman Chen
4cbe378674 [h264d]: Add frame status setup on dpb_mark_malloc
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I7208f192ce44334e940d47d629d14bb1ff872859
2023-02-16 17:05:46 +08:00
Herman Chen
f7f39557e3 [mpp_frame]: Add MppFrameStatus for internal flow
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: Ie0203316dd674eb1dd43f68cb71d021deb650f0b
2023-02-16 17:05:46 +08:00
Yandong Lin
c1f8e93630 [h264d_dpb]: optimize frame num continuity check in field mode
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: Ib862a9d7a5b91202795c99b0e8da8f6927cd5178
2023-02-16 17:05:46 +08:00
Yandong Lin
6da2d072e9 [h264d_init]: fix some ref err check issue
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: I9c7655425e287550614dff579a8fdf7c9d2a2320
2023-02-16 17:05:46 +08:00
xueman.ruan
2f24b438ca [hal_h264e]: Fix TSVC async encoding error.
issue: no block encoding sends task to HAL twice, result in flushing
slice, prefix, reorder and marking accordingly.

1. fix slice reading logic.
2. malloc memory to store async encode info.

Signed-off-by: xueman.ruan <xueman.ruan@rock-chips.com>
Change-Id: I7aedef0096d606ff91e1ed30d7e228a75359931d
2023-02-15 18:03:08 +08:00
Rimon Xu
82b9f0ade9 [m2vd_parser]: fix wrong frame period cause PTS predict error
When the frame period changes, it will be recorded in the last frame
period first, but this value is an error value, which cannot be updated
back to the correct frame period later, so the correct frame period
should be restored at this time.

Signed-off-by: Rimon Xu <rimon.xu@rock-chips.com>
Change-Id: I4b910efb0145b665ff664a552517ffa0ff920ba5
2023-02-13 09:55:23 +08:00
Rimon Xu
c145c84632 [h264d]: check frame slot index when need to combine frame
Change-Id: I189cbde57add32e6310030859e4d7920fb3e33bc
Signed-off-by: Rimon Xu <rimon.xu@rock-chips.com>
2023-02-10 16:54:59 +08:00
Yandong Lin
a05b01d84f [h264d_vdpu34x]: fix some filed video dec err for rk3588
In the case of rk3588 mutilcore decoding, some field sources are decoded
error because the poc_hight is not configured correctly.

Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: I850900a9139724bd58210ecbbd77ff46bf7e299c
2023-02-10 16:46:28 +08:00