IEP (Image Enhance Processor) is a hardware for image process. It can
provide ability of deinterlace and color enhancement.
Use ini file to config iep function. Sample config iep_dei.cfg is
attached. Test command is listed below:
iep_test -w 720 -h 480 -c yuv420p -f /sdcard/soccer_720x480_30fps.yuv -W
720 -H 480 -c yuv420sp -F /sdcard/output.yuv -m deinterlace -x
/sdcard/iep_dei.cfg
Source code is based on libiep.so
Change-Id: I765837f88a2fd26abf535db71d21c484dd22d2bd
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Each of the different alloctor has different alloctor modes,
such as allocating physical continuous memory, secure memory,
etc.
Change-Id: Ib032689f0cfd36b494843dcc176a22c6c9587b6a
Signed-off-by: Rimon Xu <rimon.xu@rock-chips.com>
In order to separate the hardware and decoding protocols
more clearly, all API must be implemented in context.
Change-Id: I9f8128c5399149699b2e0a03bfa72ff902c25b87
Signed-off-by: Rimon Xu <rimon.xu@rock-chips.com>
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
Hardware only support baseline H.263 stream. The stream with
mv_outside_frame flag will be blocky if force hardware decoding.
So we do not use hardware to decode this kind of stream.
Change-Id: I679f37c1d7f248f89b2338a887d4a1e2dea68bf2
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
tips: this command is used to set decoded frame immediate out,
whehter is in display order or not.
Change-Id: I0b6b2c34fde722fe724019118c7af142b4b2e6f1
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
When cmake upgrade to 3.5.1 it will generate warning when set
C_VISIBILITY / CXX_VISIBILITY to static library.
So we remove static library visibility setting.
Change-Id: I774597a92f5aa4a64677a32f0a642c442092ebaf
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
tips: the timestamp in slice header is not useful, except for
calculate increment of dispaly frame. so, it cannot use to
dispaly, and remove it.
Change-Id: I748d553d40c4736e2f5ef98d8a8519fcc5e533e0
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
tips: when input timestamp has not pts, and set pts=dts,
it should use input timestamp order for output.
Change-Id: I8b3ef9a8d150e5729a3fa94df6c1b448edb8f1fd
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
1. dicard stream when has not got keyframe.
2. when frame is not intra, check the errinfo flag for refs.
3. when hard return is not ready, mark errinfo.
4. when reset setting, discard the frame remainng.
Change-Id: Idd03a8476e76875176475167ca5890e247f75ee3
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
tips: use 64bit instead of 32bit for time, then
caculate will be used to 64 bits.otherwise, it will
be overflow in any case.
Change-Id: Ibc6c2cf47c409a47a1877f96995ccebc979574f9
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
This buffer type is used for the buffer coming from the
application, the application should make sure those
buffers are the dma buffer.
Change-Id: I2c8491f4dea77e5d7ae8d9157b0a1eda204f4bd6
Signed-off-by: Randy Li <randy.li@rock-chips.com>
Operation not permitted, it also means that this operation
is not implemented.
Change-Id: I752efb3f5a697125f334f6fdf8bd58fea94a7024
Signed-off-by: Randy Li <randy.li@rock-chips.com>
1. fix the header protection
2. the incorrect offset in ion memory mapping
3. the commentment of the buffer type in a header file
Change-Id: If9d1db90d41131750a341ab6177f947f7b966317
Signed-off-by: Randy Li <randy.li@rock-chips.com>
JPEG VDPU can support 8K image decoding. So we can change the limit on
hal header file.
Change-Id: Icd744300b391be0fb6387215252145c945caf488
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>
When open vpu_api context we need to get it earlier.
Change-Id: I10ee57df5d746dfe5b655fd2299a782e54e6dd3f
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
On Android 8.0 librk_vpuapi.so is under /vendor/lib. We need to add it.
And for debugging case there may be multiple library in system so we had
better to print librk_vpuapi.so path.
Change-Id: Ic85c594d41da723cf8528d06e93c4643de048a99
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
There is a bug of stucking on decoder parser thread:
When decoder parser thread is block by info change and enter waiting.
There is no way to wake up parser thread to continue decoding.
The put_packet only signal sem on packets. May be it better to use
sem on info change too.
Change-Id: I3a3c45629a55d438ae9fee1968db27a94bafb20d
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
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>