Tested on RK3588 EVB with musl-1.2.2 and gcc-10.2.
Change-Id: I10574446f46964bad5e67ab45c76060a193b8335
Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
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>
1. Add more yuv fill image functions.
2. Add 24bit rgb fill image functions.
Change-Id: Ief8e3147fad924234156b7005943c5899df2abed
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Fix stride definition to compatible to both pixel stride and byte
stride.
In MPI the stride is defined to byte stride. But vepu requires 8 pixel
aligned pixel stride.
So we add more code to adapt to both case and check 8 pixel alignment.
From opengles definition:
Stride means bytes in a row of pixels including padding. So an image
could be 510 pixels in width and rounded up to 512 pixels. The stride
would be 512 * bit depth of the image's format. You could also have
stride in pixels in which case the stride would be 512 pixels
Pitch is a little more vague, but typically could be interchangeable
with stride. Considering your reference is specifying in bytes, it's
likely safe to assume they're not measuring in pixels. So the reference
likely means the number of bytes in a row + padding, the only
alternative would be number of bytes without padding e.g. image width *
bit depth.
Change-Id: I20acf71e2a6bea2eb08b41fe7df531154ebef897
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
vepu h264 input stride must be aligned to 8 for vepu limitation.
If it is not 8 aligned some buffer conversion preprocess should be done
before the buffer is sent encoder.
1. The hor_stride in vepu hardware is in pixel unit not byte unit.
2. The hor_stride in vepu must be 8 pixels aligned.
3. The YUV420P should be 16 pixels aligned for chroma.
4. Fix log print when hor_stride != width 8align
Change-Id: If30136a4673399c3be40a41a055e832db4c321d5
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
Fix the default width stride value in RGB format.
Change-Id: I330bc81bfc5057484a46815d62eccd3fd212a49d
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
The FBC data should be in this form:
+---------------------+
| header (4K aligned) |
+---------------------+
| |
| payload data |
| |
+---------------------+
The payload data size is equal to the orignal format size.
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I2855c89db43c3e2cc302ac40e96e36ef6147f041
1. Move command parsing to util files.
2. Support frame format and coding type detection.
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: Id1df67ba61943bb7aa1f02ccccaa932fb5ae9842
1. Add color format print for all supported format.
2. Add RGB color fill function.
Change-Id: I79fb3f40402b6fb6e36883c99945e709723aee7d
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
When mpp output packet binary file with size config file test case
should be enable to parser the corresponding config file.
This patch implement the config file option with "-c" prefix.
Command line sample:
mpi_dec_test -t 7 -i /sdcard/in.bin -i /sdcard/ops.bin
Then the test case will read in.bin file with size division specified
in ops.bin.
Change-Id: I8b18a6475d77f0303f12614a063888dcd9505f16
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
When decoding 422 source the YUV422 frame is default in YUV422SP mode.
But software like vooya does not support this format. So we change it to
YUV422P format for better user experience.
Change-Id: I103445470db5e6dd46ff1dc2cb705ae7e47bd8bc
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
VDPU hardware only support semi-planar format for YUV444 which is
hard to display on other software. So utils will change it to YUV444P
and write to file.
Change-Id: Ie81149d7638c2e1d36fc3bc06fe1353ca95c6c01
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Add YUV422SP format support to function dump_mpp_frame_to_file for 422
format jpeg file.
Change-Id: I721551f526c2c981f023f638f4efd20bf695f5e9
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Move yuv read function and yuv create function to utils.
Change-Id: I79a861ce869c182a27ed51a976eeb08f1f230d6e
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Add checksum calculation function and file access function for debug.
NOTE: checksum for YUV image and for luma only so far.
Change-Id: I54509bebd64f5e5143e14824733d9c25af9db204
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>