1. Separate rc_frm_end to rc_frm_check_reenc and rc_frm_end.
2. Add drop mode parameter copy in H.264/H.265 encoder.
3. Separate normal encoding process and reenc/drop flow.
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: Ica29eb6d5e700fb51c4019e39c42f4918857ac71
Add max_i_prop, min_i_prop and init_ip_ration for I frame tuning config.
max_i_prop:
The max percentage of intra frame size in one gop.
min_i_prop:
The min percentage of intra frame size in one gop.
init_ip_ration:
Define the first I frame size is how many times of one P frame size.
Set to 16 mean I frame size is equal to P frame size.
Set to 160 mean I frame size is 10 times of P frame size.
These three parameters are for tuning Intra frame quality.
Change-Id: Iac1e700fe2a51fb3a6ad94753784cd54ee789176
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
if input file name is start with "/dev/video", default open camera
device as input.
Change-Id: I85d639ddb6fa5d99413ea75a0b088c79798dd6c8
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
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>