1. put_packet support block mode now.
2. The EosTask should be insure to be block mode.
3. NOTE: When set to block mode use put_packet and get_frame in single
thread may cause deadlock for the info change or eos may be blocked and
the put_packet can not return.
Change-Id: I8cf73f833e5d29c3b330c4b56fbd6be8d7432e60
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Replace service lock with buffer lock, group lock and smaller service
lock.
Change-Id: Ic8ff9fae714b0362f43df23008efce49fe16b9ce
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
If there is an 0xff between two section, parser will stop searching
marker. But if we skip this byte and contine parsing, it may be
successfully decoded.
Ref to https://redmine.rock-chips.com/issues/295017
Change-Id: Ia73bf66b05ea109ac19a7a5a37241a6381b468d3
Signed-off-by: Johnson Ding <johnson.ding@rock-chips.com>
Store allocator to MppBuffer to remove dependency from buffer to group.
Change-Id: I7ae136d12bb30cb989b6352989df3b0b3477ad98
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
When there are a lot of buffer groups created the search speed will be
slow. We should use hashtable to speed up.
Change-Id: I9ceeaa5a72eedf81597eeb83b34d417c74ceae04
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
After seek, set err frame whose poc is smaller than the poc of the
first i frame.
But the poc record of the first i frame is not update,
resulting in continunous frame loss.
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: I8d56f6aeca570d66912a6dcdd5690a809fa070e8
Note:
1. In kernel 4.4 and previous version, the array may cross the boundary
and cover an unknown memory address
2. The array is out of bounds caused by the following submission:
commit 5be47f31f0
Author: Yandong Lin <yandong.lin@rock-chips.com>
Date: Wed Feb 24 19:44:32 2021 +0800
[hal_vdpu]: Support fd and offset to be set separately
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: Ie3fc4324dde497732424cf3023ce81997401fd96
Add RK3566/RK3568/RV1109/RV1126 support in readme.
Change-Id: I9c7c191f2a1c0e5302af7df6edfbefc6457d397b
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
The 0 and positive return is success. The negative return is failure.
Change-Id: I9c4586286ce7368a52b7d9dd776fd40c6af4a1da
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
For Linux platform running Gstreamer, enable need_split may conflict
with bitstream parser within Gstreamer.
Change-Id: I8616e173cbae43aaf8fc18aec4dbd680ad38bdf8
Signed-off-by: Johnson Ding <johnson.ding@rock-chips.com>
FF00 before EOI should be kept. The test source file is at
"server=172.16.4.246,share=mediaframework/jpeg_ff00_before_eoi/CIF_98.jpg"
Change-Id: Ic5e7781a329f8effb5b674a1816350be732fffbb
Signed-off-by: Johnson Ding <johnson.ding@rock-chips.com>
The memchr() function is a GNU extension, available since glibc 2.1.91.
Glibc at some platform may be too old, or some platform may using uclibc
instead of glibc. So it's better to use memchr().
Change-Id: Id400e9d347a7abd231b417208abc5d02452462a6
Signed-off-by: Johnson Ding <johnson.ding@rock-chips.com>
The remain stream msb/lsb is rewrited by mistake.
Change-Id: I99bf21852b49bcecda103e7c9bd8051364c29c32
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
Add MppDecCfg and string control to add more extra control.
Change-Id: Iead4bd938691af3eac76368421c04c3ebd1f6272
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
The invisible frame will not be output normally, so it must be released
when unref_frame.
But sometimes, the invisible frame will be instructed to output, and
then it cannot be released when unref_frame, otherwise the user will
get the buffer that has been released.
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: I6bb014e0e5b6d52312639c4ad858b93b45f5d622