Commit Graph

1084 Commits

Author SHA1 Message Date
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
Herman Chen
a9eeb8f5f1 [vpu]: remove unnecessary vpu_api.h reference
Change-Id: I236999afd553581c521cb549b260236c3fc05f97
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2016-11-04 09:26:35 +08:00
Herman Chen
93e6a3c2d1 [legacy]: change encoder output size dynamically
If hardware output very large video stream enlarge the corresponding output
buffer size.

Change-Id: Id7e96531e744917fe25a9c0f09effa78eb873697
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2016-11-03 17:31:00 +08:00
rimon.xu
ad4d41147c [h264e]: fix delta_qp bit order reverse error
Change-Id: I03eec5e9386657ae579613c7067ccce44580de18
Signed-off-by: rimon.xu <rimon.xu@rock-chips.com>
2016-11-03 17:16:32 +08:00
Lin Kesheng
4d2fa9ae4c [mpi_enc_test]: add option num_frame
1. add option num_frame
2. reduce osd region size

Change-Id: I560686178c902755b49422b9c7c89889338216bd
Signed-off-by: Lin Kesheng <lks@rock-chips.com>
2016-11-03 14:15:49 +08:00
timkingh.huang
257d14f7f6 [jpegd]: fix compile warning
note: uintptr_t data type is the same size as void*.

Change-Id: I5ea537f720fab6436d293816e3f618feca15609c
Signed-off-by: timkingh.huang <timkingh.huang@rock-chips.com>
2016-11-03 09:27:21 +08:00
Herman Chen
e541877c54 [legacy]: fix error on setup default width/height
Change-Id: I95e3e7cfb04063a81e5ab9e1dae261f2ed4957f3
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2016-11-01 16:23:23 +08:00
Herman Chen
d5dc784516 [mpp]: change MPP_DEC_SET_FRAME_INFO interface
Use MppFrame as the input of MPP_DEC_SET_FRAME_INFO control function.

Change-Id: I29974bb90b09239e0f69e75ee3830656851900ae
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2016-10-31 17:40:46 +08:00
linyuhui
757ded4d9f [m2vd]: use temporal_reference to fix original pts error
1. on original & external pts error use POC/temporal_reference
   in GOP to predict new pts
2. set mpeg2 temporal_reference to MppFrame POC for dpb & cal
   pts debugging

Change-Id: I3bb1b2c6646ddf4f4100c1d87158d81e1e8777ba
2016-10-31 10:02:37 +08:00
Lin Kesheng
fad35922fc [h264e_rkv]: pack cfg into SEI and write to stream
1. add SEI writting interface
2. write extra_info_cfg and rc_cfg to SEI
3. stream_get_pos use s->buf_plus8 rather than s->p_start

Change-Id: I71de4d6f5dc31f21c0a32dc5ded275ced260d861
Signed-off-by: Lin Kesheng <lks@rock-chips.com>
2016-10-25 20:54:06 +08:00
Lin Kesheng
1586aaf1e7 [h264e_codec]: modify H264E input parameter validation
modify H264EncStrmEncode input paramter validation

Change-Id: I578671f6ca94aa85dc5876f7e1039378c60595f4
Signed-off-by: Lin Kesheng <lks@rock-chips.com>
2016-10-24 09:19:40 +08:00
leo.ding
0d77905b08 [h264d]: modify hidden error, use p_hal->strm_len instead.
Change-Id: Ie10b40773a3bad40a613c9500f5cd7d26a0581e9
Signed-off-by: leo.ding <leo.ding@rock-chips.com>
2016-10-24 09:12:57 +08:00
linyuhui
d59f92c0af [h264d]: remove dpb error flag error over-mark
Change-Id: Idf5394bb48c02aa46dd7957ff1cda81d01d8a526
2016-10-24 09:11:44 +08:00
linyuhui
a570a4523e [h264d]: need realloc buffer when nalu length larger than nalu buf size
Change-Id: I4b5e0c67e7226ac9890b02898cd5a892e13f33c4
2016-10-24 09:11:20 +08:00
Lin Kesheng
60a05c1452 [hal_h264e_vpu]: set extra_info_cfg->frame_rate to SPS
Change-Id: I9e612775f12adc402d6d62aeca19e2c147e929dd
Signed-off-by: Lin Kesheng <lks@rock-chips.com>
2016-10-21 11:41:47 +08:00
Herman Chen
c056a31049 [cmake]: fix missing version symbol on Android
Change-Id: Ie9137ddf807b37f8713cb3cbcd41bbf639477446
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2016-10-20 20:14:10 +08:00
Herman Chen
cd97a84407 [mpp_buffer]: fix macro hand writing error
Change-Id: I6a3799314c345defaaf28b1377d621f51fee4e1a
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2016-10-18 15:23:09 +08:00
Lin Kesheng
083ed1340e [h264e_ctrl]: modify rc cfg validate log
Change-Id: I0a58171efa1f116b7ed3d822575d86161d1e4c78
Signed-off-by: Lin Kesheng <lks@rock-chips.com>
2016-10-17 17:22:43 +08:00
Herman Chen
d1be7a7b4d [mpp]: add mpp decode function implement
Change-Id: Ia37d42a1b52bb152a5cf98e78b040150d6451124
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2016-10-11 10:39:46 +08:00
Herman Chen
80140b3966 [ion]: use mpp_log to print scan info
In order to avoid misunderstanding change mpp_err to mpp_log

Change-Id: Id4a0591a0eeb7975fcdf1979b9d45c9b8d076370
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2016-10-11 10:06:33 +08:00
Herman Chen
e9520d5cb0 [mpi_dec_test]: cleanup test case
separate simple and advanced process

Change-Id: Ie278357e69bb0748e9958952e3a7f5560c75d024
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2016-10-10 20:08:32 +08:00
Herman Chen
4ed68d1855 [mpp]: fix error of clear input stream length
Change-Id: I06ebf5bc04c813b9e42d6a08e74e38dc56e5b2ca
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2016-10-10 16:52:48 +08:00
Herman Chen
04b6a23ce2 [test]: modify mpi_dec_test for mjpeg decoding
1. clear input packet length when packet is copied
2. modify mjpeg advanced decoding path in mpi_dec_test
3. add numerator and denominator set prop function
4. remove extra log on first info change
5. fix eos process and buffer size check in advanced decoding flow
6. fix jpegd stream length config error

Change-Id: Id6c26ebda090eb4076f27deaad4d61b4221f2653
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2016-10-10 11:03:59 +08:00
leo.ding
a76b30c9b1 [vpu_api_legacy]: add default stride frame info for AVC
Change-Id: Iaed040b6b21636f02572ff2ef0ec6f723619b39b
Signed-off-by: leo.ding <leo.ding@rock-chips.com>
2016-10-09 16:56:04 +08:00
leo.ding
6feccc5e68 [h264d]: optimize performance of 4K H.264 video
4K H.264 video had a buffer of stride 4096. This will reduce hardware
performance significantly. So we increase it to be odd times of 256B.
Then hardware performance will restore to normal level.

Change-Id: If6567dc3d13eb7df0375d4fd528e64f56c92f591
Signed-off-by: leo.ding <leo.ding@rock-chips.com>
2016-10-09 14:35:51 +08:00
Lin Kesheng
f04d6604f7 [h264e_rkv]: Implement OSD function
1. add description for OSD cmd in rk_mpi_cmd.h
2. judge if input MppBuffer for OSD is NULL

Change-Id: I6d674c81790d9cf57acdfa23f20c929b56f263e9
Signed-off-by: Lin Kesheng <lks@rock-chips.com>
2016-10-09 10:31:51 +08:00
Lin Kesheng
089660baa8 [hal_h264e_rkv]: support osd configuration
1. add osd control interface
2. remove h264e_hal_rkv_coveragetest_cfg.osd
3. add h264e_hal_test & mpi_enc_test for osd
4. use tool to format code

Change-Id: Iadb3453d8e6976e5f718253f762d144864419e94
Signed-off-by: Lin Kesheng <lks@rock-chips.com>
2016-10-08 11:19:11 +08:00
timkingh.huang
44852d9696 [mpi_dec_test]:add advanced decoding path
(1) when decoding mjpeg, switch to mpi_dec_test_decode_advanced
(2) add advanced decoding interface for mjpeg in vpu_api_legacy.cpp

Change-Id: Ib1848d1686c76826385f76405dda81dd0405cb62
Signed-off-by: timkingh.huang <timkingh.huang@rock-chips.com>
2016-10-08 08:57:41 +08:00