When decoding in internal buffer mode and source is field mode the
decoder need 3 buffer to continue decoding. But mpp_buffer_group_unused
function only return 1 by default.
This patch return correct value considering the buffer limit count and
buffer group mode.
Change-Id: I4331ca026708037f1d9bace090299315d41f4829
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Add iep context and iep function to the mpp_dec_vproc.
Change-Id: I0e4819cccb068fc665d1d3cac89e0d4bcda032a5
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Alloc_frame function is before mpp_hevc_frame_rps,
In the max order/ref num case, all dpb slots are used
before update rps. But alloc_frame fail first, could not
get a unused slots. So update MAX_DPB_SIZE as MAX_REF_SIZE + 1
Change-Id: I25044ff0073e9b241575a09d1250683bc923b394
Signed-off-by: james.lin <james.lin@rock-chips.com>
tips: when one packet has mutil frames, and has muti nalus,
then, it should check first_mb_in_slice, and then split
nalus to frame or field.
Change-Id: Ie8a194f069c1174fc1210896b9f0787cd144159d
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
1. Iep hardware need to setup src1 and dst1 information even it is not
configured. Otherwise it will crash hardware.
2. When iep generates error on IEP_SET_PARAMETER cmd we need to ioctl
get result to keep iep kernel driver task queue cleared.
3. Update iep kernel message structure.
Change-Id: I72ff5759535df391f55ffa06586675b25375b336
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Add mpp dec post-process thread and functions.
Change-Id: I2a03e6ddfd6c746d272dd58b629e81f98b530c4a
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Rename thread lock / signal type by its source.
Change-Id: I426cb9490dd05183badffa36f0a861c439c5f23b
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Add more function to MppBufSlot:
1. Add used / unused count for querying with corresponding log.
2. Add more queue (deinterlace / color convertion)
3. Add MppFrame generation for slot index.
4. Add post process flag for field image.
Change-Id: I2666d026fc19816d2e32547604228f2a3747211f
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
tips: when avcC ,p_strm->nalu_buf is free and still used following,
while h264d_deinit free this buf again, it must be wrong.
Change-Id: I143bdb0847b77380cd2658be1b9db64b003344bb
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
rkffplayer send MPP_DEC_SET_PRESENT_TIME_ORDER command with NULL
parameter. We need to support NULL parameter.
Change-Id: I0f75810324546bbce24e19daf5eff6e26bd164d8
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Remove motion detection / ROI / OSD setup from mpi_enc_test. These
complicated funciton will be move to a new test case later.
Change-Id: I8b212a191f4e1ba6a4ec21a23fd2f4cc51dc4c5d
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
rk3228 do NOT have jpeg encoder and rk3036 do NOT have all encoder. we
update the device name in mpp_get_vcodec_dev_name function.
Change-Id: If80d864543761572645928e59e1e09fc906fec31
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Some old kernel do not support register file with extra info. So when it
is no necessary to add extra info slots just disable it.
The reason for extra info is to handle buffer offset larger than 4M. Due
to low 10bit of 32bit address register is used for file handle and only
high 22bit can be used to as offset from buffer head. Then the offset is
limited to 4M. When we need a offset larger than 22bit we need to add
extra info slot behind register file to let kernel handle it as a
register value patch.
BTW, this is not a good design but it fix the issue so far.
Change-Id: Id5cb694f72b15958164175e402dcc03b08e898b5
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
RGA (Raster Graphic Accelerator) is a 2D graphic accelerator. It is
mainly for copy, scaling, color space convertion and rotation.
Add rga function with control operation and build-in unit test.
Add rga copy function and field duplicate function.
Change-Id: I9ce9f877fec5e7b5eaadcfa63b7eb583f194d725
Signed-off-by: sliver.chen <sliver.chen@rock-chips.com>
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>