Commit graph

1610 commits

Author SHA1 Message Date
Yanjun Liao
9233e3bd4d fix[mpp_enc_impl]: Fix ref_cfg setup error
Change-Id: Ifa84dda229711e9af31967b1a57936079da3bb3a
Signed-off-by: Yanjun Liao <yanjun.liao@rock-chips.com>
2025-11-07 17:42:37 +08:00
Johnson Ding
acd5537923 fix[avs2d]: fix parser segment fault
If packet is splited outside of mpp and video_sequence_start_code is not
guaranteed, there will not be valid NALS. Thus segment fault will
happen.

Change-Id: Idb5e51772384c6663260d382b94845a8e1ac7c35
Signed-off-by: Johnson Ding <johnson.ding@rock-chips.com>
2025-11-07 10:54:12 +08:00
xiaoxu.chen
ec5606557e chore[mpp]: Delete mpp_enc_cfg_impl.h
Change-Id: Iee8dcf523d0d3018dd73b2b5da21b0a58736214f
Signed-off-by: xiaoxu.chen <xiaoxu.chen@rock-chips.com>
2025-10-29 05:57:13 +00:00
Yanjun Liao
3d047de1d4 fix[mpp]: Fix c89 build error
Change-Id: I648e78e4b271e914225f848309290e749fdd5176
Signed-off-by: Yanjun Liao <yanjun.liao@rock-chips.com>
2025-10-29 10:30:16 +08:00
Herman Chen
067de5647a feat[mpp_enc_cfg]: Change to object implement
Modification Point:
1. Use enc configure object macro.
2. Use kmpp_obj_update to sync user cfg setup.
3. Distinguish between user mode and kernel mode for enc obj.
4. EncImpl only check codec related SET_CFG result.
5. Refactor SET_CFG flow.
6. Adapter jpeg q_mode feature.

Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Signed-off-by: xiaoxu.chen <xiaoxu.chen@rock-chips.com>
Change-Id: I2856acdf863189fdaa29121ad8bc007fe90b5ab5
2025-10-24 11:18:37 +08:00
Yanjun Liao
60dfbcaace refactor[mpp]: Refactor C++ mpp to C
Change-Id: Icfe26b36d066b32355bda919e605e165399c0781
Signed-off-by: Yanjun Liao <yanjun.liao@rock-chips.com>
2025-10-11 09:10:42 +00:00
Yanjun Liao
9a079f8c6f refactor[mpp]: Rename file type from C++ to C
Change-Id: I657ec099b95ee745a6963c0768dc97308c2c6735
Signed-off-by: Yanjun Liao <yanjun.liao@rock-chips.com>
2025-10-11 09:10:42 +00:00
Rimon Xu
7e060500df fix[parser]: Ensure the DTS is transmitted to the frame
Support Codec list:
  - [x] H.264
  - [x] H.265
  - [x] m2vd
  - [x] m4vd
  - [x] H.263
  - [x] AV1
  - [x] AVS
  - [x] AVS2
  - [x] JPEG
  - [x] VP8
  - [x] VP9

Signed-off-by: Rimon Xu <rimon.xu@rock-chips.com>
Change-Id: Ieff2ef14482256031fcc699e6894a546c9b29502
2025-09-30 15:05:52 +08:00
Yandong Lin
c1f1c12dcf fix[h265d]: Fix rps data update issue
1. Add rps_update_flag to indicate whether to update rps.
2. Fix global cfg data len for vdpu384a.

Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: I1c664c99f34f6dea940368496175273042b48b18
2025-09-30 15:05:34 +08:00
Herman Chen
b0c69ecb46 fix[mpp]: Fix some typos
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: Ie21c286c5884139d631845162da458a7ac1803a6
2025-09-11 10:09:07 +00:00
Herman Chen
f507421f8b chore[mpp_enc_cfg]: Remove MppEncCodecCfg
1. Revert codec cfg to separate h264/h265/jpeg/vp8 cfg.
2. Update enc/dec/sys cfg_test print.

Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: Ida5da8a6b738fbf710e1ab590bc6b6f3438319c4
2025-09-10 17:39:55 +08:00
Yandong Lin
fdba12d3fa fix[h265e]: Remove unused buffer
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: Ief949dd9a1f00252e0268007f9dac1449578d997
2025-09-03 09:38:17 +00:00
Herman Chen
6666925dab refactor[rc]: Refactor C++ rc/rc_base to C
Change-Id: Iae123d5bc76e74b06a09655829de3ef0508ebd30
Signed-off-by: Chandler Chen <chandler.chen@rock-chips.com>
Signed-off-by: Hongjin Li <vic.hong@rock-chips.com>
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2025-09-02 15:04:56 +08:00
Herman Chen
32767f39fb fix: Rename FFmpeg to FF for sdk release request
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: Ia78a214cd5544e6d7ad14c19201d5cb53138c6d5
2025-08-11 15:04:24 +08:00
Herman Chen
a91e70bd23 chore: Rename Dolby for sdk release requirement
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: Ia5293f7963937ce57c123590abc32d208d181602
2025-08-11 07:01:16 +00:00
Rimon Xu
3e54310f7f fix[h265d]: Ensure the DTS is transmitted to the frame
Signed-off-by: Rimon Xu <rimon.xu@rock-chips.com>
Change-Id: Ic950a1c4f9ab8d7c54d699773f7a0629fe04fb3d
2025-08-08 02:44:03 +00:00
Yanjun Liao
ac16b2c63e fix[h264e_api_v2]: Fix bit_real calc in skip mode
Platform: all
Spec: h264e

The hw_length is in bytes, but bit_real is in bits.

Change-Id: I53428c6347c3f33ad63d2f6dd78daa72b910055f
Signed-off-by: Yanjun Liao <yanjun.liao@rock-chips.com>
2025-07-31 00:55:45 +00:00
Hongjin Li
cca218ca73 fix[h264d]: Fix fast play mode not working in shell environment.
Platform: General
Spec: h264

Error case:
Forced fast play mode does not take effect.

Reported-by: redmine #567023
Change-Id: Ia167a9c59feb0d3b276588bcade691518984fca9
Signed-off-by: Hongjin Li <vic.hong@rock-chips.com>
2025-07-30 13:34:00 +00:00
Herman Chen
b851fdc379 chore[mpp_enc_cfg]: Add base:smart_en option
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: If3799589a8a65a2181b117d70014af87957afe72
2025-07-25 14:44:46 +08:00
Yanjun Liao
05f59be432 fix[hal_h265e]: Fix nal type in tsvc mode
Platform: vepu_580/540/510
Spec: h265e

In tsvc mode, top p-frames not used as reference frames.

Change-Id: I0b285e5ed753e73321fd728389195f0e5b118874
Signed-off-by: Yanjun Liao <yanjun.liao@rock-chips.com>
2025-07-25 11:02:42 +08:00
Herman Chen
1893dede1c refactor[rc_api]: Refactor C++ rc_api to C
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I0130766b1f5817e4581454e72d478e112e6e836d
2025-07-23 18:01:09 +08:00
Hongjin Li
cc3194d336 fix[h265d]: Fix log issue
Reported-by: https://github.com/rockchip-linux/mpp/issues/874

Signed-off-by: Hongjin Li <vic.hong@rock-chips.com>
Change-Id: Ic2b60decee850f15db9e5145b62dbc5a05f4c03a
2025-07-23 01:45:08 +00:00
Herman Chen
9aef0ff7a7 feat[base]: Use enc cfg obj
Sync with kmpp-develop commit:
feat[kmpp]: Use enc cfg obj

Add MppEncCfgImpl to compatible with MppEncCfgSet and kmpp_obj path.

Signed-off-by: xiaoxu.chen <xiaoxu.chen@rock-chips.com>
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: Id4e262d1053c03cd93d620828405f060f0f8517c
2025-07-18 15:48:19 +08:00
timkingh.huang
72492494ee feat[smart_v3]: Add new frame qp interface
min_bg_fqp: min frame qp for background region
max_bg_fqp: max frame qp for background region
min_fg_fqp: min frame qp for foreground region
max_fg_fqp: max frame qp for foreground region

Change-Id: Idc10767d545dd83e4157f839a621e4801c98201e
Signed-off-by: timkingh.huang <timkingh.huang@rock-chips.com>
2025-07-12 17:21:09 +08:00
timkingh.huang
db6deeef62 chore[rc_smt]: Adjust code style for rc_smt
Change-Id: I819c76652270104b32775b44e8f6658bf95b4437
Signed-off-by: timkingh.huang <timkingh.huang@rock-chips.com>
2025-07-12 09:13:02 +00:00
Yandong Lin
e08da1bd61 fix[av1d_parser]: Fix parse obu units error.
Because the loop uses repeated i, the parsing obu units
falling into an infinite loop.

Change-Id: Idc972cc05bb6c1bee94ad0e4c3d46c07da88a73d
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
2025-06-25 07:45:19 +00:00
timkingh.huang
92ca648b53 feat[smt_v3]: Add parameters cfg interface
Change-Id: If7f54c829e7d79843800a0a15fee126d152af2a8
Signed-off-by: timkingh.huang <timkingh.huang@rock-chips.com>
2025-06-24 16:53:41 +08:00
timkingh.huang
560ac10baf feat[vepu510]: Add smart v3 interface
Change-Id: Ib2dea60f794f1ef404cf91b75053d8cf2639fd6b
Signed-off-by: timkingh.huang <timkingh.huang@rock-chips.com>
2025-06-24 16:22:18 +08:00
yichen.wang
a056703411 feat[mpp_enc_cfg]: Add H.264/H.265 vui enable cfg
Support user setting for vui_parameters_present_flag.

1. Default vui enable flag is true if not setting.
2. Call mpp_enc_cfg_set_s32(cfg, "h264:vui_en", vui_en) or
        mpp_enc_cfg_set_s32(cfg, "h265:vui_en", vui_en) to
        enable or disable the vui enable flag.

Platform: all
Spec: all

Reported-by: #556121 at redmine

Change-Id: Ie4a23c2879c3209377a5800d8e63c4081c34e0f7
Signed-off-by: wyc <yichen.wang@rock-chips.com>
2025-06-24 11:10:39 +08:00
Hongjin Li
6624f5cfa2 fix[av1d_parse]: Fix mem leak issue
Platform: General
Spec: av1

Reported-by: redmine #513080
Change-Id: I228ab74182359f746e744c78cc9259524d9e9aba
Signed-off-by: Hongjin Li <vic.hong@rock-chips.com>
2025-06-23 17:30:50 +08:00
xiaoxu.chen
97f620f832 fix[h265d]: Fix yuv400 decode error
Platform: RV1126B
Spec: h265

Error case:
The H.265 slice header syntax lacks adaptation for the case where ChromaArrayType=0.

Reported-by: redmine #559194
Source: y400-ok.265

NOTE: The decoders before RV1126B do not support YUV400.

Change-Id: I5362bc7f3894f1ec3938708563d81bf867815d9a
Signed-off-by: xiaoxu.chen <xiaoxu.chen@rock-chips.com>
2025-06-19 12:08:54 +00:00
Johnson Ding
57695b2f59 fix[h265d]: Fix GDR stream decoding
1. GDR stream started with Non-IDR frame is supported and no need to
disable error.
2. Intra refreshed frames will be mark as discard if started with
Non-IDR frame.

Signed-off-by: Johnson Ding <johnson.ding@rock-chips.com>
Change-Id: Ide470d377f13e0512ceda4eb7219650aeffb0148
2025-06-19 17:39:51 +08:00
Herman Chen
eba256b154 refactor[base]: Refactor C++ mpp_enc_cfg to C
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Signed-off-by: Chandler Chen <chandler.chen@rock-chips.com>
Signed-off-by: Hongjin Li <vic.hong@rock-chips.com>
Change-Id: Ie60f680329ac6a861c7f7124955a35968fb82823
2025-06-19 17:39:00 +08:00
Herman Chen
e31839cc74 refactor[mpp_mem_pool]: Add exit leak pool print
1. Refactor caller parameter on pool functions.
2. Add name on pool init.
3. Add exit leak pool print.

Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I39a8a966db895340a9e01ddff3a7894f1ca4b825
2025-06-17 11:09:54 +08:00
Hongjin Li
aa6ae2c5f6 refactor[osal]: Refactor more module from C++ to C
Refactor thread, list, queue and time module.

Signed-off-by: Chandler Chen <chandler.chen@rock-chips.com>
Signed-off-by: Hongjin Li <vic.hong@rock-chips.com>
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I96c07e1549868085867502c8bb974ffd3875ea9d
2025-06-12 18:32:09 +08:00
Herman Chen
794fce9e7d fix[vp8e]: Remove unused vp8e_rc file
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I2cedfa23f39643e22f005687d04a96c484f6f90d
2025-06-12 14:50:51 +08:00
Herman Chen
63e1e88b0b fix[mpp_dec]: Fix compile warning
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: Iaa879b19731a534cde16a57699d54f588dc93753
2025-06-06 06:14:20 +00:00
Herman Chen
301d85254f refacotr[base]: Refactor mpp_dec_cfg from C++ to C
1. Change mpp_dec_cfg entry_table define
2. Use new update function to update MppDecCfgSet

Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: Ibaf98d69664c107f79ea51e6cd83419dc1bf450a
2025-06-05 11:36:24 +08:00
Yandong Lin
90df438d20 fix[h265d_parser]: Fix slice header parse
Change-Id: Ib27e3dcefcdb4b1a4116bf71c3bbb778d718e22d
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
2025-06-04 17:18:40 +08:00
Hongjin Li
3507338fa6 fix[mpp_sys_cfg]: Fix stride issue on resolution change
Platform: General
Spec: vp8/vp9/mpeg2

Error case:
Stride information persists incorrectly across
resolution changes, leading to errors.

Solution:
When the stride is not set externally, it needs to
be set to 0 to avoid the stride not being updated
in time when the resolution of the same source
changes. For example, the source:
VP9_crowd_run_2048X1088_60fps_bd8_frm_resize_l41.webm
contains two resolutions: 2048x1088 and 1365x725

Source:
VP9_crowd_run_2048X1088_60fps_bd8_frm_resize_l41.webm

Reported-by: redmine #552464
Change-Id: I0e8f7c77736dbba31ccd98e559e3d7eeac240d97
Signed-off-by: Hongjin Li <vic.hong@rock-chips.com>
2025-05-19 07:47:48 +00:00
Hongjin Li
161345e67f fix[mpp_sys_cfg]: Fix ver_stride calc issue
Platform: General
Spec: vp8/vp9/mpeg2

Error case:
Ver_stride is set externally, causing sys_cfg
to use the external ver_stride directly

Solution:
If it is not necessary, do not set ver/hor_stride
externally. To minimize the impact, currently only
modify the specs that encounters problems

Source:
vp9 3840x2026 in rk3576
vp8 1920x1080 in rk3588
m2v 1920x1080 in rk3588

Reported-by: redmine #550255

Change-Id: Ie1e73e17fa2db1740d36821a5bb26fb1487e81cb
Signed-off-by: Hongjin Li <vic.hong@rock-chips.com>
2025-05-15 15:55:57 +08:00
Herman Chen
1483344ec3 refactor[base]: Remove MppDecCfgImpl
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: Ieddb794750f5810275047cbe94dceda75c35ea3c
2025-05-09 08:08:17 +00:00
Johnson Ding
aef67cc0ce fix[avs2d]: fix vertical stride config
Platform: Chips designed before RK3576
Spec: avs2

Error case:
For RK3588 FBC, vertical pixels equals to height of image aligned with
CTU size and then plus 16.

Issue reported at redmine #550260, caused by this commit:
adf21e18ba
"Align to CTU64 to avoid info change"

Change-Id: I52ab1ff4437431666b1e6fc1e458b6981f53c821
Signed-off-by: Johnson Ding <johnson.ding@rock-chips.com>
2025-05-09 15:24:56 +08:00
Yandong Lin
be7f3bb870 fix: Revert "fix[mpp_enc_impl]: fix rc cfg for jpeg enc"
This reverts commit 7954ee2324.

Change-Id: Iad0f11a415bd234a261723a72f764fbdc2fa6d69
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
2025-05-08 07:31:54 +00:00
Herman Chen
359b5c075c chore: A fix for company release requirement
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: Id24b2448a0fe1cbda19c1d1421f8ddb7c21c40dd
2025-05-08 03:31:54 +00:00
Hongjin Li
26252d3872 fix[h265d_ps]: Suppress YUV444 unsupported warning logs
Signed-off-by: Hongjin Li <vic.hong@rock-chips.com>
Change-Id: If8026b502f04b334e5858f640c58e8e515232cef
2025-04-27 17:22:23 +08:00
Chandler Chen
e69e2f88c7 fix[h265d_parser]: fix startcode finder for 00 00 00 xx case
Platform: All
Spec: h265

Error case:
nalu payloads with byte sequence 00 00 00 xx data used to be incorrectly detected as start code.

Solution:
Modify the start code detection logic by replacing
condition src[i+2] < 2 with src[i+2] == 1

Reported by: redmine #545594

Source: kiloview-p3.hevc

Signed-off-by: Chandler Chen <chandler.chen@rock-chips.com>
Change-Id: I7e544e127f324df42418765adc5a7a51e082736e
2025-04-17 01:24:28 +00:00
Johnson Ding
c5190676f4 fix[h265e]: Correct tile syntax elements at PPS
Change-Id: Iad1bf9ab7defa9eddad582a2667893dac134ca8b
Signed-off-by: Johnson Ding <johnson.ding@rock-chips.com>
2025-04-11 01:28:44 +00:00
Herman Chen
b01bd3346a fix[cmake]: Fix double object include issue
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I6cf264917d6091154408dfc327c45d4f66ed8c18
2025-04-04 03:54:28 +00:00
Hongjin Li
adf21e18ba fix[sys_cfg]: Align to CTU64 to avoid info change.
Platform: General
Spec: avs2

Error case:
In AVS2, CTU supports both 64 and 32 alignment. The
sys_cfg defaults to 64 alignment. However, if the
parsed CTU size is 32, it may cause additional info
changes.

This is because, initially, when calculating the
stride, there is no external stride configuration,
so it defaults to 64 alignment. After parsing the
video sequence, the stride is configured, and
calculations should then follow the configured
stride.

Solution:
During the parsing process, the stride is not set
and is entirely calculated by sys_cfg.

Reported-by: Liming Xu <rimon.xu@rock-chips.com>

Source: test_avs2_160x90.av1

Signed-off-by: Hongjin Li <vic.hong@rock-chips.com>
Change-Id: I0fed8b86391a03651f22ef859ec2ff1c02647b12
2025-04-03 10:29:48 +00:00