Stream modified and assigned to MppPacket won't be retrieve by hardware,
since hardware get stream by fd and this operation doesn't overwrite it.
Another way to slove this problem is doing memcpy at mpp_dec right after
calling mpp_parser_prepare, just like the 6th step at try_proc_dec_task.
Change-Id: Icea9516ab1ea92239613f7daa001018e581a8a2c
Signed-off-by: Johnson Ding <johnson.ding@rock-chips.com>
1. Add rk_venc_rc.h for rate control definitions.
2. Add drop parameter to set_rc_cfg.
Change-Id: Iab27a1505ba187f512815f7ab00cd0ea7f863cb8
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
1. When repeat in st_cfg is negative set it to zero.
2. Do not insert non-reference frame when smart oop vi_len less than 2.
Change-Id: Icdf2be21fbbe0a919f7c3006d9c1dde5dfc5ffcb
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
when select avbr must set target_bps max_bps min_bps,in still scene
will used min_bps for enc, in the moving scene will max_bps for enc.
and final avg bit will get close to target_bps
Change-Id: I84b2878c7e76b18a593ca2a0d99c0c8f26a2d557
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
When creating hal buffer for vepu541 check both buffer size and buffer
count.
Change-Id: Ice1afa70f5458b74d1d2f98fc772c6e0a3e4cbf7
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Add frame drop parameters for frame drop behavior on bitrate overflow.
Change-Id: Id90fbd0c63b1a0909e426a2c9f09c8b371bec0b7
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Enlarge max ltr_frames support from 3 to 16.
Change-Id: I2d87a956019cbb4ce807aedc7be2d0c4987fa4d2
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
when stream has multi slice, it will occur error to
cut the slice header externsion data in slice header segment.
Signed-off-by: yandong.lin <yandong.lin@rock-chips.com>
Change-Id: Iaab8a9ea145aa7539d7401be22493619ce98df95
Obsolete MPP_ENC_GET_EXTRA_INFO in vpu_api_legacy and mpi_enc_test.
Change-Id: I3209a1af112ca073e3f61bbff60d8c2844c00ed1
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
NOTE: It is important to clear output packet length to zero.
Or set packet pos and length to required valid value.
Change-Id: I8ddea1ee3c198bbd17381618b82ec5efab1d366e
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Usage: use MppMeta in MppFrame to carry KEY_OUTPUT_PACKET packet.
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I82f63dc3e7acd0fa47c54062966fbd52156d49c4
1. clr api set rc_mode as cbr,default is vbr,
2. fix vbr case target_bps as change_bps
Change-Id: I7b4ba62cf5201da5674b597098ba301bba41be4b
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
1. Test block mode
2. Test non-block mode
3. Test timeout mode with not timeout write
4. Test timeout mode with timeout write
Change-Id: Ibf8253f0f43be1aba1a81a2e527198b6a08eab83
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Fix this warning when building with newer GCC:
multiple definition of `inter_level_tbl'
Change-Id: Ic2c8564976665a9d42dcafeced9d9c2d47b0193c
Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
When in mlvec mode the encoder should not return sps/pps on init stage.
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I9f85bae563be97f4bfe4a74e48ebda0f768a29e0
vepu h264 input stride must be aligned to 8 for vepu limitation.
If it is not 8 aligned some buffer conversion preprocess should be done
before the buffer is sent encoder.
1. The hor_stride in vepu hardware is in pixel unit not byte unit.
2. The hor_stride in vepu must be 8 pixels aligned.
3. The YUV420P should be 16 pixels aligned for chroma.
4. Fix log print when hor_stride != width 8align
Change-Id: If30136a4673399c3be40a41a055e832db4c321d5
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
Config process should not use fixed local rc_mode value to setup.
Change-Id: I8cdfb049e676d34e50a0f11fd174d4eba5bfc24b
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
The vepu should set minus 4 of log2 max frame_num and lsb to 12.
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: Ib57aea1e2adb038b1f5a4e8ee6437ae184b235ba
On FIXQP mode or force qp is set the reenc should not be operated.
Change-Id: Ia7cf8c3db900c750b417927898d1d66eb7d00e97
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
MPP_ENC_SEI_MODE_DISABLE : no debug sei at all.
MPP_ENC_SEI_MODE_ONE_SEQ : Add debug sei on each IDR frame.
MPP_ENC_SEI_MODE_ONE_FRAME : Add debug sei on each frame.
Change-Id: I6c40e447de7f97ce1e433c3ac5adbf2c6be3de40
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
The reencode flow should be clean before rc_end.
Change-Id: I9567f1533979ef4f1e3feb61f7a530166daf30d0
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>