Commit Graph

275 Commits

Author SHA1 Message Date
Yandong Lin
7939be1246 refactor[mpp_enc_cfg]: Adjust cu_qp_delta_depth
sync from mpp_interface

Change-Id: I2dfabef3acf01566df289396678a433ac84f3a15
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
2025-01-09 06:17:45 +00:00
Johnson Ding
16ab9b0d4d feat[test]: Add PSNR info for video encoder
Note that the PSNR derived from SSE may not equals to PSNR from video
analyser. Because SSE returned from hardware is consist of both luma and
chroma samples. And SSE of chroma samples multiplied by some weight.
But the difference is within 1db, usually no more than 0.5db.

Change-Id: I294d473c656f39ce98dd0768cd6945ee38e89b14
Signed-off-by: Johnson Ding <johnson.ding@rock-chips.com>
2024-12-23 09:28:04 +08:00
Herman Chen
a426f4078e feat[dec_nt_test]: Support jpeg decoding on decode
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I36196906fe5a5cf4f0a1ebd1aa1fa69dd94f88bc
2024-12-12 14:38:34 +08:00
Herman Chen
9a787f4438 chore[test]: Use put/get in mpi_dec_test for jpeg
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I967c74815450461cfdd4fca6d1ee640a83783961
2024-12-10 16:56:27 +08:00
Tingjin Huang
5b897d8bfb fix[test]: Fix AQ table error
Change-Id: Ib1af3f352dfe88632dff686d7ab84c8430dcc901
Signed-off-by: Tingjin Huang <timkingh.huang@rock-chips.com>
2024-10-10 16:13:59 +08:00
Tingjin Huang
179122cc99 fix[tune]: Replace qpmap_en with deblur_en
Deblur_en is more generic for upper application.

Change-Id: Ibe4e0f81851fdbbe8fb8b7d840a4a9380e0403b1
Signed-off-by: Tingjin Huang <timkingh.huang@rock-chips.com>
2024-09-29 09:46:19 +08:00
timkingh.huang
4a71a39dc7 fix[smt_rc]: Fix first frame QP error
Change-Id: Icc7c30e2f2153643c2b06482e21b1082d0e3e618
Signed-off-by: timkingh.huang <timkingh.huang@rock-chips.com>
2024-09-25 16:45:11 +08:00
Tingjin Huang
fdb674ab01 fix[test]: Fix mdinfo size according to soc type
Change-Id: I25801cefe329f4aea943379a7fd99db57b733ed1
Signed-off-by: Tingjin Huang <timkingh.huang@rock-chips.com>
2024-09-13 14:52:19 +08:00
Tingjin Huang
ba450dd834 fix[vepu510]: Sync code from enc_tune branch
1. Fix AQ setup error for smart H.264
2. Fix initial value error of qp_min
3. Adjust H.264 regs setup for CVR scene

Change-Id: I38b09edb95532a3c1e9a544584c6d258f05fc43b
Signed-off-by: Tingjin Huang <timkingh.huang@rock-chips.com>
2024-09-10 17:42:41 +08:00
Johnson Ding
6f0f337f71 fix[test]: Fix test demo stuck issue
When reading file from start over, buffer got from list should be put
back. Otherwise buffer list will have no more buffer available after
rewinding BUF_COUNT (which is 4 currently) times.

Change-Id: If346e1824bd876cf2d6c226c97c1dec17dc9b56f
Signed-off-by: Johnson Ding <johnson.ding@rock-chips.com>
2024-09-04 18:26:09 +08:00
Tingjin Huang
2988a0c499 fix[mpi_enc_test]: Remove redundant code about smart encoding
Change-Id: I3a0876bd9476590b0e25d1c18f76a793fd4c86ab
Signed-off-by: Tingjin Huang <timkingh.huang@rock-chips.com>
2024-08-29 11:26:17 +08:00
Tingjin Huang
01dee1b7d4 feat[vepu580]: Optimization to improve VMAF
Signed-off-by: Tingjin Huang <timkingh.huang@rock-chips.com>
Change-Id: Idaecf9a402aa9b87802d76911abb816e0dc557ec
2024-08-29 10:04:03 +08:00
Tingjin Huang
e03714e193 feat[vepu580]: Add qpmap and rc container interface
Signed-off-by: Tingjin Huang <timkingh.huang@rock-chips.com>
Change-Id: I9fb0683008880a2e025664052a64d290730e6b49
2024-08-29 10:04:03 +08:00
liming.lou
1bb6ff8993 feat[vepu510]: Sync code from enc_tune branch
1. Design 8 mode for smear
2. Adjust atf_e and atr_e switch
3. Adjust aq thd and aq qp delta
4. Modify appropriate parameters for smear
5. Add sao atr atl configure interface

Change-Id: I0afb7e3d920dddfd33ea8d81fcbda5dd0d6801d3
Signed-off-by: Tingjin Huang <timkingh.huang@rock-chips.com>
2024-08-27 10:23:33 +08:00
toby.zhang
03696728e1 feat[vepu510]: Sync code from enc_tune branch
1. Add anti-line tuning
2. Adjust AQ assignment
3. Add smart encoding
4. Add deblur/qpmap routine
5. Add atf & four level intensity control atf
6. Add atr anti_blur function
7. Add real time bitrate output
8. Add smear buffer for vepu510

Change-Id: Iae661686f6adacd0b5ec57c102c184e2537dfc7d
Signed-off-by: Tingjin Huang <timkingh.huang@rock-chips.com>
2024-08-27 10:23:23 +08:00
toby.zhang
02095f66d3 feat[vepu510]: Sync code from enc_tune branch
1. Add cu_qp_delta_depth cfg
2. Configure AQ regs for H.265
3. Configure regs according to scene mode
4. Support fixed frame level QP
5. Add RDO lambda table index
6. Update stat info for HEVC
7. Add tuning code for H.264 encoder

Change-Id: Id7dae4ed55e1b94622aee72cfce8f24c833d00e1
Signed-off-by: Tingjin Huang <timkingh.huang@rock-chips.com>
2024-08-27 10:08:49 +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
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
Herman Chen
02a35cb871 fix: Fix clerical error
fix denorminator to denominator

Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I6e9deed4fe3bcdc1d2f7d56f3dccb87607d576bf
2024-03-05 11:31:47 +08:00
Yanjun Liao
ed77dd7988 feat[mpi_enc_test]: add YUV400 fmt support
Change-Id: I05d149d176e1e692e9706dac07e6d843446309f9
Signed-off-by: Yanjun Liao <yanjun.liao@rock-chips.com>
2024-01-11 18:02:23 +08:00
Herman Chen
5fbde2b49e fix[test]: Fix mpi_enc_mt_test error
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I7a566766972e8e279f48ac4b6f9dc54195ba1ea5
2023-11-29 10:15:24 +08:00
Yanjun Liao
ce39aff31f feat[dec_test]: Add buffer mode option
Add an option in dec_test to demo zero-copy external buffers mode.

use -bufmode to config the buffer mode option
hl - half internal mode
i  - pure internal mode
e  - pure external mode

Change-Id: Ib92c30acd8c370843becb286c935de056b09bcbd
Signed-off-by: Yanjun Liao <yanjun.liao@rock-chips.com>
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2023-11-29 09:54:36 +08:00
Herman Chen
0d773814cf chore[mpp_enc]: Encoder changes to cacheable buffer
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I8df399ff708e354f8e3017da41e1424cba4999ee
2023-11-29 09:54:36 +08:00
Herman Chen
5d89c2cc32 chore[mpp_dec]: Decoder changes to cacheable buffer
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I839cd04d14a38f4553785c44667758df69aa9929
2023-11-29 09:54:36 +08:00
hdl
68177e2268 feat[vepu580]: Add frm min/max qp and scene_mode cmd param
Signed-off-by: hdl <hdl@rock-chips.com>
Change-Id: I27c3f3cfb599b8d05e58aceb1967bec4230d386e
2023-09-25 17:46:32 +08:00
xueman.ruan
c83da7de68 fix[utils]: fix convert format error
Change-Id: I9994ab4671dbf9c0f7b0b0476c9fd2710294805d
Signed-off-by: xueman.ruan <xueman.ruan@rock-chips.com>
2023-08-16 16:02:11 +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
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
Chandler Chen
97f4c8ef90 [mpi_dec_multi_test] fix output frame_count > frame_num issue
Signed-off-by: Chandler Chen <chandler.chen@rock-chips.com>
Change-Id: I87601b91cbbb3561ec022cb5e8e936876f2f6202
2023-01-12 11:34:47 +08:00
Herman Chen
fcd4750e3c [dec_utils]: Fix jpeg reader error
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I04ef9e4f6ae3bb9ccd683a0c0e439b5ff4c7d4f5
2022-12-14 16:36:36 +08:00
sayon.chen
38fc8aada8 [mpp_dec]: Support no thread decode
1. Use cmd MPP_SET_DISABLE_THREAD to disable thread, cmd set must be
after mpp_create before mpp_init.
2. When thread disabled put_packet & get_frame MUST not be used.
3. Separate normal flow and no thread flow.

Change-Id: Icf189d312ff39aacf6ca0afe7f345ff4d1cbfb67
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
2022-11-29 11:20:06 +08:00
Chandler Chen
9e018b8135 [mpi_enc_test]: modify mdinfo_size
fix vepu540c pagefault

Signed-off-by: Chandler Chen <chandler.chen@rock-chips.com>
Change-Id: I2c5b5a6184ae01c20047bb9285b47850ae5fe77e
2022-11-17 17:47:11 +08:00
Johnson Ding
a9cb2cff35 [enc]: fix IDR not encoded problem
When GOP is set to 60 that is the same as the default GOP by
application, igop at reference module isn't set as expected, that leads
to CPB not be cleaned correctly and IDR frame won't be encoded.

see [issue](https://redmine.rock-chips.com/issues/374780)

Change-Id: I2f1030cab700aa560dea07284b820a73c637631e
Signed-off-by: Johnson Ding <johnson.ding@rock-chips.com>
2022-10-11 14:50:08 +08:00
xueman.ruan
09de35e9b5 [enc_cfg]: Update mirror transformation.
1. constraint the range of input argument.
2. add flip config, equal to vertical mirror transformation.
3. add mirroring_ext and rotation_ext to config set, for supporting
GET_CFG control.

Signed-off-by: xueman.ruan <xueman.ruan@rock-chips.com>
Change-Id: I01c0b9187a18851354e81b5f08afc6dcaaba8365
2022-09-21 15:21:40 +08:00
xueman.ruan
82ae30f031 [h264e_sps]: Add parameters config for encoder
Encorder parameters: constraint_set0~5

Signed-off-by: xueman.ruan <xueman.ruan@rock-chips.com>
Change-Id: I7f90ff97881f875ffad77cf4125ee6623d179563
2022-08-16 12:16:57 +08:00
Herman Chen
7b380ccab6 [mpp_enc_impl]: Add async empty task process
NOTE: Allow MppFrame output with empty MppBuffer.

Change-Id: I4caa1be867d79f68205b276a57ff59a43a102e55
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2022-08-05 11:09:31 +08:00
Yandong Lin
5132a49414 [mpi_enc_test]: add sei_mode env to control sei mode
setprop sei_mode 0 to disable sei.

Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: I35a175be32f1a49dd0f36e60b1d72534fb3742e7
2022-07-29 14:20:11 +08:00
Herman Chen
675363214a [test]: Add split_out cfg to mpi_enc_test
NOTE: Due to limitation of output task number the split output mode with
block input flow should only have less than 8 slices. Otherwise the
put_frame call will be blocked due to lack of output task slot.

Change-Id: Iab351be04196fa2b3ac3a116bd7c999f570e25eb
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2022-06-14 08:58:21 +08:00
Herman Chen
5dccad43d4 [mpi_enc_test]: Add AFBC_V2 source support
Change-Id: I089c41137edf39211f33faf234b68295256bcfc1
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2022-05-24 14:34:41 +08:00
Herman Chen
2b35cee0ce [mpp_log]: Add more log helper function
1. Move mpp_log.h to inc for external user.
2. Add mpp_debug.h for mpp internal logging.
3. Fix some warning.
4. Add log level setup function.
5. Check env log_level value in mpp_get_log_level call.

NOTE:
1. mpp internal module should use mpp_debug.h and mpp external user
should use mpp_log.h
2. Use mpp_get_log_level to update mpp_log_level when the env changed.

Change-Id: I90a55a02a72db177533013280dfe111ca3479229
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2022-05-20 11:42:10 +08:00
Hongjin Li
9d9aeba533 [mpi_enc_test][mpi_dec_test]: close slt verify file
Change-Id: Id303202846e9e415b0837e73115ce3c93503e608
Signed-off-by: Hongjin Li <vic.hong@rock-chips.com>
2022-04-25 16:12:49 +08:00
Herman Chen
f1324e29a2 [mpp_compat]: Add mpp compatible spec module
This module is for backward / forward compatiblity with external users.
1. Support compatible feature query.
2. Support update user program compatible feature update.

Change-Id: I7661f17c442eca0a0d0d57d2a35efdb5fd88be72
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2022-04-19 08:29:41 +08:00
Herman Chen
7a5544b8ec [rc]: Fix rc issue in async mode
1. Add async rc preset function.
2. Update rc_task pointer on async_wait task.
3. Save frame type in rc task info rather than in rc ctx.

Change-Id: I956b5f14a01e5c2cdc8b4c5f9c26660274a7f0e4
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2022-04-01 18:07:30 +08:00
toby.zhang
9a6af10864 [mpi_enc_test]: Set qp_init to -1
Set to -1 for auto initial qp value.

Signed-off-by: toby.zhang <toby.zhang@rock-chips.com>
Change-Id: Ibb1ba56a67b1538d239778a53d1067d4d83040d2
2022-03-17 11:48:12 +08:00
Jeffy Chen
c07169d533 [misc]: Fix a few compile warnings and errors
Reported by llvm-clang.

Change-Id: I62f22fe5754d3e8d77405d213c81fda5d9f5e27d
Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
2022-03-11 17:45:10 +08:00
toby.zhang
b3edf0d22c [mpp_enc]: Add motion dection output path
Signed-off-by: toby.zhang <toby.zhang@rock-chips.com>
Change-Id: Ie0ee26af50cef7f883cb3cd2c50f9121e4f87079
2022-03-03 17:39:00 +08:00
Herman Chen
e2fa6e0232 [test]: Add mpi_enc_mt_test
Add encoder multi-thread test case for non-block input / output mode.

Change-Id: I2a06f47574e760d1400914eb62420b047c60ceaf
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2022-03-03 11:43:54 +08:00
sayon.chen
783abcfc7a [vepu580]: Support intra frame twopass deflicker
NOTE: Only vepu580 support this feature.

Change-Id: I05768a5ca5f6d32eab3d0d9eccab0c471882cd0e
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2022-02-17 15:26:17 +08:00
toby.zhang
407fce1272 [mpi_enc_test]: Add fix qp encoder mode
Change-Id: Ia749c9eb5d2a25b87e64215aa184301baf9fa6b5
Signed-off-by: toby.zhang <toby.zhang@rock-chips.com>
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2022-02-15 16:35:37 +08:00
Hongjin Li
f7954e9545 [mpi_enc_test]: optimize slt code
1. Optimize help log about slt
2. Optimize slt file opening

Change-Id: Ib315e46d7fbb5f3ffa576c24f5e47c42a19cb09d
Signed-off-by: Hongjin Li <vic.hong@rock-chips.com>
2022-01-28 08:47:54 +08:00