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>
tips: when buffer is external mode, getoutframe buffer not get
buffer vir_add, thus it avoids buffer map, and then reduces
first frame display time.
Change-Id: Ie50e162685a058e474e8918bf07a265696be064a
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
When decoder frame buffer group does not exist do not call usage
function.
Change-Id: I677d9bf1cd116886b94959c90161a4500795eacc
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change external mode mpp_buffer_group test from normal type to ion type
which is more closer to real decoder pure external mode.
Change-Id: I601f18340d760a0e630149209bd4d63ec3bbf995
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
When paser thread generate a info change task then user call reset
operation right before hal thread receive this info change task. This
task will be released and hal thread will get a invalid buf_slot.
The patch bring in the async reset / sync reset done mechanism:
User can call reset at anytime. So it is a async reset.
Then parser / hal / vproc thread need to finish all reset operation
before process next loop.
This means decoder thread need to sync at the reset done point.
It will keep reset operation save and clear.
Change-Id: Ia8482fd09d84e5fa6a096f2740ed1319d4cf79a5
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Add extra log to mpp_dec and vpu_mem_legacy
Change-Id: I27599077093a34a70aa7c590034f100fdc32416b
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
1. Unify the hal thread output process to mpp_dec_put_frame
2. Add vproc path for field source.
3. Reserve one more buffer when deinterlace is enabled.
4. Default enable for normal mpp path but disable on vpuapi path for the
reason that rk_ffplayer has done deinterlace process internally.
Change-Id: I02e7cece844fde01c2d249dafe6f7ce6a325593f
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
tips: when task is not valid, and width and height is wrong,
then infochange will be tripper, which is unnecessary.
Change-Id: I45c4ee75a8d1e2928995be0562f032fabe8c95cb
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
When doing ion / drm detection use access is a better idea. For open
will introduce some unnecessary kernel operation. And access is more
flexible to use library on different stage of boot up.
Change-Id: Ib6e98d26cb59dd1c8b0899cfa43911fc25097bd4
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
tips: split mode need got eos, than the last frame to decode,
if flush directly, it must lost the last frame.
Change-Id: I9e0a64efdf55ca586bade1852688e7c3ca7b5310
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
When mpp_dec_vproc reset buffer slot index should be dequeue and release
its MppFrame property to insure MppBuffer is not leaked.
Change-Id: I2dc35505306135907fe812b18ae3b8178adb942b
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
1. Add buffer group clear when buffer group exists.
2. Add buf_size and limit to buffer group
3. Add max memory usage calc to mpi_dec_test
4. Set mpi_dec_multi_test default thread count to 1
Change-Id: Ia165c9a213b0aed9bc634121dd70776fd6c4801f
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
One thread May have multiple lock/wait/signal source:
Input : signal source from input.
Output : signal source from output.
Control: signal source from async control operation.
Then the main working loop may stop on these lock/wait/signal points.
Change-Id: Ia6270b865cfb7087567fc21f07feb9248b929d7a
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Add mpp_buffer_group_usage function to return runtime buffer group
memory usage.
Change-Id: Ibb2893087e84b6d40de1b44accf45439b7ba925e
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
tips:
1. when send frame is empty should not to buffer.
2. when get packet is empty should not copy data.
Change-Id: I5f43ab89a57c264f1768ad8ba6187f5027fc40d0
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
1. Remove unused post_proc flag
2. Change code order to output buf_size through MppFrame in bufslot.
Change-Id: I4901f487399f211f31e137b5567315cd3b08130f
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Add max frame number parameter with "-n" option to mpi_dec_test.
Change-Id: I21c00baee4d94cab69a95060ac5a694cd9f28945
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
mpp_slots_get_unused_count should use buffer count rather than buf_size
as the minuend.
Change-Id: I975e186c826edfbadf6115cdf375826d03a5adc9
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>