1. long-term reference flag in IDR frame should be clear at next frame.
Otherwise multi-slice operation will be error.
2. The max long-term reference index is reset to zero at IDR. So the new
sequence must redefine its own value again.
3. The end bits of prefix nal should be flushed.
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: Ia9ba01719861401c2ca95ded3ccfc537c3b10083
1. Fix loop length error on copy.
2. Change prefix nal format do not write more bit on zero nal_ref_idc.
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I8aae36926dcd8dc73701c735396ae418db4f032f
1. Remove slice mode/arg in H.264 codec cfg.
2. Add max long-term reference number / max temporal layer id / prefix
mode / base layer priority id.
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: If34166e4658edba65f4c6c095412a6fadd941320
1. Add KEY_ENC_MARK_LTR for marking current frame to be long-term
referece frame.
2. Add KEY_ENC_USE_LTR for assigning a long-term reference frame as
current frame's reference frame.
3. Add KEY_ENC_FRAME_QP for assigning a fix QP for current frame.
4. Add KEY_ENC_BASE_LAYER_PID for assining a priority id for base layer
in tsvc mode.
All these four features are defined in MLVEC test.
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: Ib041d9c2f203d7e582a3402bd61dd6a9eb18015a
1. Fix nal_ref_idc update error for using slice->is_idr.
2. Fix slice write error on poc_type is 2.
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: Ib315818c2024fdf028a4863977154e9d7beeb8f5
When there is enough reference frame slot in cpb store extra st frame to
cpb to avoid mismatch in dpb check.
This will happen right after IDR. There is extra empty cpb slot for st
frame and no need to remove them by sliding window.
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I261f18d70f241e48a18012807f4dece68e73cbdf
When these is incomplete bit in last byte the writer needs to flush all
the valid bit to memory.
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I07e24d1504d637beadfc7308b867c03fe2c7735e
If altref frames is not for display, they will be remaining in buffers.
Eventually, there will be no more unused buffer to be used for output.
Refer to this issue https://redmine.rockchip.com.cn/issues/226256.
Change-Id: I915582da99e71c95745bce15690562d51d640dc5
Signed-off-by: Johnson Ding <johnson.ding@rock-chips.com>
1. When insert long-term reference frame the tid refs should also be
updated.
2. When insert short-term reference frame the queue update direction has
error. It is fixed now.
3. Long-term reference frame delay_cnt update method is fixed.
4. Dump valid flag when dump cpb frame status.
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I8db6e71ee5366fefdd1d91018c500d3edc05c6aa
The check on short-term config should use short-term config count rather
than long-term config count.
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I0006fe9a30035f636411702290cd9dff4032296d
When encounting IPIPPPP... stream, the first IP will be kept in dpb
unflushed. This will lead to dpb used size keep growing and memory leak.
Change-Id: I7973c8b18d13a63d10b0d4f034aefb58a3805ab2
Signed-off-by: Johnson Ding <johnson.ding@rock-chips.com>
When qp limit in codec_cfg is changed the rc_cfg should be also updated.
Change-Id: Ia5da305c015e6bc11836b6c358ddee6be51e819a
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Searching for star code prefix should not exceed buffer length.
Otherwise 00 outside source buffer will be take as picture start code
when there is 00 00 01 at the end of source buffer.
Change-Id: I04f62e2f638bd721815004b86cf3d75d256d03de
Signed-off-by: Johnson Ding <johnson.ding@rock-chips.com>
1. Fix bit calc when gop set 0 or 1
2. When gop set 0, will set 300 for bit calc
Change-Id: I8c6f8dfd634a5c5cee760de6226f156e897d91b0
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
Change interface of adding stream prefix which is adding sei packet in
H.264/H.265.
The sei will be added with certain type:
1. version info
2. rate control info (rc api name + rc cfg)
3. user data
Change-Id: Ic17efb6b9f75db774b7ad7e7cc78818170260def
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
When only bps is updated the whole rc_usr_cfg should be updated.
Change-Id: I02ed8fa247b3b56ac286254c55251b594ff2fab2
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
This function is for debugging usage.
Encoder will write mpp version info before each IDR frame.
Change-Id: I03e2f2a7d751e9ecc3122314c2b3de8aa31b910d
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
The codec will not handle IDR request directly. The force idr / force
LTR will be config to codec by cpb info.
Change-Id: I9aba12ea3080256451115b9fd77433b67e318cf3
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>