Add real bps, intra frame bps and inter frame bps print.
Change-Id: I3395c0293f6918691a4bfbeab5f4b3b32feceb1e
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
1. when had slice data and current nalu is SPS PPS AUD SEI,
thus it can consider that last nalu is the end of frame.
2. when pps is missing, frame data is continue, and use
first_mb_in_slice to judge last nalu is end of frame.
Change-Id: I1ccf3ca415e6b04dcd7fe7fc9c357fd600fa5803
Signed-off-by: leo.ding <leo.ding@rock-chips.com>
Use bitrate min/max to calculate corresponding qp limit.
Change-Id: I5194271dbb5df62f63743f75c40986b037a6eefc
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
To avoid floating point exception, SSE is set to ONE if
it is less than ONE.
Change-Id: Ib0754fdf9327e8f179e9bf56f29f349867f45d00
Signed-off-by: timkingh.huang <timkingh.huang@rock-chips.com>
The imported buffer may be released from its origin allocator,
I would suggest to use the new file descriptor from new ion
handle.
NOTE: User may use file descriptor outside mpp as buffer index.
If mpp chooses new map fd as its output user may lost the
connection between user external buffer and mpp output buffer.
Change-Id: Ie0f42cd3268dfd08ddcbd5148a68406ff4b66b7a
Signed-off-by: Randy Li <randy.li@rock-chips.com>
Signed-off-by: ayaka <ayaka@soulik.info>
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Add checksum calculation function and file access function for debug.
NOTE: checksum for YUV image and for luma only so far.
Change-Id: I54509bebd64f5e5143e14824733d9c25af9db204
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Check rc mode, quality and bps parameter.
NOTE: current H.264 bitrate only accept range from 10K to 100M.
Change-Id: I7cacf2e3f7093bc55e1f5686f06b0efdbf865a4d
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
1. add Mppdevctx to store some infos in every codec.
reason:each codec has its own unique characteristics.
2. add mpp_device_control interface for get or set ctx values.
reason:it simplity interface, which flexible, easy to use and versatile.
Change-Id: I56c9332768c86f62a3ca248ad254fba9e798c577
Signed-off-by: leo.ding <leo.ding@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>
The cross toolchains in Linux distributions are more prefer to
auto conf way, move those detecting from build system to toolchain
itself would be more welcome.
Change-Id: Ib42d9a0c65646b679ed14c96d16d1845c596f741
Signed-off-by: Randy Li <randy.li@rock-chips.com>
The best place to call MPP_ENC_SET_OSD_DATA_CFG is after
MPP_ENC_SET_OSD_PLT_CFG, or the osd may be wrong.
Change-Id: I02b08f28ed7aceb7c77313cea6a0767051681f72
Signed-off-by: Jung Zhao <jung.zhao@rock-chips.com>
Recode the first P frame so that we can get appropriate QP
for the target bits. However, this may result a big gap
between the first I and P frame. It should be fixed in the
future.
Change-Id: I720a1d56554921978f167f1b8d49b1e96e5ea767
Signed-off-by: timkingh.huang <timkingh.huang@rock-chips.com>
H265E had defined in Cmakelist.txt to choose whether build
h265 encode module, so it here is redefined.
Change-Id: I54e9704d396d0a8a0e6d0f2ae8595d033131d81b
Signed-off-by: leo.ding <leo.ding@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>
It would make the build system more simple, and the cross
toolchains would do the rest to you.
Toolchains like buildroot default not enable the __gnu_linux__
marco in the pre-processor will surfure from the systsm unknown
problem. You should enable the marco in building toolchains
or have a look on those scripts in build directory.
Change-Id: I8f6af3391aa3d94d602ec8d84ba5e43839859169
Signed-off-by: Randy Li <randy.li@rock-chips.com>
The default behavior of the JPEG parser should ignore
the reminined data.
Change-Id: Id097cf6997bcef048afcbeb9eb72319373dd9ae7
Signed-off-by: Randy Li <randy.li@rock-chips.com>
If target bit is zero, it will exist mosaic in the encoded
picture. In this case, half of the average bit rate of
previous P frames is assigned to target bit.
Change-Id: I990e80ae04affb0a6bed2e6f456c77657f31a221
Signed-off-by: timkingh.huang <timkingh.huang@rock-chips.com>
Given the target bits, the first frame's QP is always
inappropriate because there is no history data. Thus
we adjust AQ parameter for the first frame so that we
can get appropriate QP for target bits.
Change-Id: Iccc3500959d091c40d8bb5d9da6da3767fd8753d
Signed-off-by: timkingh.huang <timkingh.huang@rock-chips.com>
It will cause conflicts with the gb28181 protocol
Change-Id: Ia4c24c528c88caa3e6f7c1ad20ef309607e04794
Signed-off-by: ZhouJing <tracy.zhou@rock-chips.com>
Sometimes the offset or the offset plus the size is beyond the
buffer area. It would be better to raise an error and stopping
the future step rather than the kernel halt it.
Change-Id: I32d6f05736c874d56e1e9f77505f16ca3a2c01ac
Signed-off-by: Randy Li <randy.li@rock-chips.com>
It is possible to use the project as the submodule of the
other project or having a top build rules project for it.
Change-Id: I6afb43392f10165005b7bf94a867936242dedd04
Signed-off-by: Randy Li <randy.li@rock-chips.com>
Please notice that clock source is only confirm to work
on the currently Rockchip ARMv7/ARMv8 SoC.
You may meet problem with the other platform.
The time granularities is miliseconds level.
Change-Id: Icf56f88dd15045d7c899bdcfaf3637fab159b35a
Signed-off-by: ayaka <ayaka@soulik.info>
Signed-off-by: Randy Li <randy.li@rock-chips.com>
Reviewed-by: timkingh.huang <timkingh.huang@rock-chips.com>
The input / output port should NOT share the same lock. The old port lock
is not necessary for task interface.
Change-Id: I31e50ba539bca7389596093605c7641277ebc5a8
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Signed-off-by: hh <hh@rock-chips.com>
The build system may store those files into a package.
Change-Id: I2ab54da5880d1979a19430520d36324629b8a7d8
Signed-off-by: Randy Li <randy.li@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>