Commit Graph

3647 Commits

Author SHA1 Message Date
Chandler Chen
ddafef8e65 fix[h265d]: auto output frame in dpb when ready
Signed-off-by: Chandler Chen <chandler.chen@rock-chips.com>
Change-Id: Iab5389644b7456aa2c1553132874cacef77b365f
2024-07-16 09:51:35 +08:00
xueman.ruan
7275defab3 fix[m2vd]: Remove ref frame when info changed
Change-Id: I03732d5eec1902b6fbe80b1504e729b3a1d61330
Signed-off-by: xueman.ruan <xueman.ruan@rock-chips.com>
2024-07-15 09:44:52 +08:00
Hongjin Li
f1a47ba319 fix[mpp_meta]: Missing data in the instance
The function call failed because the corresponding
data is not defined:

mpp_meta_set_s32(meta, KEY_INPUT_IDR_REQ, 0);
mpp_meta_get_s32(meta, KEY_INPUT_IDR_REQ, &val);

Change-Id: I0314a5e515493fcaf49d9625aebd68c4ef61b831
Signed-off-by: Hongjin Li <vic.hong@rock-chips.com>
2024-07-12 11:21:50 +08:00
Hongjin Li
8753dc63a1 fix[mpp_bitread]: Fix negative shift error
The function update_curbyte should ensure that
num_remaining_bits_in_curr_byte_ is non-zero,
but inside the mpp_has_more_rbsp_data function,
it needs to ensure that its logic is correct.

Signed-off-by: Hongjin Li <vic.hong@rock-chips.com>
Change-Id: I6a8fb99fcf447d1ece38b271988a5a562e594cc1
2024-07-08 17:29:01 +08:00
Chandler Chen
abf0c5f574 fix[osal]: fix 128 odd plus 64 bytes alignment
Signed-off-by: Chandler Chen <chandler.chen@rock-chips.com>
Change-Id: Ibd5ebf31b17b63e9604b271b8dd23a48590d0c46
2024-07-06 16:29:49 +08:00
Hongjin Li
990f449515 fix[h265d_parser]: Fix fmt configuration issue
s->h265dctx->pix_fmt is not initialized before configuration,
so without recreating mpp, s->h265dctx->pix_fmt can only behave
normally in overlay state (ex: yuv->fbc), and abnormal in
reduction state (ex: fbc->yuv)

Signed-off-by: Hongjin Li <vic.hong@rock-chips.com>
Change-Id: Iee936b378c6de53a781fb67c5394738c74729242
2024-07-05 15:54:03 +08:00
Chandler Chen
550dd92849 fix[hal_av1d_vdpu383]: modify av1 segid wr/rd base config
Signed-off-by: Chandler Chen <chandler.chen@rock-chips.com>
Change-Id: I59242aac6973ea88ae24f8ec4baf123a87043ce9
2024-07-04 14:42:20 +08:00
Rimon Xu
c0d45df960 feat[vpu_api]: support yuv444sp decode ouput pixel format
Signed-off-by: Rimon Xu <rimon.xu@rock-chips.com>
Change-Id: Id23a952ecf8e9c62b9a286e4726bf8fb66062f2e
2024-07-03 09:28:39 +08:00
Hongjin Li
aaf92d7484 fix[h265d_parser]: Fix fmt configuration issue
s->h265dctx->pix_fmt is not initialized before configuration,
so without recreating mpp, s->h265dctx->pix_fmt can only behave
normally in overlay state (ex: yuv->fbc), and abnormal in
reduction state (ex: fbc->yuv)

Change-Id: Ib2399bdd9d41b86995f111b56a081e67a360057b
Signed-off-by: Hongjin Li <vic.hong@rock-chips.com>
2024-07-01 18:06:25 +08:00
Chandler Chen
b29e4b798d fix[hal_av1d_vdpu383]: add segid reg base config
Signed-off-by: Chandler Chen <chandler.chen@rock-chips.com>
Change-Id: Ibb140bc11997156f75c8a9661b9f09e262ae6d5b
2024-06-27 11:23:44 +08:00
Yanjun Liao
7f6ea0ad8c fix[enc_roi]: Use cache buf to reduce CPU usage
Change-Id: Ib7a90a8c1900bf3397ac320ab9b61c835ce77ee6
Signed-off-by: Yanjun Liao <yanjun.liao@rock-chips.com>
2024-06-20 20:50:18 +08:00
ctf
d4d204174e chore[cmake]: compile both dynamic and static libraries
Signed-off-by: ctf <ctf@rock-chips.com>
Change-Id: Id36494f2f014207fbe749680420426a3ce8e22c1
2024-06-20 14:46:07 +08:00
Chandler Chen
aefa45833f fix[hal_h264d]: fix cabac offset reg index error
Signed-off-by: Chandler Chen <chandler.chen@rock-chips.com>
Change-Id: I65ea5d2aa39105a4f21fe27939f4000cfcf2a5bd
2024-06-19 16:13:40 +08:00
xueman.ruan
558c249a4e fix[vdpp]: fix invalid-free err when init failure
Change-Id: Id3bf0104dd1baddcf601ce79fc8b00d67bf8d777
Signed-off-by: xueman.ruan <xueman.ruan@rock-chips.com>
2024-06-19 16:13:22 +08:00
Yandong Lin
4874c0b425 fix[mpp_buffer]: attach fd if invalid iova when get iova
Change-Id: I887812b2c9e17e18826375705b45fbae42ba3826
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
2024-06-18 14:50:39 +08:00
Yandong Lin
0de7f5a72d fix[h265e_ps]: fix disable deblocking filter failed issue
Change-Id: I004ba2c808a549db8167b27c6ae6c1b69d798f18
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
2024-06-17 20:43:59 +08:00
Yandong Lin
6ba70a2e8d fix[hal_h265e_vepu510]: disable dvbm_err_en
Prevent trigger dvbm err interrupt falsely.

Change-Id: I16f3caf6aea20f3bcef8b5bb1ebafd2073293aee
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
2024-06-17 15:37:11 +08:00
Johnson Ding
2ea51b911e fix[jpegd]: fix output format checking
At the stage of setting output color format via controlling
MPP_DEC_SET_OUTPUT_FORMAT command, colorspace of JPEG file is unknown.
So checking RGB, TILE, FBC format only.

Change-Id: Ia046a52a707f016d0225307f69a40f1eb29e9e09
Signed-off-by: Johnson Ding <johnson.ding@rock-chips.com>
2024-06-17 09:21:36 +08:00
Hongjin Li
ca6b0821a0 fix[av1d_parser]: fix pix_fmt calc issue
Error case:

When switching sources in the app, if the protocols of
the two sources are the same, but one is an 8-bit source
and the other is a 10-bit source.

Since the first source has been configured with pix_fmt
as 8bit, it will not be recalculated after switching,
resulting in an exception.

Change-Id: I92b44b9c397209171d8ef0f7a0aa65310aa8496d
Signed-off-by: Hongjin Li <vic.hong@rock-chips.com>
2024-06-14 16:18:02 +08:00
Yanjun Liao
5d9fc8a6ff fix[enc_ref]:Fix compiler warning
Initialize max_tlayers when creating RefCfg.

Change-Id: Iafb5d4eb523f7523ee3004a6eeb62c16baf62fc1
Signed-off-by: Yanjun Liao <yanjun.liao@rock-chips.com>
2024-06-14 14:55:14 +08:00
xiaoxu.chen
4c92df3f7c fix[hal_vepu580]: fix debreath enable problem
1. fix h264 width align
2. fix h265 rotation problem

Change-Id: I9f7398968d9a70f5e2acc4cb2c30250f4617042d
Signed-off-by: xiaoxu.chen <xiaoxu.chen@rock-chips.com>
2024-06-14 14:30:43 +08:00
xueman.ruan
36e263402a fix[hal_h264e]: fix segment err when encode tsvc
update segment info after amend stream

Change-Id: I6dc1ace0bcd58746f3fd0755c980e22482219f3d
Signed-off-by: xueman.ruan <xueman.ruan@rock-chips.com>
2024-06-13 09:17:12 +08:00
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