tips: 16 align input buffer commit case.
when calculate stride for register, used picture height.
when height is 1080 while ver_stride align 16, then is not matching.
Change-Id: I47dae884ed0eaf7328314daa6a6cb5940359ee91
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
RK3399 has powerfull rkvdec. There is no need to save power on
multi-instance decoding case.
Change-Id: I454594c68a1d620451e36ee4cf46f81404857de3
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Add vepu1 and vepu2 jpeg encoder support uyvy422 format.
Remove format limit on hal control operation.
Change-Id: I1bceb45fd3d285941878197256b284875094b44e
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Add yuyv422 and uyvy422 support to encoder test case: mpi_enc_test.
Note: on these two case the hor_stride should be twice of width.
With this modification test case can output correct stream now.
Change-Id: I463d3c158369d831e4558199c917023773300ac1
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Data in DecoderOut_t is malloc from vpu_api_legacy. And Android OMX
component is following this rule for historical reason. We have to
change test case to support it.
Change-Id: I202525eecc461bd9507cfa2c376de11e2fc6fc9b
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Include linux display demo and android mediacodec interface demo.
Change-Id: Ib1f6eee521b911c84fa8628e907da903fc0a9e2b
Signed-off-by: sliver.chen <sliver.chen@rock-chips.com>
Add multi-instance test case with multi-thread decoding.
This test case is mainly for platform performance evaluation.
Change-Id: I79d86a01778c2e7af00e13d1d3c3d2937bcbbcce
Signed-off-by: sliver.chen <sliver.chen@rock-chips.com>
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
When mpp_mem debug is enabled there is limit for recording mpp_mem
usage. But there is NO obvious log when this limit is reached.
This case will easily happen on multi-instance decoding in one process.
We add obvious log when this case happen.
Change-Id: Ic9160766d4499d442c25fdefae00231d15d71359
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
On mp4 case, we back-up extra data into mPackets at the
end of reset, then MppQueue#mFlushFlag will be reset,
and may be blocked on MppQueue#pull.
Change-Id: I99864ac4b3fbc053107bb35dd47d2f21fb3b6a73
Signed-off-by: Xingwen Fang <fxw@rock-chips.com>
Add new test case for multi-thread input / output.
This demo is for performance test and multi-thread decoding.
Change-Id: Iec979ba214dc189d26d2733e90e00ebd7d204f4a
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
There is difficulty for external user to get proper buffer size for
decoding. So we could fill the buf_size field at output info change
mpp_frame. Then user can get buf_size and create buffer group correctly.
Change-Id: Ibf33a81fed085615205035d2b5129029a5096d9a
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change time function from gettimeofday to clock_gettime.
Output of mpp_time() is still in us.
Change-Id: I7f961bb7bb4007e8e42ae5358bd7f568edf6c3d0
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
When in multi-codecs cases, the check_sysfs_iommu function reenters
with high probability, so some codec instances may fail to obtain
the correct memory type.
The root cause is scandir call in find_dir_in_path function. For
efficiency consideration it is better to lock ion_heap_id value.
Change-Id: I60a0eb27c3ac35bc022aa00b2cffc4e26e54bf24
Signed-off-by: Chengmc <Martin.Cheng@rock-chips.com>
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
For it is inconvenient to clear the eos bit in mpp_packet flag we add a
new function to clear the eos flag only.
Change-Id: I67fad6e416bca68b6b7cee8e816fca386759f35a
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
in some case may meet scenes of null nalu pkt,
just like 00 00 00 01 00 00 01,parser should jump over it.
if we don't jump it,p->nalu_len will be zero and p->nalu_len - 1
get 0xffffffff,access the memory addr will leads to segmentfault.
Change-Id: Ie0fae2f38bd76287c9ef924506f0801d571fb1f5
Signed-off-by: sliver.chen <sliver.chen@rock-chips.com>
in some case,user may think of png bitstream as jpeg.
and file suffixes can also easily lead to misunderstandings,
so add warning to prevention is necessary.
Change-Id: I2ed319033706b2ef48c8b34c6cdc77098137827c
Signed-off-by: sliver.chen <sliver.chen@rock-chips.com>
modify cmake script to allow multiple define about ndk variables.
It is a bug caused by low version ndk.
Change-Id: I92584f050b0cfd5397b7cf85a8963dbe492baa69
Signed-off-by: sliver.chen <sliver.chen@rock-chips.com>
Just like in the android arm/aarch directory.
Change-Id: I27fd97835c92e23e0422cfdcd381c540b9af8fd9
Signed-off-by: sliver.chen <sliver.chen@rock-chips.com>
In hal_h265d_output_scalinglist_packet first call the uninitialised
value in array may cause unexpected memcmp return value.
Change-Id: I32535fad765f548db7649dd4fefdc71d907efcd4
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
1. Add memory node record.
2. Add runtime log with memory count and total size.
3. Add extra room for overflow detection.
4. Add memory poison after free to detect write after free.
Change-Id: I4f0fe7295f18a746c3b4c135681127a18337585e
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
remove rpl buf malloc due to no used in h265parser
Change-Id: I8a9a4348b0ae386afe60614e17ab3a108bfb55b5
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
ROI cmd just avaiable in rkvenc,but also we need to
ignore it in vpu. or will leads to warning about
unknow vpu cmd.
Change-Id: I9a630171df5698ae5d39bb2e5c38f06b2f988893
Signed-off-by: sliver.chen <sliver.chen@rock-chips.com>
Modify some register params to support 32-bit rgb fmt,including
vepu1 and vepu2.
Change-Id: I265ad77eb02f95cc51de3bc51a340b56cdebb702
Signed-off-by: sliver.chen <sliver.chen@rock-chips.com>
When push display mpp_frame will generate a new copy. If it found a
reset flag the whole mpp_frame should be free rather than only
mpp_buffer in the mpp_frame.
Change-Id: I4b784e668167ef9be06a9dd1a02e860a7654a021
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
ROI cmd just avaiable in rkvenc,but also we need to ignore it in vpu or
will leads to warning about unknow vpu cmd.
Change-Id: I938aeb75adbc68f7ef04f0c78f2c7df84665111c
Signed-off-by: sliver.chen <sliver.chen@rock-chips.com>
The external buffer group has been assigned to
nil, so doesn't assign a listener for it.
Change-Id: I6d4a19ffba88f271114c18f10523b5cc6a60df66
Signed-off-by: Randy Li <randy.li@rock-chips.com>
tips: when decode too fast then display queue is full,
that should wait until frame displayed.
Change-Id: Ic8ec18368fdb956cad92b0760a3d4637e46f55bf
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
tips: when last packet is not empty and has data should decode
it and then flush dpb.
Change-Id: Ia677a3bc8163405feb50ce426d954a1477dc3146
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
As we found that simple ion / drm device detectioin can not cover all the
case. For example on some 3368 platform kernel provide both ion and drm
device. We have better to use allocator chosen in dts.
But later kernel patch from Randy will bring unified dma-fd translation in
kernel then this detection will be removed.
Change-Id: I2746142d1c3d0f36791bacaadb231dc2001a5aa7
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Add log record for mpp_buffer_group_reset and mpp_buffer discard.
Add log when normal group became orphan group.
Change-Id: I08127efae9f9587693c012816aa4e48de50a61c4
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
tips:
a) when eos is empty frame, direct flush and return.
b) when last frame has eos, then decode it and flush.
c) mpp_put_frame must check frame slot whether empty.
d) when eos_frame decode error, mark error in eos_frame
Change-Id: Ia78445b2e568195f411b2f339469f4097e83b570
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
1. Disable error default is not set for normal error detection.
2. On special case like drone streaming the user prefers to ignore
all error and continue decoding. Then disable error flag will be set
to fullfill this requirement.
3. When disable error flag is set H.264/H.265 decoding will ignore
hardware error and mark all output frame as no error.
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
Change-Id: I8fd619511c53ee744ae973ab3fe015565106dd37
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>