The encoder only require the stride is align with 8 bytes.
Change-Id: I3206b06af5427216c9e7a121424afda5297f7b62
Signed-off-by: Randy Li <randy.li@rock-chips.com>
Fix issue:
https://github.com/rockchip-linux/mpp/issues/1
It makes no sense and generates an uncomfortable warning message:
mpp_buf_slot: mpp_slots_set_prop found invalid input slots
Change-Id: I8a26cd58aa10d03add371c88bb81e19f2a83cd70
Signed-off-by: Randy Li <randy.li@rock-chips.com>
The VEPU1 is an old IP used on rk3066 / rk3188 / rk3288 / rk3368 / rk312x.
Change-Id: I9fdbaedbc8311129cf4fdac4cae614ad624d5f93
Signed-off-by: Randy Li <randy.li@rock-chips.com>
All the H.264 encoder could use the same function to generate
those header info likes: SPS, PPS, and nalu header.
Some other help functions used for encoder also be moved to
here.
Change-Id: I45b9f3ef7046fc95e649796ff54852c336055bf6
Signed-off-by: Randy Li <randy.li@rock-chips.com>
There is a video encoder IP which is departure, having a similar
name to the currently device. Although there is not relation
between they but I have to keep them in the same directory.
To avoid conflict and confuse, I have to rename those files.
Change-Id: Ib924fa8e9f20259d704e685595cd06b3d6b7f958
Signed-off-by: Randy Li <randy.li@rock-chips.com>
The new platform detection could cover more target devices than before.
Change-Id: Icf97320a7e381c444fa90803a0c99fd28fda4ff1
Signed-off-by: Randy Li <randy.li@rock-chips.com>
1. Add video codec information and kernel driver device detection code for all
supported chips.
2. Add video codec type and device name detection test
Change-Id: I275c0e616acd80c9a4ad2fee00588479e47a92db
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
RKVENC is a new generation encoder found on the rockchip platform.
Change-Id: I1fb4a052aebe0a1f7f5083736141eda2cc83ac98
Signed-off-by: Randy Li <randy.li@rock-chips.com>
Not only H.264 decoder would have different IP supporting this
format. It is better to be used as a common type of hal part.
Change-Id: Ifbc1d0de189cc2799d39e26a16e78a71a5f6aa32
Signed-off-by: Randy Li <randy.li@rock-chips.com>
1.colorType bitmask add dynamic range and color space
2.need to cooperate with mediacodec modifications
3.need to cooperate with omx_il modifications
Change-Id: Ib8c23f6b0488cf799e69ced2bdc9b54d309a1630
Signed-off-by: rimon.xu <rimon.xu@rock-chips.com>
Using Gaussian elimination to calculate regression
matrix for less complexible.
And previous calculation method had a bug, will get
wrong model parameters.
Also, RC degrade the quadratic model to linear model
when get invalidate quadratic model parameters due to
statistic data vary sharply during video scenarial
change. And model caculation will be skip when statistic
data concentration.
Change-Id: I54763e4675b412abfae4e2e81dfa887d13bdc865
Signed-off-by: alpha lin <alpha.lin@rock-chips.com>
1. please run hooks/install_hooks.sh manually for the first time
2. hooks/pre-commit.hook is called before commit automatically
3. format code
Change-Id: I4565b206da10abb59506ef73f62392c9e9690cd4
Signed-off-by: Lin Kesheng <lks@rock-chips.com>
For profile baseline, entropy_mode should be CALVC.
Change-Id: If655dc718063bc2b5485c997fefd2b30505d901f
Signed-off-by: Lin Kesheng <lks@rock-chips.com>
If video stream change the range flag but keep dimenstion parameter the
same mpp should not generate a info change frame to external user.
But this should be handled in better way.
Change-Id: I9f11fb5e7265c4b09951c1eb40580b95e0f753a0
Signed-off-by: leo.ding <leo.ding@rock-chips.com>
Chroma offset is not set correctly because of wrong hor_stride
and ver_stride.
Change-Id: I930fd66054b40c8e36063221cb25d390b735687a
Signed-off-by: timkingh.huang <timkingh.huang@rock-chips.com>
1. Apply quadratic model for new R-Q model, R = a + b / Q + c / (Q * Q)
2. Take sse in R-Q model calculation.
3. using hardware feedback QpSum to get a float qp value
for more precise Q Step take part in R-Q model
calculation.
4. scalable windows length according to complexity change.
5. extend the regression weight table to length 15.
Change-Id: I447087758b6599e65a98dcfc8f6382f950032899
Signed-off-by: alpha lin <alpha.lin@rock-chips.com>
reset acc_inter/intra_bits_in_fps value when insert a i-frame
Change-Id: Ie7ab9f7505957f6be7439da8c76ff718d90d8bb6
Signed-off-by: Jung Zhao <jung.zhao@rock-chips.com>
1. set first target size to bps * 2 / 3
2. re-encoder first frame, first time turn on mbrc and second
time turn off mbrc and use first time real bits as target
bits and average qp as init qp
3. modify intrapercent calculating
4. only use last gop extra bits for avoiding bitrate fluctuation
Change-Id: If7f79bc423602a8948edc455dd45bee727240d10
Signed-off-by: Jung Zhao <jung.zhao@rock-chips.com>
1. add H264eRcCtx to control mb rc
2. define H264eRkvMbRcCfg to list cfgs on each level
3. merge from trunk
4. implement checpoint error_bits and delta_qp according the
relativeness between qp and bits
5. correct qp_adjust
6. merge from trunk
7. correct traget_bit_error
8. VBR: adjust qp_min/qp_max according to quality configuration
Change-Id: I25eefc992c6e68842a675fd04286d0564bd5d2c2
Signed-off-by: Lin Kesheng <lks@rock-chips.com>
Call function mpp_linreg_deinit to release the buffer malloced
by mpp_linreg_init.
Change-Id: I3ac51478da56cb03b36154a055d0617d783d2936
Signed-off-by: Lin Kesheng <lks@rock-chips.com>
1. remove assertion hor_stride==ALIGN(width, 16)
For rkv, hor_stride can be equal to width, even width is not
16 aligned. Ver_stride is in the same way.
2. modify qp range assertion
For rkv, qp should be equal or greater than 1.
Change-Id: I102bf92f2af77e4f591c63fed31fcfe0ffe5642f
Signed-off-by: Lin Kesheng <lks@rock-chips.com>
1. write prep/codec/rc cfg to SEI
2. mpi_enc_test add SEI writting test
3. write SEI one sequence once defaultly
Change-Id: I7dd00a20afe101d7ddf17c875f0704d91a8fea2b
Signed-off-by: Lin Kesheng <lks@rock-chips.com>
If input stream or hardware interrupt is error, errinfo
of output frame will be set to 1.
Change-Id: I50cf9d7d69b5530043f50a56b13ed4b2417ac40d
Signed-off-by: timkingh.huang <timkingh.huang@rock-chips.com>
1. mpeg2 maybe not contain GOP header, so cannot judge err
stream by Gop header flag.
2. extra data may contain seq header, but not decode start
of this seq header, so we take the way of discard id.
Change-Id: I6f9516716b0553e34e9d89dfbdb343143d00366a
Signed-off-by: fangxingwen <fxw@rock-chips.com>
set h264e_hal_debug=0x8000 in environment to enable rc print
set h264e_hal_debug=0x20000 to store rc print in /tmp/rc_log.txt
Change-Id: I7f53d6a2e0f4a1b0085a074bf9bbc624aa8b07b2
Signed-off-by: Jung Zhao <jung.zhao@rock-chips.com>
rc_test doesn't provide value to rc_cfg->fps_out_num, so fps is 0
inside mpp.
Change-Id: Ic92e86ecc45814087efb4b796a997ae51cb33799
Signed-off-by: Jung Zhao <jung.zhao@rock-chips.com>
For small resolution sequence if transform_8x8_mode is enabled
quality reduction may occur in ouput stream. So 8x8 transform is
disbaled for sequence which resolution is less than or equal to
1920x1080.
Change-Id: I54630347abda9f44cfdba0d3cbf256ba50fb6cca
Signed-off-by: Lin Kesheng <lks@rock-chips.com>
For rkv and vpu, the only format supported is YUV420,
sequence in other formats will be converted to YUV420
by hardware.
Change-Id: I9de1141df2f290af9df824ec0090b7fa050a455d
Signed-off-by: Lin Kesheng <lks@rock-chips.com>
acc_total_count will be set to 0 when a new gop start.
use acc_intra_count+acc_inter_count instead of it.
Change-Id: I14b1c75954f5994eb150d1f0ff7d822a74ed2359
Signed-off-by: Jung Zhao <jung.zhao@rock-chips.com>
Pps.pic_init_qp is different from codec_cfg.qp_init,
and is not included in user configuration, thus we
fix pps.pic_init_qp to 26.
Change-Id: I408528891f91cd394aa55fe3b8b0e51bdb0e051f
Signed-off-by: Lin Kesheng <lks@rock-chips.com>
when configuring registers, qtable need to reorder in
particular order.
Change-Id: If4f9afa4ee3135bb4b0f24f0c0c0cc5d16503491
Signed-off-by: timkingh.huang <timkingh.huang@rock-chips.com>