Commit Graph

3625 Commits

Author SHA1 Message Date
Herman Chen
239e15eaeb docs: Update 1.0.6 CHANGELOG.md
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: Ie80d696cfa4ead49db4daf1466e7bd5daf28d502
2024-06-12 14:21:35 +08:00
xueman.ruan
4bc76a61ea chore[h265d]: Reduce malloc/free frequency of vps
Change-Id: Ib7639b538227b2c76350e1fc1abeb5581463d4f0
Signed-off-by: xueman.ruan <xueman.ruan@rock-chips.com>
2024-06-10 17:13:05 +08:00
Herman Chen
9c92ab9e20 fix[drm]: Fix permission check issue on GKI kernel
The GKI kernel does not allow non-render thread to open /dev/dri/card0
and alloc drm buffer from it. So we need to use /dev/dri/renderD128
instead.

Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I0fad306c6eeadd8da5507883f4f4915c11946761
2024-06-07 14:48:51 +08:00
Yanjun Liao
50f108baf2 fix[hal_h265e]: Amend 510 tid and sync cache
Change-Id: I93f96a7da6d3caa183f4991a3a6901a6dc697b44
Signed-off-by: Yanjun Liao <yanjun.liao@rock-chips.com>
2024-06-07 11:54:01 +08:00
Yanjun Liao
ae4baaf917 fix[hal_h265e]: Fix nalu type avoid stream warning
Change-Id: Ic59c77a7276a4ca2ad1cb391c5da2316903a824c
Signed-off-by: Yanjun Liao <yanjun.liao@rock-chips.com>
2024-06-07 10:02:07 +08:00
Yanjun Liao
2256084233 fix[h265e]: Fix vps/sps max temparal layers val
Change-Id: Ia3905e146fce410537bf5f7e4c6173f7151f7ce9
Signed-off-by: Yanjun Liao <yanjun.liao@rock-chips.com>
2024-06-07 10:01:50 +08:00
Johnson Ding
53abf03bf2 fix[hal_jpeg_vdpu1]: fix dec failed on RK3036 problem
For kernel 4.4 and before, if VPU only has decoder, register size is
101. Thus extra size append at offset of 164*4 will be ignored by
kernel.

Change-Id: Idf4524099615b8ffd46766f55c9c0ea481f7cb76
Signed-off-by: Johnson Ding <johnson.ding@rock-chips.com>
2024-06-06 18:13:00 +08:00
Johnson Ding
be45576b34 refactor[hal_jpegd]: init devices at hal_jpegd_api
Calling mpp_dev_init at hal_jpegd_api before calling each device init
function. Client type can be and should be specified before calling each
device init function. There is no need to re-initialize MppDev when
PP should be used. This fix also avoid lossing format information after
re-initialize MppDev, which result in extra_info storing at higher bits of
bitstream base address register instead of appending after registers datas.

Change-Id: I2edd8f91f29d04a151c94e9d342f153f42118eb1
Signed-off-by: Johnson Ding <johnson.ding@rock-chips.com>
2024-06-06 18:12:50 +08:00
Johnson Ding
45f2fcbcf0 fix[osal]: rv1109/rv1126 vcodec_type mismatch problem
RV1126/RV1109 JPEG decoder has no PP. This will be conflict with
vcodec_type queried from kernel. Also VPU_CLIENT_VEPU2_JPEG is defined
and used only for multi-core JPEG encoder at kernel. So the following
changes is made to fix this problem:

1. This reverts commit 9b860cd250.
2. Define a new MppDecHwCap to distinguish normal VPU with only JPEG
   supported from multi-core JPEG encoder.
3. Correct vcodec_type queried from kernel when there is no PP for
   VDPU2.

Change-Id: I58a1abe708721f725a9cf487e8f870dd5820844f
Signed-off-by: Johnson Ding <johnson.ding@rock-chips.com>
2024-06-06 18:07:06 +08:00
Johnson Ding
56449b26f1 fix[h264e_vepu2]: Adjust inter favor table
For qp lower than 6, make encoder to favor intra mode to obtain higher
quality of image, especially at chroma part.

Change-Id: I4b9f5602c2f0ca978a66a9a24f483db083ab7155
Signed-off-by: Johnson Ding <johnson.ding@rock-chips.com>
2024-06-05 09:07:50 +08:00
Yandong Lin
bebca81b26 fix[h264d]: fix drop packets after reset when err stream
1. put err stream to mpp and not get valid sps/pps.
2. put eos packet.
3. reset mpp but reset failed in init_dpb().
4. always drop new stream causeby has_get_eos flasg not
clear in h264d_reset().

Fixs: redmine(485349).

Change-Id: I2955ea4ab48f116daa717949f28411bf4798c666
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
2024-06-05 09:01:14 +08:00
Rimon Xu
34e1508c7b fix[h265d]: Allow filtering of consecutive start code
When encountering 16hex "00 00 00 01 00 00 00 01", allow filtering
out this empty NALU and do not consider it as an error stream.

Signed-off-by: Rimon Xu <rimon.xu@rock-chips.com>
Change-Id: I4fdc3cb8de7fee0a1899bc426c4681bf9ddc8d5d
2024-06-04 16:22:04 +08:00
Yandong Lin
678db389ee chore[mpp_service]: fix typo err
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: Ifa31c12ce535fd7a74f7a04bee3f9401370182ac
2024-06-04 09:12:45 +08:00
Chandler Chen
b1005a5e30 fix[hal_h264d_vdpu383]: fix spspps update issue
in fast mode, scaleing_list_enable_flag may not correct when
seeking without update spspps

Signed-off-by: Chandler Chen <chandler.chen@rock-chips.com>
Change-Id: I64a14d7ba8cb065256c212c61f39e6371c607a93
2024-06-04 09:12:45 +08:00
Yandong Lin
822324101c fix[mpp]: fix mpp frame leak when async enc
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: Iaf577295140c4086e7633ac82869cb7d19fb201c
2024-06-04 09:12:26 +08:00
Chandler Chen
015b635f46 feat[vdpu383]: refine rcb info setup
Signed-off-by: Chandler Chen <chandler.chen@rock-chips.com>
Change-Id: I1f3b53ba2258cc3b23832bf232a38aadf2e85b15
2024-06-04 09:08:45 +08:00
Herman Chen
530eceb7d0 fix[enc]: Add use_lt_idx to output packet meta
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I9d02f68362f4e294489c23d313edc2cc81925440
2024-06-04 09:08:33 +08:00
Yanjun Liao
293f61a8f6 feat[enc_265]: Support get Largest Code Unit size
Case: mpp_enc_cfg_get_s32(p->cfg, "h265:lcu_size", &lcu_size);

Change-Id: I8f284b77b465377f600cb3449d0012edd5a64098
Signed-off-by: Yanjun Liao <yanjun.liao@rock-chips.com>
2024-05-24 15:19:56 +08:00
Yandong Lin
c6a6cdfa2c fix[hal_h265e]: fix sse_sum get err
Change-Id: I194c6d1b2fe6b1de52a1ce9f5c2cf56046352df9
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
2024-05-22 21:42:11 +08:00
Yandong Lin
1f256cfd5a fix[mpp_enc_async]: fix mpp packet leak when thread quit
Change-Id: Iff50f9432d39eb5e931cec2549d78738057af340
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
2024-05-17 11:29:22 +08:00
Yanjun Liao
0e12c5da26 fix[enc_roi]: Support ROI cfg under CQP mode
Change-Id: I9049bd13dfadee20f3149e511f7e6393f1810126
Signed-off-by: Yanjun Liao <yanjun.liao@rock-chips.com>
2024-05-17 09:42:25 +08:00
Hongjin Li
9b1f18daf0 fix[hal]: Fix the lib interdependence issue
Adjust the hal layer compilation structure
and fix the lib interdependence issue.

Change-Id: I7b400b679c8592b12fae865ff0638f177bbf0d60
Signed-off-by: Hongjin Li <vic.hong@rock-chips.com>
2024-05-16 10:18:48 +08:00
Yanjun Liao
584d986e1f fix[vepu_510]: fix same log type when enc feedback
feedback ONE_SLICE_FINISH irq is not a err.

Change-Id: I350252b78750672dc3123e0983b1edf7d870c26e
Signed-off-by: Yanjun Liao <yanjun.liao@rock-chips.com>
2024-05-15 18:15:00 +08:00
Chen Jinsen
d0a06d0bed feat[mpp_dec_cfg]: Add disable dpb check config
Change-Id: Ib93948bed0547bec9b2805f9f0e73d83b56226a7
Signed-off-by: Chen Jinsen <kevin.chen@rock-chips.com>
2024-05-15 14:19:52 +08:00
Yandong Lin
3cf927ef14 fix[mpp_buffer]: fix dec/inc ref_count in multi threads
when the ref_count == 1.
Thread A:                      Thread B:
  mpp_buffer_ref_dec:
   1. buffer->lock
   2. buffer->ref_count--
   3. buffer->unlock
                    ───────► mpp_buffer_ref_inc
                                 1. buffer->lock
                                 2. buffer->ref_count++
                                 3. buffer->unlock
   4. put_buffer(); ◄───────
        list_del_init
        group->count_unused++
        buffer->used = 0
                    ───────► mpp_buffer_ref_dec:
                               list_del_init

Change-Id: I32eb38901dac26fcf6c8cd39d501c5d36dee77a2
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
2024-05-13 09:37:05 +08:00
Yandong Lin
df94c24e3a fix[mpp_enc_async]: fix debreath not work on async flow
Change-Id: I66842f64d191f020cb37b616a4d85af61325dbda
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
2024-05-13 09:33:43 +08:00
Johnson Ding
ccf8f46e78 refactor[dec]: get deocder capability via common routine
Change-Id: I9700a2418653a6d5a9a00b4c4c13f33022d2159b
Signed-off-by: Johnson Ding <johnson.ding@rock-chips.com>
2024-05-10 15:57:47 +08:00
Johnson Ding
a61c310163 fix[base]: fix AV1 and AVS2 string info missing problem
Change-Id: I6966a823fa0a2f748f3ed3e3a789a2f132f45846
Signed-off-by: Johnson Ding <johnson.ding@rock-chips.com>
2024-05-10 15:57:47 +08:00
Herman Chen
a5d9fc609e fix[mpp]: Add encoder input/output pts log
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I842b28c2528b393e8bff926e3a3f1f8a65810887
2024-05-10 15:57:47 +08:00
Yandong Lin
1d1b8139db fix[hal_vepu580/510]: fix split out err when pass1 frame
pass1 frame will disable split mode, so split out need to be disable.

Change-Id: Id1d504f954848c6b4b270788ecf077897238f82f
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
2024-05-10 15:57:47 +08:00
Hongjin Li
1176f05f78 fix[hal]: Fix target link issue
Some compilers, such as ndk16, will have problems when linking

revert: e83980a9 fix[hal_enc]: Fix lib dependency issue
fix: refactor[hal_av1d]: Migrate av1d from vpu to rkdec

Change-Id: I5592ac1040ab23e25860b595ca38e1748911e4a4
Signed-off-by: Hongjin Li <vic.hong@rock-chips.com>
2024-05-10 15:57:47 +08:00
Hongjin Li
3b8dbc7fdc refactor[hal_av1d]: Migrate av1d from vpu to rkdec
Signed-off-by: Hongjin Li <vic.hong@rock-chips.com>
Change-Id: I988f23c70191004ad24c90c4bd5fbc6cba9830de
2024-05-07 16:53:55 +08:00
Hongjin Li
e83980a9e4 fix[hal_enc]: Fix lib dependency issue
rkenc/vpu generates library files for hal/common to use.
So under rkenc/vpu, should not rely on the target library
in hal/common.

Change-Id: I9521364829aef90f9024b8388339f00f05cc3f96
Signed-off-by: Hongjin Li <vic.hong@rock-chips.com>
2024-05-07 16:46:45 +08:00
Chandler Chen
4d889a6969 chore[hal_h265d]: use INT_MAX for poc distance initiation
INT_MAX already defined in <limits.h>

Signed-off-by: Chandler Chen <chandler.chen@rock-chips.com>
Change-Id: I98a12ccc81f2e390fe1528835124d05a8c5598b3
2024-05-06 15:52:01 +08:00
Chandler Chen
6a04f82ae6 fix[hal_h265d_vdpu383]: fix ref_err mark for special poc
Signed-off-by: Chandler Chen <chandler.chen@rock-chips.com>
Change-Id: I938faa24ee5181ae3dad297c31dbcdb4a0cd1aa5
2024-05-06 15:15:57 +08:00
xueman.ruan
23126cf609 fix[rc2_test]: fix pkt buffer overflow error
Change-Id: I85858087c5fbc2749904df211a870c8624959131
Signed-off-by: xueman.ruan <xueman.ruan@rock-chips.com>
2024-04-29 10:13:34 +08:00
Yanjun Liao
01a86a21ca fix[enc_utils]: Support read odd resolution image
Change-Id: Ib6b9d9ebc9d552ee0fda0f3a14c77b2ae37881d8
Signed-off-by: Yanjun Liao <yanjun.liao@rock-chips.com>
2024-04-26 16:44:23 +08:00
leo
4cc3fb25f7 fix[allocator]: fix on invalid DMA heap allocator
fallback to DRM/ION buffer when DMA heap allocator is invalid

Signed-off-by: leo <8252892+leokvw@users.noreply.github.com>
Change-Id: Ib2cd5669e6c9b41ceed7f4dd87f8fc33de88aa1c
2024-04-26 15:05:38 +08:00
Yandong Lin
80957d2661 fix[hal_h265e_vepu580]: fix reg config err for 2pass
relative redmine:
https://redmine.rock-chips.com/issues/479297

Change-Id: I2af19324ac936fa0fb7239c8dc192b47532e4faf
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
2024-04-25 19:13:07 +08:00
xueman.ruan
fee1de05f1 fix[jpegd_vdpu]: Adjust file dump path
Change-Id: I593d1c5cae25506e83e88307d1b04c1aeb1c8c58
Signed-off-by: xueman.ruan <xueman.ruan@rock-chips.com>
2024-04-24 10:48:59 +08:00
Chandler Chen
2c2c3c4d53 fix[mpp_common]: fix 128 odd plus 64 alignment
former commit:https://10.10.10.29/c/rk/mpp/+/213571

Signed-off-by: Chandler Chen <chandler.chen@rock-chips.com>
Change-Id: If09095891c1dfaa0663c01776ca4cb046ed4b24a
2024-04-24 09:59:50 +08:00
MarcA711
22c3ff9b94 chore[cmake]: remove duplicate code
Signed-off-by: MarcA711 <40744649+MarcA711@users.noreply.github.com>
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: Ibc5fe4d722f255738d93d9c5999fc24e394bac51
2024-04-24 09:31:28 +08:00
MarcA711
9f9986752f fix[cmake]: fix static build
Signed-off-by: MarcA711 <40744649+MarcA711@users.noreply.github.com>
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I4bd4a7543584685b20089d3953e700f5612523e7
2024-04-24 09:31:01 +08:00
Hongjin Li
efbf1ddafc fix[vdpu383]: Update vdpu383 error detection
Change-Id: Iac93e49beef7d36598c00ef77e1cfbee1b8822c3
Signed-off-by: Hongjin Li <vic.hong@rock-chips.com>
2024-04-23 17:35:16 +08:00
Chandler Chen
0a9509431f feat[vdpu383]: support 8K downscale mode
Now there are 2 mode for downscale thumbnail frame buffer

1.MPP_FRAME_THUMBNAIL_MIXED (already use on RK3528 box):
Each buffer contains original output frame and 2x2 downscale
small frame, small image's buffer offset will be set in frame
meta info;
2.MPP_FRAME_THUMBNAIL_ONLY (newly added for rk3576 8K video):
for rk3576: vop & gpu does not support 8K frame,
in this case, mpp use 4K downscale buffer as decoder output

Signed-off-by: Chandler Chen <chandler.chen@rock-chips.com>
Change-Id: I3acf9486a657fa3e999ca16140f40b2a01ebcaf4
2024-04-23 15:54:30 +08:00
Herman Chen
bebc996110 docs: Update 1.0.5 CHANGELOG.md
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: If093af3d3844ce9ee5101348e8b336a8d0ad3fef
2024-04-19 11:00:09 +08:00
xueman.ruan
0fda1a63ba fix[avs2d_vdpu383]: Optimise dec result
Optimise dec result when player seeking.

Change-Id: I2de6dfa4ecf91f03c6958ef631a6f256a4189de6
Signed-off-by: xueman.ruan <xueman.ruan@rock-chips.com>
2024-04-19 10:59:21 +08:00
Hongjin Li
1845e91492 fix[vdpu383]: Fix compiler warning
Signed-off-by: Hongjin Li <vic.hong@rock-chips.com>
Change-Id: Ic617c6b77dc7ec1fd44c0819252d7267ffcfd9ff
2024-04-19 09:58:50 +08:00
Herman Chen
bcd3065dc9 [script]: Update pkgconfig version
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I595cf5a913238400714d3174361586aa4479fbe9
2024-04-19 09:26:46 +08:00
xueman.ruan
4c1d759105 fix[vdpp]: Fix dmsr reg size imcompat error
Change-Id: I856bd44fefa322ff8e1136f3055851f72a74b508
Signed-off-by: xueman.ruan <xueman.ruan@rock-chips.com>
2024-04-19 09:21:42 +08:00