Commit Graph

1911 Commits

Author SHA1 Message Date
Herman Chen
12a7c735e5 [test]: Add more comment to mpi_dec_test
1. Use half internal mode for demo
2. Add decoder memory mode description

Change-Id: I5b72063e55c2228050af7bafe743e0b9ad834721
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2016-12-09 16:46:28 +08:00
Herman Chen
1d12407883 [mpp_buffer]: Fix handwriting error
Change-Id: I6dd3bb986d4c35fd6255b1eec2617569d2e7ba70
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2016-12-09 16:10:46 +08:00
timkingh.huang
ae1611601c [m4vd]: adjust register configuration
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>
2016-12-09 14:44:50 +08:00
Lin Kesheng
167f333065 [doc]: format readme.txt use 'fromdos'
Change-Id: I84645959c96acef1d654ed6992c8a85ff03d1ede
Signed-off-by: Lin Kesheng <lks@rock-chips.com>
2016-12-02 16:31:03 +08:00
Alpha Lin
f98c06f233 [osal]: add new dts node for iommu determination
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>
2016-12-02 14:28:40 +08:00
Lin Kesheng
a831e89e7c [hal_h264e_rkv]: remove warnings on windows
Where function VPUClientSendReg2 is called, surround it with
macro RKPLATFORM.

Change-Id: I41c2c48b6374d26ccc187f2950a3e392eb7751f9
Signed-off-by: Lin Kesheng <lks@rock-chips.com>
2016-12-01 21:04:57 +08:00
Herman Chen
1d3291b38a [vp8d]: Fix vp8d error on multiple dct partition
Change-Id: I85f3fff1028a99c3fe1d7972e0ceb4ede8e2db39
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2016-12-01 20:08:44 +08:00
Herman Chen
bbe38e38a7 [test]: Add return value for test
Change-Id: I4f64b3ffebda6b966cd898ba317d088be967d5d6
2016-12-01 14:17:30 +08:00
leo.ding
fb718f33fc [h264d]: add split mode
1. add split mode prepare branch
2. modify h264d_test for verify split mode

Change-Id: I387a78b45ef2417a118d03cb4b171557cf8534aa
Signed-off-by: leo.ding <leo.ding@rock-chips.com>
2016-12-01 11:32:44 +08:00
Jung Zhao
4273a46252 [drm]: add drm_debug environment support
Change-Id: If31a5ede4460f2147eba126301be39e28e3c0626
Signed-off-by: Jung Zhao <jung.zhao@rock-chips.com>
2016-11-30 17:52:08 +08:00
Lin Kesheng
762f5fcedd [mpi_rc_test]: add ratecontrol test demo
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>
2016-11-30 16:11:56 +08:00
timkingh.huang
34698dcaf8 [tools]: add doxygen config file
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>
2016-11-30 11:33:41 +08:00
Herman Chen
afb088e05a [mpp_packet]: fix false assert in mpp_packet
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>
2016-11-29 11:04:08 +08:00
hh
824c04836e [ion]: fix ion handle check error
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>
2016-11-29 10:34:12 +08:00
Herman Chen
5e5f667d68 [dec]: fix mpp_packet error usage in test
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>
2016-11-29 10:10:31 +08:00
Lin Kesheng
3ddd67009e [h264e_controller]: modify cfg checking
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>
2016-11-28 16:12:39 +08:00
Herman Chen
102453612b [test]: Set decode test packet size to 2K
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>
2016-11-28 15:00:15 +08:00
Herman Chen
771baf627b [doc]: add documents for MPP design
Change-Id: Icaa01b6ceaa0cc828e62679ca7671f62f75f457f
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2016-11-28 11:34:39 +08:00
Lin Kesheng
53602de26c [hal_h264e_vpu]: fix bug, stream err in cabac mode
1. swap endian after cabac table generation
2. correct macro CLIP3

Change-Id: I04ff7af84b0587a2d7a07943be46b8dbb062b057
Signed-off-by: Lin Kesheng <lks@rock-chips.com>
2016-11-25 18:10:17 +08:00
Lin Kesheng
89e11ed9c7 [ion]: dup new fd while get fd 0 after importing
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>
2016-11-25 14:55:32 +08:00
Lin Kesheng
723ffae18e [mpi_enc_test]: fix mpi_enc_test read src frame bug
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>
2016-11-24 17:52:44 +08:00
Cody Xie
edaf21bab8 mpp : Install library to processor specific dir.
Change-Id: Ifa415d0611fa75eaa5bc0910e78b889fb2b99127
Signed-off-by: Cody Xie <xkd@rock-chips.com>
2016-11-24 16:48:26 +08:00
Cody Xie
3f0b6e50bd mpp : Add install mpp public header files.
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>
2016-11-24 16:46:12 +08:00
Cody Xie
b534aaf68e mpp : Add install libmpp.a and libmpp.so
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>
2016-11-24 16:25:06 +08:00
Lin Kesheng
9e4559e482 [hal_h264e_rkv]: fix bug, always set reg cur_frm_ref to 1
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>
2016-11-24 09:35:19 +08:00
leo.ding
93d4b74b1b [h264d]: fix judge error when set default parameters
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>
2016-11-23 17:22:52 +08:00
leo.ding
0b0c1e5e58 [h264d]: fix stride align function
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>
2016-11-23 15:14:12 +08:00
timkingh.huang
49a88d995e [jpegd]: adjust register configuration
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>
2016-11-22 20:13:41 +08:00
leo.ding
6aa0d635c9 [avsd]: add error mark in callback
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>
2016-11-22 14:15:16 +08:00
leo.ding
6223b12fa7 [avsd]: correct error when set dpb unref
Change-Id: Id89db5e50aae6c93193ab30ea16805097263ef58
Signed-off-by: leo.ding <leo.ding@rock-chips.com>
2016-11-22 11:31:47 +08:00
linyuhui
2bc8bb5daa [m2vd]: revise predict mpeg2 pts when error detection
when preframe_period is zero use frame_period instead

Change-Id: Id1b706bd01eeb4bce4da1bf564c9197b120aef11
Signed-off-by: linyuhui <james.lin@rock-chips.com>
2016-11-21 11:46:42 +08:00
timkingh.huang
77bb910876 [jpegd]: set output frame info
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>
2016-11-18 16:48:31 +08:00
leo.ding
7c6e7fb146 [avsd] deal with errors when ouput to display and seek
Change-Id: I88f2d2356087d74898f09086479889fce4ace881
Signed-off-by: leo.ding <leo.ding@rock-chips.com>
2016-11-18 08:45:41 +08:00
fangxingwen
1966b7ba6c [legacy]: clear input packet size after processed
Change-Id: I5ffb5ee1c73797ff5e76ddd69e18c35ea9310797
2016-11-16 21:07:31 +08:00
linyuhui
147f4e70f0 [h265d]: fix h265d regs[1] order error
Change-Id: Ieb121e0ad73412d1ea57531180166acb1ab80fc4
Signed-off-by: linyuhui <james.lin@rock-chips.com>
2016-11-16 17:23:09 +08:00
Herman Chen
3bd7a6e027 [drm]: fix runtime error for 32bit library
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>
2016-11-16 14:28:21 +08:00
Lin Kesheng
8004df9f22 [h264e_rc]: limit realBitCnt min val
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>
2016-11-16 11:54:00 +08:00
leo.ding
dfd39167bb [h265d] add wr_ddr_align_en in swreg[1]
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>
2016-11-15 18:52:15 +08:00
alpha lin
38172cb6e2 [worker]: add new dev node for rk322xh vepu
Change-Id: I8fb76dfb88c23038a406d73ba8cf6095f1f7ad6d
Signed-off-by: alpha lin <alpha.lin@rock-chips.com>
2016-11-15 17:07:13 +08:00
leo.ding
7735655408 [avsd] add avsd hard decoder driver.
Change-Id: I4459a9b3ea71d6ab06d5b6ebe6226604bc8b7042
Signed-off-by: leo.ding <leo.ding@rock-chips.com>
2016-11-15 17:04:02 +08:00
Lin Kesheng
1a9d6af7b9 [h264e_controller]: add set idr frame interface
Change-Id: I3fdaccd95b6570b2994d7a8ddb1db5d4cc066600
Signed-off-by: Lin Kesheng <lks@rock-chips.com>
2016-11-15 14:29:00 +08:00
sayon.chen
50cdfd68fe [h265d]: add more trace log for err process
Change-Id: I0d24ba0ceb86e6a4dcaaae28c2a3139f397fcb2b
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
2016-11-14 15:50:08 +08:00
Herman Chen
8cb212133a [mpp]: add encoder IDR request to mpp layer
Change-Id: I53ae99524583c2202e1412e2aaed5bebce1fe205
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2016-11-13 15:56:52 +08:00
Herman Chen
c35f72e154 [mpi]: Fix stuck on block output mode decode call
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>
2016-11-13 10:50:53 +08:00
Lin Kesheng
2f9b18b0bd [hal_h264e_rkv]: remove compile warnings on windows
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>
2016-11-11 16:21:24 +08:00
Herman Chen
92ad1d5c7e [legacy]: Fix vpuapi encode api output mismatch
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>
2016-11-09 15:02:45 +08:00
Herman Chen
2fc024529e [osal]: add environment detection function
1. add software runtime detection
2. add hardware platform detection

Change-Id: I75736ae85130325029023d948e4d756e27953af8
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2016-11-08 18:22:29 +08:00
Herman Chen
163ef0ecd9 [test]: add help for max frame number in enc test
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>
2016-11-07 20:25:08 +08:00
Herman Chen
0189e10b14 [h264e]: fix mpi_enc_test print of OSD error cmd
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>
2016-11-07 17:48:32 +08:00
linyuhui
b6eb9ba5e1 [m2vd]: fix error refs on error video streams
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
2016-11-04 11:08:40 +08:00