1. Not do reencode in vp8 enc
2. Add api to control whether need to add ivf header
(default: have ivf header)
Signed-off-by: yandong.lin <yandong.lin@rock-chips.com>
Change-Id: I59a3a7193abead6c73e6e1eed593a115add77888
When C++ global destructor is called MppBufferService and MppMetaService
maybe be called before other destructors which may call mpp_buffer_put
and mpp_meta_put. So we mark finished flag after ~MppBufferService and
~MppMetaService is call and so not free corresponding data again.
This case usually happens when user call exit() directly.
Change-Id: I997c49b095e443b061fca230587b6216f710d31c
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
When the bitrate overflow the encoder can drop or encode skip frame.
drop_mode:
MPP_ENC_RC_DROP_FRM_DISABLED
- Do not drop frame when bitrate is too large.
MPP_ENC_RC_DROP_FRM_NORMAL
- Drop frame when bitrate is too large.
MPP_ENC_RC_DROP_FRM_PSKIP
- Encode force pskip frame to keep frame rate when bitrate overflow.
drop_thd:
The instantaneous bitrate overflow threshold to trigger drop frame.
drop_gap:
The minimum gap between two continuous drop frames.
0 - enable continnous drop frame.
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: If17ee5f46ee03ae4ad958c8fad30a4a82f422118
1, Fix error of cime search range configuration;
2, Select best performance between tailing error and noise dancing.
Change-Id: I1e9306abbfe57dc76d0bcb095895ac0ed129d524
Signed-off-by: toby.zhang <toby.zhang@rock-chips.com>
1. Fix stride error on vepu541.
2. Fix YUV color format definition on vepu541.
Change-Id: I785358166f3fd25808debac40d89e28c867bf119
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
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>