In the first tile, the offset of some regs be configured twice,
when multi tiles.
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: I6a4f6851cd635b4ea8a52f056bcf5f097636ece3
Only set different chroma qp offset on High profile.
Change-Id: Iabcbc3d256cdbf521369262f011ac77db998f54f
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
1. Use dequeue/enqueue to implement decoder put_packet interface.
2. Change task check on deinit. Only check the metadata size in task.
If MppTask is destroyed with valid metadata just should warning.
3. Reserve one task at input queue for eos packet.
Change-Id: Ib445b148bb5a10c588104ee1fd96bad6f52f1388
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
When poll the port task and there is task for dequeue just return
positive valid task count value to caller.
Change-Id: I6c078cee69e34ba9b6cc5ffa77c704b8c59683b4
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
The external mpi poll interface only return zero and non-zero value.
Zero return for success and non-zero return for failure.
But later we will use both zero and positive value to indicate success
return. Now for backward compatibility set all positive return to zero.
Change-Id: Id2969a2fb3f5a61137ffc40d108d29090ba1a998
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
1. The pre_i_qp should use scale_qp to update rather then the start_qp
which has substracted by ip_qp_delta.
2. Reduce default ip_qp_delta to 2 for H.264 and 4 for H.265.
Change-Id: Ie43ba15c8bd524bd10aac6053306f72e8759370c
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
When refine rcb size, width and height need to be aligned with ctu size
first.
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: Iaf3d51c6ff049792aeddb2452e1b1a75699eae59
NOTE: on advanced mode the input packet should not be released when the
thread is finished.
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I66656f6f2e484aabd28f74469c29d4bd44a7dcc2
When encoder dequeue the completed task the input frame should be get
from metadata.
Change-Id: I134f89974e3655b8c40e358071a32ae4a0c28bc0
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
NOTE: When MppDev is not output to mpp_dec the codec info update is
disabled.
This patch may cause kernel show the following log on old kernel:
mpp_process_request:1078: unknown mpp ioctl cmd 403
This log has no harm at all and new kernel will disable this log.
Change-Id: I26c8d78e279b5809bb2d1e51baf2c48e7f6e5a33
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Use 32bit fd and 32bit offset to replace 10bit fd and 22bit offset.
Change-Id: Ic89ed79c3b00e9c8530455f61513588acd121999
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
The crash error was introduced by commit:
[mpp_enc]: Refactor encoder thread flow
6aa528227f
This patch fixed this error:
Assertion status->enc_start failed at mpp_enc_thread:1994
Change-Id: I083a46bf3aa932f8999a78415136e1e806892b09
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Tips: User should close fd before changing the client_type. Otherwise
the kernel will leak one info structure.
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
Change-Id: I2f99e4840d1e9a3805306be50e4afa3653f43c0c
fd maybe > 1024 fb|offset may overflow used MPP_DEV_REG_OFFSET
way to avoid this case
Change-Id: I142f8c9915f18da822d3edbf3ff8fe9b081d8918
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
When qp_init is -1 or 0 it is not inited and it is a valid case.
Change-Id: Ic964cdcda129278cbd78ccc855e16c148fb53ab4
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
If there is only one DQT, qtable_selection should be configure to 2 so
that hardware will find the right DQT for chrominance.
Change-Id: I3abc68d6328e0ff0a757c3b249c7a4f5738ff9d5
Signed-off-by: Johnson Ding <johnson.ding@rock-chips.com>
1. Fix ip_qp_delta calc error.
2. Reduce ip_init_ratio from 480 to 160 to reduce first I frame size.
Change-Id: I40125b4e527be0fc9705a7670988b04ac13f7dc1
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Reduce P frame qp range from 2 to 1 to get more stable video quality.
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I58f13e2ad2dc6ff04dd010e990f012a26b88d157
When syntax indicates to show existing frame,
should output current pts of pkt.
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: I7f9e5e7b76ef289407be42a0cc84fb9f62577cdf
1. when fast_mode=1, regs will upadte, use the ctx->reg_buf[i].regs
instead of ctx->regs.
for fix this, it should add regs for paramter in rcb_info_update.
2. per rcb buf size need plus tile_row_num*64 Bytes for align
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
Change-Id: I1bf6c6c6167497b58b3aa95c0252b37b3fe1b075