ratio_calc used Register function in mode init according rc_mode
Change-Id: I0317ecc004a2c882e005cf791207c6a5a7e50598
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
1. Move sps / pps / slice / dpb definition to there own header.
2. Prepare to add new h264e syntax struct for hal.
Change-Id: I95e884afcf08fa51bdeb6f1e6571c264d9a609ec
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Fix stride definition to compatible to both pixel stride and byte
stride.
In MPI the stride is defined to byte stride. But vepu requires 8 pixel
aligned pixel stride.
So we add more code to adapt to both case and check 8 pixel alignment.
From opengles definition:
Stride means bytes in a row of pixels including padding. So an image
could be 510 pixels in width and rounded up to 512 pixels. The stride
would be 512 * bit depth of the image's format. You could also have
stride in pixels in which case the stride would be 512 pixels
Pitch is a little more vague, but typically could be interchangeable
with stride. Considering your reference is specifying in bytes, it's
likely safe to assume they're not measuring in pixels. So the reference
likely means the number of bytes in a row + padding, the only
alternative would be number of bytes without padding e.g. image width *
bit depth.
Change-Id: I20acf71e2a6bea2eb08b41fe7df531154ebef897
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
When the frame is not encoded do not set ready flag in header status.
Change-Id: I21980d48a5abedc562de9875e24466fea5315121
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Enlarge roi buffer size for 32 bytes to avoid hardware iommu page fault.
Change-Id: Ibdf6bcda2b0b6ea6e1cb2aef54dda8516b2dfb72
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
When encoder reference config is changed the stream header should be
updated while keep_cpb is not set.
Change-Id: I20432b80fbcd702b5f04391f8c9ff18627d72f53
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
1. Use rc_model_v2 as a common rate control method.
2. Separate rate control algorithm on different video coding.
Change-Id: Iebb9ba8db14cd19ca8a4e091a6c879e29ec5693e
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
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>