Commit Graph

2434 Commits

Author SHA1 Message Date
Herman Chen
0b8334fe7e [h264e]: Fix error on vepu2 all I frame case
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
2020-08-31 11:33:05 +08:00
Herman Chen
ff9283dff7 [rk_venc_cmd]: Fix enum defintion error
Change-Id: I88426dc75362ef86c0a21109d295ce8bd983de4d
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-08-31 11:33:05 +08:00
Herman Chen
9434f7bc65 [rc]: Fix reenc on fix qp or force qp case
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>
2020-08-31 11:33:05 +08:00
Ding Wei
a720d9c230 [h264d]: fix issue for judge stream whether is avcc
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
Change-Id: I294bcc9f267fe5ab52dbce8bf4fbbc966f99b3f8
2020-08-31 11:33:05 +08:00
Herman Chen
1edcff8a6b [mpp_enc]: Add debug sei flag
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>
2020-08-20 16:50:49 +08:00
Ding Wei
9c4f863097 [h265d]: fix issue when parser_nal_unit return fail
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
Change-Id: I0dc47d9e9571d3f58342a45918a6eec6ec4372d2
2020-08-20 16:33:03 +08:00
Herman Chen
14e44247d8 [mpp_enc_v2]: Fix roi/osd error on reencode
The reencode flow should be clean before rc_end.

Change-Id: I9567f1533979ef4f1e3feb61f7a530166daf30d0
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-08-20 16:16:33 +08:00
Herman Chen
9e771d441a [jpege]: Disable some log for jpeg encoder
Change-Id: I3f062b68231f43dc6820d34fd6b01796af0c15eb
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-08-20 08:59:47 +08:00
Herman Chen
53f4de365f [misc]: Remove unused include of mpp_buffer_impl.h
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: Ibb43ea044781313d64d781f1498a486cd81b17dd
2020-08-20 08:57:04 +08:00
sayon.chen
16e26697e0 [vepu541_common]: Fix ROI cfg random value
Flush roi buf to default cfg when ROI region is invaid

Change-Id: I7a6b8373db947657c8eff9a0e7458b215a82e17a
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
2020-08-18 11:40:11 +08:00
Herman Chen
fbcaa0e9f6 [mpp_enc_cfg]: Format encoder configure string log
Change-Id: Iab89ac7a81d1a0651816f0ec0cec1a61143a0dd0
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-08-13 15:42:15 +08:00
sayon.chen
f5e2f6e1ee [vepu541_hevc]: Adjust rc parameter set
Change-Id: Ibcb5b57def106125b7ad6cb6fb9f95f9e332e8e5
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
2020-08-13 15:17:12 +08:00
sayon.chen
49548c171e [rc_v2]: Adjust reenc policy and I frame bit alloc
1. Modify the thresh value for I and P frame
2. I frame reencode qp calc by (log(b_t) - madi * b - c) / a
3. First_frm_flg will clear after rc_hal_end
4. Cbr case max i_scale for bit alloc clip to 800

Change-Id: I65222f1747a8ab1e0c5c3ea45bfd607d33890cdc
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
2020-08-13 15:15:23 +08:00
sayon.chen
2b473a88d2 [rc_v2]: Reorganize cbr water level ratio
1.inlarge water level ratio range
2.modify debug log

Change-Id: I069be1d10f21280d54359ff5b3b79c6587c86eba
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
2020-08-13 15:08:50 +08:00
sayon.chen
d5f8e9a441 [mpp_enc_v2]: Fix reencoder flow issue
Change-Id: If8543d4501c726fe504d04eaeb7103fd1583cda4
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
2020-08-13 15:03:09 +08:00
Johnson Ding
9c7da3919d [jpegd]: clear regs before generated
Application may call jpegd decoder without doing re-initial for every
single JPEG image. In this case, if registers are not fully cleaned,
there may be something wrong with decoder.

Change-Id: Ia8c2b01b0fb31047b749a88bd67a7affc593150b
Signed-off-by: Johnson Ding <johnson.ding@rock-chips.com>
2020-08-13 11:47:26 +08:00
Herman Chen
455e1ceb40 [legacy]: Add VPU_API_SET_PARSER_SPLIT_MODE ctrl
Add VPU_API_SET_PARSER_SPLIT_MODE control for MPP_DEC_SET_PARSER_SPLIT_MODE

Change-Id: I7d6c2738f8d39ac4b179ae5d0c8534b580de80b7
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-08-11 11:52:41 +08:00
Ding Wei
84e9f44108 [h264d]: remove nalu_type_prefix in judge new frame
tip: nalu_type may insert in slices of one frame. thus, it cannot
consider it the new frame start prefix.

Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
Change-Id: Iee6022f69d10d22a6ddfbeb6722b9fc0092d67a7
2020-08-11 10:30:00 +08:00
Herman Chen
177a97a14f [jpegd]: Fix qtable print
Change-Id: I579322382a431d3a9b46d88faa0a2138cd5ef4d0
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-08-10 17:06:18 +08:00
Herman Chen
c2b04493d2 [hal_h264e_vepu1]: Fix prefix syntax read error
Change-Id: I86855cacb12d958d1a5872578f16c8d1a69acdfc
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-08-07 18:12:11 +08:00
Herman Chen
2549bbf657 [legacy]: Fix vpuapi color format print
1. Fix vpuapi color format print.
2. Fix decoder usage on rk3399. Default on rk3399 should use rkvdec to
decode H.264 stream.

Change-Id: I65fb41e9ca5c6448e96e20c7ead139d8f38f7229
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-08-07 16:16:53 +08:00
Herman Chen
e48ece08be [legacy]: Align input ver_stride to 8 not 16
1. The input ver_stride can not be set by EncParameter. It is better to
align it to 8 not 16 to avoid green lines at bottom when the input frame
buffer is not aligned to 16.
2. But the allocated buffer size should be aligned to 16 to avoid
hardware error because hardware requires 16 aligned buffer to access.

Change-Id: I402ac167f29e22c9c363135e95bb4ad431d3c3ef
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-08-06 14:54:09 +08:00
Johnson Ding
408c54cd82 [h264e]: remove unused definition
Change-Id: Ia1b83318e87c504e3a3632dfab08f0a832711498
Signed-off-by: Johnson Ding <johnson.ding@rock-chips.com>
2020-08-05 18:35:17 +08:00
Herman Chen
21c21209c8 [h264e]: Add qp_delta_ip
The qp_delta_ip for H.264 is 3.

Change-Id: I33c052489011e93e8b496a284a84db1450ef5981
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-08-05 18:13:59 +08:00
sayon.chen
07170b1903 [mpi_enc_test]: Update cmd param used utils set
Change-Id: I87e33de9f592974e52a19259d1a7a0d3c8542b8f
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
2020-08-05 18:13:59 +08:00
sayon.chen
71f9142c50 [mpp_enc_utils]: Add more cmd params set
1. -b bps_target:bps_min:bps_max:rc_mode
2. -g gop_mode:gop_len:vi_len
3. -x read ini cfg

Change-Id: I937d2200da9427d7079eeb437e379db11c7e29d7
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
2020-08-05 18:13:59 +08:00
Herman Chen
f151697412 [hal_h264e_vepu]: Warn the stride issue only once
Change-Id: Ib989b0e85ba3d44f7e9ed075f538882cbdc00087
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-08-05 16:19:15 +08:00
Johnson Ding
cba637c3f1 [jpege/h264e]: fix RGB encode config
Change-Id: Iec9d928ad6fb1a31cbf6f224b264ebb6797294a3
Signed-off-by: Johnson Ding <johnson.ding@rock-chips.com>
2020-08-05 10:52:05 +08:00
sayon.chen
4a61fda3cb [vepu_api_v2]: Fix rotation issue
1.when input set rotation 0->90->180, due to 0->90 w&h will sawp
if only set 90->180 w&h no change will cause error,so when
rotatio must recheck w&h
2.when input is fbc no support rotation and mirror

Change-Id: I4e77b10e25fd66caccaa131be8a9063570f1e3df
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
2020-07-31 16:15:45 +08:00
Herman Chen
f16b87ae0f [legacy]: Disable mlvec frame_qp by default
Change-Id: I06e45693c37303b8dfb31471e56f8679ed79bce4
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-07-31 14:35:47 +08:00
Herman Chen
83eadfb637 [rc]: Fix FIXQP mode quality setup
Change-Id: If0f7763af36cbeecc87f48c97beddab3abad0a41
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-07-30 14:44:28 +08:00
Herman Chen
33ea28d42e [legacy]: Fix legacy bps config typo
Change-Id: Iffe761aed418179171ef024f5ba8b207ba46d884
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-07-30 14:13:54 +08:00
sayon.chen
95e7a230d2 [h265d_hal]: Fix h265d cycle reg pos issue
Change-Id: I21b26aa182dfd42e912b08ef6f742513699cef29
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
2020-07-29 17:38:06 +08:00
Herman Chen
41dd3ea054 [test]: Format mpi_dec_test output log
1. Add temporal layer id print and error/discard value print.
2. Add mpp instance print to separate different instances.

Change-Id: I4d85e4ec80e957316a6aab82e3661e27389bebc8
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-07-29 16:21:45 +08:00
Herman Chen
1b926a4f0c [h264d]: Add temporal layer id report
When there is prefix nal report temporal layer id by metadata in output
frame.

Change-Id: I0b420a3c39f1955f2c9ae39d16ecf7c061fe4766
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-07-29 16:20:13 +08:00
Herman Chen
c31fd4dc27 [enc_utils]: Add tsvc demo (control by gop_mode)
Change-Id: I034d631b3d6c473b82d12e3434860c7f8e9f9318
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-07-29 14:11:22 +08:00
Herman Chen
69c42f78d3 [test]: Format mpi_enc_test output log
Change-Id: Idd62077731b65570ab535954280e148f637719fa
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-07-29 11:41:53 +08:00
Herman Chen
708c6668b5 [h264e]: Add more info report by packet metadata
Add temporal layer id and long-term reference index of current frame by
metadata in output packet.

Change-Id: I095437f1aacd13fa54c8cb1e3a5272c080db2ec1
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-07-29 11:40:05 +08:00
Herman Chen
e638362114 [mpp_enc]: Add max/min intra qp for H.264
NOTE: may change the behavior of get cfg

Change-Id: I1b3cd4cbbe7dc0f03e4cc38f1e831e429d4911c2
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-07-29 10:26:30 +08:00
Herman Chen
5b47293917 [mpp_task]: Improve mpp_task queue work flow log
Change-Id: Ifa39726f376ac0254a8a88189b1cb918fb33a2f9
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-07-29 09:22:04 +08:00
Herman Chen
3f2a548916 [mpp_enc_refs]: Add refs configure force path
1. Add keep_cpb flag to keep the cpb status on refs cfg changed.
2. Add hdr_need_update check flag for resend header.
3. Add force flag implement in refs process.
4. Do not resend header on max_tid change only.
5. When gop is update the cpb should restart.

Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I2eb3191ce6f45ccea081fa861e4927abae96ff2b
2020-07-29 08:33:39 +08:00
Herman Chen
df0a7f0203 [h264e]: Add poc type / poc_lsb / frm_num setup
1. Add poc type / poc_lsb / frm_num default device value.
2. Add force update path.
3. Sps will use codec cfg directly.

Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I5f23b74f0453213c89c7238a36570484b91b48ce
2020-07-28 11:29:49 +08:00
yandong.lin
ad8be25073 [h265d]: cut slice header extension data
1. when slice_header_extension_present_flag is 1 in pps segment
2. we should cut the slice header externsion data in slice header segment

Signed-off-by: yandong.lin <yandong.lin@rock-chips.com>
Change-Id: I074e64f6e6c62e4bcc8a12f95c49aa6cf77505c1
2020-07-28 10:56:20 +08:00
Herman Chen
f7e400f8b7 [mpp_enc_v2]: Check meta before getting user data
Use has_meta to check input frame has meta data or not. Otherwise each
frame will have a metadata.

Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I166346b668fe5ec46032d5c27a7a368fe2fea3b1
2020-07-27 18:07:01 +08:00
sayon.chen
03c91713cf [h265e_vepu541]: update hevc l2 reg atf_thd
Change-Id: I1403843694de37702a2e391c953dac4b03ed18bf
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
2020-07-27 17:37:57 +08:00
yandong.lin
0f91ba604c [jpege:] Add q_factor and qtable
Add q_factor and qtalbe interface

Signed-off-by: yandong.lin <yandong.lin@rock-chips.com>
Change-Id: I6b59d0b2e740e4b2815e7c83ad9a3641fe700e2f
2020-07-27 17:37:38 +08:00
Herman Chen
576650aa05 [misc]: Remove some encoder runtime print
1. Remove rc api impl print.
2. Remove mpp_enc_cfg create print.
3. Change mpp_enc_cfg init and show log on node count.
3. Add header resend log.

Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I273db39b844d8c3fcd6a0ac9763a4df9b65b56d0
2020-07-27 16:37:31 +08:00
Herman Chen
483d77ccc8 [mpp_enc_refs]: Change cpb info print function
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: Ic57f96a1ead552d54f4eb9da4bec4c0eae619fe9
2020-07-27 13:58:48 +08:00
Herman Chen
8fedaf96a4 [rc_model_v2]: Add force frame qp path
Change-Id: Ic7bf13188357e20d4851fc045cc77cf8611c83b7
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-07-27 10:56:03 +08:00
Herman Chen
94afabae3d [h264e_api_v2]: Add more configure update check
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I5bba62769882980f91501a58c954b0f9f5321c91
2020-07-24 17:19:03 +08:00