tips: when frame_num increase by one, must remainder by max_frame_num.
Change-Id: I972e498bf608639dd29293dfed0bd93180d3f2ed
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
Some test depend on mpp_base static library which is unwanted.
Change-Id: Ic3ab0826dee1284c0737d1015648c334a6328f8d
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
tips:
1. In h264 protocol, last frame is used for reference, current frame num
must increase by one, otherwise equel last frame.
2. Very few error stream, not increase by one, then consider it error.
for this case, relax condition, just check cur->frame_num is equal to
last_frame->frame_num or increse by one, not consider whehter last_frame
is reference or not.
Change-Id: I885074b781fa5a53419e77e9e73243b439bf15d4
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
1. support mb rc rate control
2. modify strategy for last gop fps pid residue bit
3. add virtual buffer interface buf no used in bit alloc
4. support reencoder when p frame stream length is biger then need
5. fix sps vui error when video_signal_type_present_flag is true
Change-Id: I5ce4448ffd78f0c9af94a908d7b1b0e7064550e7
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
tips:
a) when parse syntax error, enable parse_err;
b) when dpb ref error, enable ref_err;
c) when use disable err, only disable ref_err, parse_err cannot.
above all, using these flags, when parse error, it also can
go ahead to hal thread, and loop all.
Change-Id: I639248dbf4499a8ed473b9f44f1e1332409c5c22
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
tips: frmame_num will check in driver layer, so hardware need not
check again. Even these systax error, whether consider it error
by driver, not hardware.
Change-Id: Ide62dd5e5eb0ac04e3d52ca7f11750dbff21ee11
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
This handwriting error will cause larger memory usage when decoder is
too fast.
Change-Id: Iea93fcfd265d81c43206499a09d682da2b6231a1
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Set get environment string parameter to const char to avoid modification.
Change-Id: Ib5308407fcac2fa58b194fb8df33380efc1487f9
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Old external library do not clear the vpu_context. We need to reset
the ori_vpu flag when goto mpp path.
Change-Id: I31e5dceae83bb196253d6d19a149a55a4f59d9ee
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Optimize mpp_dec parser thread wait mechanism to reduce cpu overload.
1. Add mpp signal notify flag
2. Add mpp_dec wait status flag
3. Compare the notify flag with wait status flag. When there wait
condition is fulfilled then signal parser thread to process.
This will greatly reduce cpu overload by block wake up with no sense.
Change-Id: I38da718e80d0487e0300e807bc87cdb1aa070471
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Use MppPollType as block control MPP_SET_INPUT_TIMEOUT and
MPP_SET_OUTPUT_TIMEOUT 's parameter.
Deprecate old block/block_timeout control.
Next step is to change MppPollType to RK_S64 for compatible in different
platform.
Change-Id: I02974f0b8eeb23ff43687448d6c3271ea7dd0a2c
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
tips: when split error, and consumed lager than
input length, it will be wrong.
Change-Id: I43ca99f55cb379b93ff08028ed368ce21e6b3611
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
tips:
Consider case that missing reference is not error,
as warnning instead.
Change-Id: Ia702fda3d427355655dd9dd4c4466dc404e68a46
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
The decoder reset function would push all the reminded
buffers into output queue. It is not necessary and
useless.
A reset order means the application want to be back
to the origin. So we must remove the references
from decoder after a resettting.
Change-Id: Ic4ec5410606ffc815cd6c29e84735a3909b27f62
Signed-off-by: Randy Li <randy.li@rock-chips.com>
Fix MppBufferService dump print error on buffer type. The v4l2 type has
changed to external dma-buf type.
Change-Id: I02c9e2741117efc6e9d84d239a26a28dde3471d4
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
The field flag is setup later than slot set_prop operation. It will
cause the failure on deinterlace flag detection.
Change-Id: I7bfcf558a03373f2bd6e3ccda91ce74b54322360
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
tips: when not fast_mode, both wait.dec_all_done and wait.prev_task
are used.
Change-Id: I7397fe1e60cca4a7518d1d4859c4dad554a7b938
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
For jpeg encoder and decoder may have address offset larger than 4M mpp
need to patch address register file. We add a new function set to do
this.
Change-Id: Ifd096e33be170e43481a70c743a3c89c71b358fa
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
When mpp codec thread go into idle status for lack of buffer new buffer
commit or create should wake up the codec thread to check again.
Change-Id: I843f7c790e1f8b8dcd67e209077f2475c8e265c8
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
tips: when input data for encode change solution, the buffer_ready
is on, then not realloc buffer ever. Thus, it must check when hw_cfg
parameters change, and then realloc relative buffer.
Change-Id: I870f04f14d1f05b652a324601fdd7316e29951ed
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
When this frame is infochange and EOS, infochange is
processed first and EOS is processed again.
Change-Id: Ia0c800f0c72e5fb1d8569191e3f41914fe50c277
Signed-off-by: Rimon Xu <rimon.xu@rock-chips.com>
Mpp will keep a dequeued task by default to reduce enqueue/dequeue
operation.
Change-Id: Ic519139b3e0830e17a19d80e7a1623387d8f0ede
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
There is a malloc/free mismatch in H.264 encoder. RecordNode is
allocated by mpp_malloc() but it is free by normal free(). This will
cause memory leak.
Change-Id: Ic84cf42feead306dc10dd544a0fc26a11dc4774a
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
when video quit or eos, mpp allocate a fake frame but not free.
Change-Id: I3079953ed44c578b6ec7e4fac135039eb00140ad
Signed-off-by: ywj <ywj@rock-chips.com>
H265 decoder setup slot when the first sps is read. It will cause a dead
loop on mpp_dec.cpp on checking unused slot count.
The slot setup on parsing stage is better to adapt to different memory
usage. This is better to be improved in future.
Thanks AreaScout and mo123 for reporting this issue at:
44f0ee0353 (commitcomment-29392434)
Change-Id: I3835397f6df6e5e17402b8b43dc3985e46dff832
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
tips: when counts need update, then parser thread wait for hal
thread done, and reset wait flag.
Change-Id: I852c76b672f78e37c3dfdad7761b3b23511ec5ee
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
Add task consume time debug flag to mpp_device register send/wait
function.
For decoder fast mode we need to record not only one start/end time pair
to avoid mismatch caculation.
Change-Id: I449751231d6c6f56ee3cfbb133a9f718466266a5
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>