The bit 19 of reg136 is similar with bit 6 of reg120, but only
the former is set based on C Model. After that, both field
and frame mode are OK.
Change-Id: I066b813a772def2a718d2fb7f90a6f73fb8afa20
Signed-off-by: timkingh.huang <timkingh.huang@rock-chips.com>
Add new dts node 'vpu_combo' for rk312x,rk3368 video codec devices
compatibility.
Change-Id: I81326d478788ddddfb42e9fe0f4596ab84183934
Signed-off-by: Alpha Lin <alpha.lin@rock-chips.com>
Where function VPUClientSendReg2 is called, surround it with
macro RKPLATFORM.
Change-Id: I41c2c48b6374d26ccc187f2950a3e392eb7751f9
Signed-off-by: Lin Kesheng <lks@rock-chips.com>
1. encode one frame and decode it immediately
2. calculate ratecontrol stats and export
3. support enc_input fmt 420p/420sp
Change-Id: Iad751097de0ecea0d7afcef2bc12b9d92c5f9d05
Signed-off-by: Lin Kesheng <lks@rock-chips.com>
1.The INPUT tag used to specify the files and/or directories that
contain documented source files is set to mpp/inc.
2.The OUTPUT_DIRECTORY tag used to specify the (relative or absolute)
path into which the generated documentation will be written is set
to mpp/doc.
3.Assuming that doxygen is configured correctly under Linux, if you
want to get documentation of pdf format, do as follow:
cd mpp/tools
doxygen mpp_doxyfile
cd ../doc/latex
make
4.mpp/doc/html contains documentation of html format.
5.modify notes of vpu_api.h and rk_mpi.h.
Change-Id: I02b09514ff44b4689ea99e3d99d2acc9eb58cd19
Signed-off-by: timkingh.huang <timkingh.huang@rock-chips.com>
When mpp_packet change its buffer start address then set_pos the set_pos
function may generate assert on length process.
So we need to detect the buffer address change and do different length update.
Change-Id: I8259bad83327c9369e155db54e731d4863241e97
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Ion file handle can have a fd_flag equal to 0. So we need to remove the
condition fd_flag == 0 in funciton os_allocator_ion_import.
Change-Id: I0393cf1f69d358308903fc7461efc36158f42358
Signed-off-by: hh <hh@rock-chips.com>
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
1. mpp_packet length is the valid data size, fix this in copy_init function
2. in mpp_dec_test setup pos and length only do not touch data and size
Change-Id: Ic1bb15126fa09e7da0869ea79ec85ad2869c3955
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
1. set default hor_stride to width, default ver_stride to height
2. set default chroma_qp_offset to 0
3. return MPP_NOK while check failed
Change-Id: Icb81e972c74694c86e075c16eef4a7e2232851ff
Signed-off-by: Lin Kesheng <lks@rock-chips.com>
Due to current decoder does not support multi-frame data in one packet we have
to limit packet size to a small size. So that one packet will not contain
multiple frame.
This is a modification for internal auto-test environment.
Change-Id: I3bb14c62874ed693b7b9125f21ca342abe54c732
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
1. check input fd is valid
2. dup new fd while imported fd is 0
Change-Id: Ic20d070d1a29e7d37c4f1e75cbef89263c5bc3a9
Signed-off-by: Lin Kesheng <lks@rock-chips.com>
1. read src frame with real width and height of picture,
rather than virtual ones.
2. configure correct hor_stride & ver_stride for hardware
3. support yuv420/420sp for mpi_enc_test demo and video
app, and is compatible for old interface
Change-Id: I1fc23dc2954577b28e25b80a4dcdd1536d45d622
Signed-off-by: Lin Kesheng <lks@rock-chips.com>
Headers will be installed to ${CMAKE_SOURCE_DIR}/out/inc by default.
Override INC_INSTALL_DIR to install to linux system dir.
"cmake -DINC_INSTALL_DIR=/usr/include/mpp ..."
Change-Id: I94cd4652e9ce728107b29e6715a50d51e68ceb8c
Signed-off-by: Cody Xie <xkd@rock-chips.com>
libraries will be installed to ${CMAKE_SOURCE_DIR}/out/lib by default.
Building with cmake defination LIB_INSTALL_DIR can override install dir.
For example, if you want install to linux system dir,
use "cmake -DLIB_INSTALL_DIR=/usr/lib ...".
Change-Id: Ie19a768f05f2a53f154a49c2c6032eecdf95f7ed
Signed-off-by: Cody Xie <xkd@rock-chips.com>
when idr frame is forced, the frame_cnt % keyframe_interval
will be not correct anymore. While cur_frm_ref is relative
with frame_cnt % keyframe_interval, and cur_frm_ref is used
for CIME, incorrect reference means blocking.
Change-Id: I6e7224cbcfb3514f3b9487006143aab11268f866
Signed-off-by: Lin Kesheng <lks@rock-chips.com>
1. use p->ImgWidth and p->ImgHeight instead.
2. fix error and align it in mpp_slots_set_prop autoly.
Change-Id: I56d2a23a3a05656181bfd3e6b0d9e4982d237270
Signed-off-by: leo.ding <leo.ding@rock-chips.com>
when input frame which width larger than 1920 or
height larger larger than 1988, then set stride
to 256 odds times. otherwise, set 16 times.
Change-Id: I846d038422f6596280cdefeda00d71d14d5560c1
Signed-off-by: leo.ding <leo.ding@rock-chips.com>
1. only if height is 8-pixel aligned but not 16-pixel aligned,
bit 20 of reg148 is enabled.
2. default output buffer size is set to 2*width*height.
Change-Id: Ib23e1530c4c6a6688c3f8e632ba3f0b8e2b3c352
Signed-off-by: timkingh.huang <timkingh.huang@rock-chips.com>
If dpb picture is used for refer mark it as error.
Otherwise mark it as dicard.
Change-Id: I12186e3f78c05e6e8ca455326b082bc7a9d2cd31
Signed-off-by: leo.ding <leo.ding@rock-chips.com>
when preframe_period is zero use frame_period instead
Change-Id: Id1b706bd01eeb4bce4da1bf564c9197b120aef11
Signed-off-by: linyuhui <james.lin@rock-chips.com>
when one frame is decoded, set frame info such as width,
height, yuv format, display width and height, so that
upper application can handle decoded frame properly.
Change-Id: Ide89e55ac200304e7c2c49d31b6a9cd8c9feb6d9
Signed-off-by: timkingh.huang <timkingh.huang@rock-chips.com>
1. When run the 32bit library without mmap64 it will fail due to lack of mmap64
symbol. So we do a runtime detection.
2. Fix runtime error of missing getpagesize. Use sysconf(_SC_PAGESIZE) instead.
Change-Id: I6dbeb6d55175a1ebb48d314f3dc691cd029710d1
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
When realBitCnt is negative and it's absolute value
is too large, bits compensated for next frame will be
much more, leading to bitrate raising heavily.
In this case, we limit realBitCnt min val.
Change-Id: I75918b4cfa84a9b1ca248c4cd549c33f11568921
Signed-off-by: Lin Kesheng <lks@rock-chips.com>
when frame is not tiled mode, set wr_ddr_align_en enable.
Change-Id: I5135eca50785e744b83bc98c0913ee909e9ce445
Signed-off-by: leo.ding <leo.ding@rock-chips.com>
When the output mode is set to block user call decode function the first
get_frame call will get stuck if there is no frame to get.
So when the output mode is block we need to put_packet first then get_frame.
Change-Id: I8cecb0e3f7b3aac2605301d6f2d35d5ca5f97756
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
1. add new ioctl interface SendReg2 in vpu.c
2. use Sendreg2 interface in hal_h264e_rkv, exclude ioctl.h
Change-Id: Id79716e0fca96141b8665d59244569b6de9dd39a
Signed-off-by: Lin Kesheng <lks@rock-chips.com>
1. Create new buffer and copy data to buffer on each encode vpuapi function call
including encode/encode_getstream.
2. Remove H.264 00 00 00 01 header but remain others format bitstream.
Change-Id: I4333f3ecd44a5f2fe28c45064d2c6a8d4e210653
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
1. add help log print for max frame number
2. change flag from -F to -n
Change-Id: Ie45681d2b0a6bdd90733b6a6e1c455325eca89b9
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
1. Vpu do not have OSD interface but we need to disable noisy print
2. When command is not supported print hex value rather than decimal
Change-Id: I071b29e068e88c8d23582f4451286ff84a886aa9
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
1. use GOP header flag as effective start of stream,
because extra data may contain seq header but not
start of GOP then.
2. not enough refs on B-type frame need cal pts and
parser ctx but not need to decode.
Change-Id: I018417197d8eb34c857e67f302d28d292dc75952