Move MppPort and MppTaskQueue function to mpp_task_impl.h.
Add caller parameter to mpp_port_poll, mpp_port_dequeue,
mpp_port_enqueue, mpp_port_awake functions for debug purpose.
Change-Id: I39f69d934d45b65c3bc751d71ec98388c2fb9849
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
1. Add mpp_meta_size and mpp_meta_next_node function
2. Move mpp_meta_size and mpp_meta_next_node to mpp_meta_impl.h
mpp_meta_size - Return node count in metadata.
mpp_meta_next_node - Return next MppMetaNode in metadata.
These two functions are useful in debug.
Change-Id: If0be59c4621fd8ba2e2dbe96124a653b397bac7c
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Temporal id is the temporal layer id for H.264 and H.265. It is
usefull for TSVC stream storage and frame display.
Users can determine their behave according to this id.
Change-Id: I06f039b63e0665d3542dc6bd89cc6b52d957af25
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
MppPacket will NOT create meta data by default. Then user and mpp can
attach or remove flexible parameter without adding or remove
interface which will break binary compatibility.
Change-Id: I2c2ff24f7e1c22adb7085a75a4c857e5760d2eae
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
MppFrame will NOT create meta data by default. Then user and mpp can
attach or remove flexible parameter without adding or remove
interface which will break binary compatibility.
Change-Id: Ia3c0d15d6daa210deab7a7d5dffcb54303fbb73e
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Move MppCtx, MppParam, MppFrame, MppPacket, MppBuffer, MppBufferGroup,
MppTask and MppMeta to rk_type.h.
Later development need to bring in cross reference between these
objects. So we choose to move these declaration together.
Change-Id: I7ea39138ca87d6ca4cb86556464a5de89d172846
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
1. Modify data type of rga_request to keep consistent with kernel
2. Modify error yuv fomrat translate and error yuv2rgb_mode config of rga
Change-Id: Iaee7b101f510c9d6f90aabe7d5ce2794b4502bf7
Signed-off-by: hh <hh@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>
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>
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>
Each of the different alloctor has different alloctor modes,
such as allocating physical continuous memory, secure memory,
etc.
Change-Id: Ib032689f0cfd36b494843dcc176a22c6c9587b6a
Signed-off-by: Rimon Xu <rimon.xu@rock-chips.com>
tips: this command is used to set decoded frame immediate out,
whehter is in display order or not.
Change-Id: I0b6b2c34fde722fe724019118c7af142b4b2e6f1
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
tips: the timestamp in slice header is not useful, except for
calculate increment of dispaly frame. so, it cannot use to
dispaly, and remove it.
Change-Id: I748d553d40c4736e2f5ef98d8a8519fcc5e533e0
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
tips: when input timestamp has not pts, and set pts=dts,
it should use input timestamp order for output.
Change-Id: I8b3ef9a8d150e5729a3fa94df6c1b448edb8f1fd
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
This buffer type is used for the buffer coming from the
application, the application should make sure those
buffers are the dma buffer.
Change-Id: I2c8491f4dea77e5d7ae8d9157b0a1eda204f4bd6
Signed-off-by: Randy Li <randy.li@rock-chips.com>
Operation not permitted, it also means that this operation
is not implemented.
Change-Id: I752efb3f5a697125f334f6fdf8bd58fea94a7024
Signed-off-by: Randy Li <randy.li@rock-chips.com>
1. fix the header protection
2. the incorrect offset in ion memory mapping
3. the commentment of the buffer type in a header file
Change-Id: If9d1db90d41131750a341ab6177f947f7b966317
Signed-off-by: Randy Li <randy.li@rock-chips.com>
For it is inconvenient to clear the eos bit in mpp_packet flag we add a
new function to clear the eos flag only.
Change-Id: I67fad6e416bca68b6b7cee8e816fca386759f35a
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
tips: when decode too fast then display queue is full,
that should wait until frame displayed.
Change-Id: Ic8ec18368fdb956cad92b0760a3d4637e46f55bf
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
1. Disable error default is not set for normal error detection.
2. On special case like drone streaming the user prefers to ignore
all error and continue decoding. Then disable error flag will be set
to fullfill this requirement.
3. When disable error flag is set H.264/H.265 decoding will ignore
hardware error and mark all output frame as no error.
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
Change-Id: I8fd619511c53ee744ae973ab3fe015565106dd37
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
The encoder would use the KEY_OUTPUT_INTRA to indicate
the current frame is intra frame.
And the decoder would use the new added KEY_HDR_INFO key
to store the HDR data.
Change-Id: I150a993906f43792474ac5aa02a1e5441fb21e8f
Signed-off-by: Randy Li <randy.li@rock-chips.com>
A few comments for the pixel formats are not correct,
also without the mapping to the common name comparing
to the Gstreamer or V4L2.
Both VPU and RKV supports tile format, so I add a new
type to store those pixel formats with a complex layout.
The VDPU does NOT semi-planarity pixel formats and
other than 8x4 marcoblock size for the tile format.
Change-Id: I9abea54a563eafe6902f5cf5e25e741a809f41b0
Signed-off-by: Randy Li <randy.li@rock-chips.com>
a) mpp_mode: if have rkv, can set it 1 to use rkv decoder
b) bit_depth: for calculate stride
c) yuv_format: for setting multiplication coefficient when malloc
Change-Id: Id7c32c7cac17d3c9007a0674979c2b73769ae44f
Signed-off-by: leo.ding <leo.ding@rock-chips.com>
Allocate buffers before encoding so that we can save
some time when encoding first frame.
Change-Id: I02d67347313e2050896b545b861bc5fa0bba495d
Signed-off-by: timkingh.huang <timkingh.huang@rock-chips.com>
The reason why the decode_put_packet() could be various, it
should return the correct reason to make the caller use the
properly way to handle that.
Change-Id: I88ee1c06d204b8c3bb7ba09482f2939fdd1e8633
Signed-off-by: Randy Li <randy.li@rock-chips.com>
If encode thread is blocked in mpp_port_poll(output, MPP_POLL_BLOCK) and
user's get stream thread exit, it must awake this block call before join
encode thread exit.
Change-Id: Iee52d2d45a672464b7f3485086a389041dacdeb0
Signed-off-by: hh <hh@rock-chips.com>
The external buffer would request the index of a buffer to
manage it in an array.
Change-Id: Ifbb169c75dfb6342b428b1fd640db9ec45ff5f73
Signed-off-by: Randy Li <randy.li@rock-chips.com>
I also fix a number of compiler warnings in this commmit.
A funtion is forgot to be exported and some functions should not
be exported.
Change-Id: I945456721a7507d448cfa0559418c356c6cb6ace
Signed-off-by: Randy Li <randy.li@rock-chips.com>
scan the stream just for one time in jpegd parser and
remove redundant codes.
Change-Id: I72920b15fc4ed15cfa1de55d9ed249d50cceebb2
Signed-off-by: timkingh.huang <timkingh.huang@rock-chips.com>
Use mpp_device to replace VPUClient interface. Then libmpp.so can
work without libvpu.so. And libvpu.so is only for legacy libvpuapi.
Remove iommu detection function in mpp. All buffer register will be
send to kernel with the form of low 10 bit file handle plus 22 bit
offset mode.
Remove vpu.h/vpu_api.h from libmpp.so
NOTE: mpp_frame.h is updated for external user.
Change-Id: I7ff2effd3c73c042ed65896847fc7458da29fc55
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
It is the correct to store multi char variable in a variable.
Finally we can't get rid of warning.
NOTE: Need to check the macro under different compiler.
Change-Id: Id43fabd9a6ad437938ba590c95dc0552ef4e5699
Signed-off-by: Randy Li <randy.li@rock-chips.com>
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
When retrieving frames current API only allows to define wether
the API should block without any timeout or not block at all.
This allows to specify a block timeout via the
MPP_SET_OUTPUT_BLOCK_TIMEOUT control operation.
Change-Id: Id35ad3d48f72881184009f830c406c3a655e1a90
Signed-off-by: LongChair <LongChair@hotmail.com>
Signed-off-by: Randy Li <randy.li@rock-chips.com>
1.colorType bitmask add dynamic range and color space
2.need to cooperate with mediacodec modifications
3.need to cooperate with omx_il modifications
Change-Id: Ib8c23f6b0488cf799e69ced2bdc9b54d309a1630
Signed-off-by: rimon.xu <rimon.xu@rock-chips.com>
1. Interface change:
Separate normal config into three basic config and several runtime config:
Three basic config -
a. rate control config
b. preprocess config
c. video codec protocol config
More flexible rate control interfaces are provided.
More codec configure interfaces are provided.
Change flag with bitmap is provided for further optimization.
2. Remove old codec config from controller and left rate control module only
Encoder controller only handle user rate control requirement and bit allocation.
Hal hardware encoder only handle qp calculation according given target bit.
Remove all old codec code.
3. Move codec process to hal
Different hardware will share same codec process function in common protocol
directory. And different hardware api will register to same api set. Codec
header generation is moved to separate hal directory.
4. Encoder will return length by task
Encoder will NOT get stream information feedback from controller. All
information required by encoder will be all stored in Task.
5. Add mpp_rc for rate control
Move some common rate control utils to mpp_base.
6. Update mpi_enc_test and mpi_rc_test with new interface
Change-Id: Iebb5e276a48f547167e1bed4673f21cc2f0c8ad5
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Signed-off-by: Lin Kesheng <lks@rock-chips.com>
1. Add poll with timeout. Support three mode: block/non-block/timeout.
2. Change control MPP_SET_INPUT_BLOCK and MPP_SET_OUTPUT_BLOCK.
3. Remove msleep in most mpp interface.
Change-Id: I39d9a261b6f1da66c6cb944abd71d1e7f4928d2d
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
1. cfg sharpen parameters
export h264e_hal_debug=0x8001, to open log
export h264e_hal_debug=0x1, to close log
Change-Id: I97322f9819cfbb6909b86afc25f84bacac9841af
Signed-off-by: Lin Kesheng <lks@rock-chips.com>