Commit Graph

259 Commits

Author SHA1 Message Date
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
Hongjin Li
8c13cd93b0 [mpi_enc_test]: add slt testcase
slt verify file:
mpi_enc_test -w 4096 -h 2304 -t 7  -slt enc_xxx.verify -n 5
mpi_dec_test -i <inputfile>  -t 7  -slt dec_xxx.verify -n 5

Change-Id: I528fcd8d1adf8821c1555790cd8482108f219fdc
Signed-off-by: Hongjin Li <vic.hong@rock-chips.com>
2022-01-26 17:29:02 +08:00
Herman Chen
6e03da594a [test]: Fix mpi_rc2_test crash on help
Change-Id: I1a6568b03ca27e7795ae4e994fd497ad49f50c02
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2022-01-21 11:20:02 +08:00
Hongjin Li
33269e39e7 [mpp_dec]: Fix the problem of read data error
For data with sizes of 5120x7160 and 8000x8000, the required buffer size
was calculated incorrectly during the encoding process, which caused the
requested buffer to be too large, resulting in drm exceptions.
Therefore, the method of calculating data has been modified.

Signed-off-by: Hongjin Li <vic.hong@rock-chips.com>
Change-Id: I519a76687118d568cf57e7d3d54a150e9019285c
2022-01-17 20:41:06 +08:00
sayon.chen
33d6284f13 [test]: update rc2 testcase
rc2 test is a decode -> encode -> decode test case which can be used to
test the whole system codec capability.

1. Use new option module.
2. Add type for input file source stream.
3. Use decoder file reader to read input file.

Change-Id: Ia2334cd423e77a76c564478cc70c07a58954dd04
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
2022-01-12 11:50:20 +08:00
Herman Chen
96d1664cd1 [test]: Use new option module
1. Use new option module in dec/enc test
2. Delete mpi_enc_multi_test and mpi_rc_test

Change-Id: Ib00020247386ee06cca2f560ae41aee8e88f47cc
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2022-01-11 08:37:41 +08:00
sayon.chen
8c04e0d562 [mpp_enc_roi]: Add roi generation function
vepu58x roi cfg generation is depended on vepu54x roi cfg.

1. Use roi_enable to enable roi test.
2. Use roi_type to test different roi config mode.

Old region mode is set to legacy now for future roi cfg will be more and
more complicated.

Change-Id: Ib9e8976b732f05625e7589b64752d38fbd83584b
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
2021-11-30 17:11:11 +08:00
Herman Chen
fd20cf4740 [test]: cleanup test code
Change-Id: I6bf234c25b2d6709aaf095ce641812d58ad0ab68
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2021-10-21 18:19:54 +08:00
Herman Chen
180dd8136a [test]: Improve decoder tests
1. All cases use reader to improve performance.
2. Rename cmd parser and create share data on cmd parsing.
3. Add reader_size function to get file size.
4. Change test log flag to -v options.
5. Fix FileBufSlot release MppBuffer issue.
6. Use index_read in multi test to improve performance.

Usage:

mpi_dec_test -i xxx.h264
Decode to the end of input stream.

mpi_dec_test -i xxx.h264 -n 10
Decode to the first 10 frame of input stream. If the xxx.h264 has only 5
frames then loop decoding from the beginning.

mpi_dec_test -i xxx.h264 -n -1 -v qf
Infinitely loop decoding xxx.h264.
It is usefull for performance test.

mpi_dec_multi_test -i xxx.h264 -n -1 -v qf -s 8
Parallelly infinitely loop run 8 decoders with same xxx.h264 input.
It is usefull for performance test.

-v q  will disable each frame output log.
-v f  will enable fps print per second.
-n -1 will enter infinite decode mode. Press <enter> will quit the loop.

Change-Id: I3d54123f0e9b9a85cb35e4fea71ebf665889750a
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2021-10-21 15:17:48 +08:00
Herman Chen
d56760acd2 [test]: Improve decoder reader usage
1. Change to new reader slot interface.
2. Use reader slot in all decoder test case.
3. Do not async reset on eos to avoid eos stream issue.

Change-Id: If296f6555fd0e57f6931085f02b0378e41a5f2ce
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2021-10-20 09:38:37 +08:00
Herman Chen
1894648650 [test]: Rename data type in mpi_dec_mt_test
Change-Id: Ia060fea489f3e5b63f1098db64fd5e0ea3dbd463
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2021-10-13 15:45:53 +08:00
Herman Chen
2cf866c7dc [test]: remove mpi_test
Change-Id: I95d526d9d81ab34895f8f095e2e497bebe5df33b
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2021-10-12 10:44:33 +08:00
Herman Chen
db487e5d7f [mpp_dec]: Add MPP_DEC_GET_CFG cmd implement
Add MPP_DEC_GET_CFG call before setup decoder config in mpi_dec_test.

Change-Id: I1ed8c2be44be9de0e4b1364a1401a81a9ecfd6e1
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2021-09-17 11:11:43 +08:00
Johnson Ding
0faeb9413f [hal_jpegd]: Check output format before decoding
Change-Id: I035297695a4ff027814507e829adba1a767f61e8
Signed-off-by: Johnson Ding <johnson.ding@rock-chips.com>
2021-08-23 14:30:31 +08:00
Herman Chen
4dbc29e380 [mpi_dec_test]: Allow loop jpeg decoding test
Change-Id: I2074554b9106213671c976705a195b0e9f740eb7
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2021-07-01 16:51:08 +08:00
Herman Chen
dbda66de53 [test]: Add quiet flag to decoder test log
Change-Id: I9472760ede918a913957b336665d7e0367b661c5
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2021-04-30 18:43:16 +08:00
Herman Chen
841022f529 [mpi_dec_multi_test]: Add quiet flag to disable log
Change-Id: Iea28d4377212e4c18a91f30762ae8ec135702c16
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2021-04-30 18:43:16 +08:00