After info_change is encountered by paser thread, HalDecTaskFlag will
have info_change flag set. Although mpp_dec_flush is called there may be
some frame still remaining in display queue and waiting to be output. So
these frames shouldn't have info_change set since their resolution and
bit depth are the same as before. What's more, the info_change flag has
nothing to do with frames need to be output.
Change-Id: Ia01d1ecca5a6deb1a5d2914c34147d5c46c21684
Signed-off-by: Johnson Ding <johnson.ding@rock-chips.com>
When there is [xx xx 00 00 03 01] 6 bytes data right after a start code in the
bitstream, parser will take [00 00 03 01] as start code. This is an error.
Change-Id: I7e530f77892c5316656588f6bbf634cfe4198859
Signed-off-by: Johnson Ding <johnson.ding@rock-chips.com>
The no_output_of_prior_pics_flag flag in apple airplay stream is true.
This will cause dpb slot leak in idr_memory_management function.
The no_output_of_prior_pics_flag flag require the frame before IDR frame
should be discard rather than display. So we need to unmark the frames
in dpb and then mark them to be displayed to avoid they to be send to
display queue.
NOTE: when clearing no output frame we need to remove it first with
p_mark->out_flag is false to insure the CODEC_USE flag in mpp_buf_slot is
clear. Then set is_output flag to true to avoid real output this frame
to display queue.
Change-Id: Ib9bcebe6b84ceb96350bf405b9bed96e7fa0ca2e
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
1. When the width of a input picture is not stride to 16, vpu1 will
encountered Page Fault problem.
2. Make hor_stride and ver_stride less ambiguous, since they
should be set to original values from outside configuration, not the result of
MPP_ALIGN from mpp inside, although they should be exactly equal.
3. Fix the caculation of xFill in vepu2, this should be divide by 4.
Change-Id: I3e6c394ff9c15a730714a0e5938d18ca83c24d09
Signed-off-by: Johnson Ding <johnson.ding@rock-chips.com>
When multi thread calls scandir, crash may occur, so
the operation needs to be synchronized.
Change-Id: Idbdf539208259313d36c4acd17934af0e4dcf911
Signed-off-by: Rimon Xu <rimon.xu@rock-chips.com>
Separate h264 encoder stream writing to a new module.
Change-Id: Ibf55a20ac73e4eb2e3a3d744573eded3ebd92662
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
When encoder receives an empty frame with eos flag set, encoder will
encode an unreasonable extra frame.
Change-Id: I3bd1a2c84780f1b6212171117b67319b2f613b9f
Signed-off-by: Johnson Ding <johnson.ding@rock-chips.com>
Jpeg decoder with format conversion will use dec_pp mode. On this case The
sw_dec_out_dis flag need to be set in jpegd_setup_pp function. But this
flag is clear in later jpegd_gen_regs again which will lead to failure
on dec_pp mode jpeg decoding.
This fix move jpegd_setup_pp into the end of jpegd_gen_regs.
Change-Id: I6604d9593ec72ac58ad8a1757c6655bedc6b92fe
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
When the buffer does not match, frame group needs to modify
the buffer size before it can be used properly, so it needs
to wake up the wait.dec_buf_match condition after info changed
ready.
Change-Id: I3ef7b2bf59d7649cf0e05731a2e51f40fd082535
Signed-off-by: Rimon Xu <rimon.xu@rock-chips.com>
commit a base version of vp8 encoder,include vpu1 and vpu2.
encode input raw picture to ivf stream.
Change-Id: I9ac697edf2249a4ca7464fdbfb5fd22a63fd3c34
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
Signed-off-by: Johnson Ding <johnson.ding@rock-chips.com>
Vepu will return stream write length in 64 bit unit from input aligned
address. So final output length should count from 64 aligned sofeware
header address. Otherwise there will be extra gabage data at the end of
output stream.
Change-Id: Ic96a2bf6599f023a5c13b5f3acf219c231ac3327
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
tips:
cabac_buf, poc_buf and scalist_buf shares one address,
becase these use different section using offset.
Change-Id: I2b3de96909b530e2866990de7f374120e49b587e
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
Youku app h265 stream has non-standard at bit before nal_unit_type.
This bit should be zero according to H.265 standard. Hardware does
not parse this bit so software parser can skip this bit to avoid
failure on checking.
Change-Id: Iba4fe42de229c73eb149a84c08e17d1ceef1efdc
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
hevc extra data contain frame data,cause in prepare status parser
frame, when this case founded stop parser frame, no skip extra data
directly but goto prepare status for decode
Change-Id: I3fa9919f1577a551ca9bc3ae9f46cbd8a0910255
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
1. fix some error
2. set parameters of gop and rc at first init operation if the bit of change not set corret
Change-Id: If0bbcfbffb3224c4b3e520fdc7c4a796503dc161
Signed-off-by: hh <hh@rock-chips.com>
when i frame poc and frame_num equal last frame, now dpb is error,
we should flush dpb.
Change-Id: I8b0f4eeab3d07ffc7d0eeb6e8fbf31e648ddd44c
Signed-off-by: Rimon Xu <rimon.xu@rock-chips.com>
VPU hardware will generate error when there is extra 0xFF or 0x00FF
before tailing 0xFFD9. Remove them will fix some jpeg stream.
Change-Id: Ifac26870086e13958e17a41b547fa94c763062f6
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
translate YUV420P(YU12/YV12) to NV12 if input format is YUV420P(YU12/YV12)
and the stride of input buffer not align 32.H265 Encoder need the stride of
luma and chroma must align 16
Change-Id: I0e36d1c249a0270b6e5df3e16d769a817f967a2d
Signed-off-by: hh <hh@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>
When picture width is not aligned to 16 vepu row length should be
aligned to 16. This is the case when default luma offset is zero.
Change-Id: Ia8e97fd89fd396f59b448ae6e759dcde40af5519
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Eos should not go alone with info change flag.
If input stream is only 1 frame and require info change decoder will
create a info change with eos flag which will cause buf_slot dump log
like this: "can not clr queue_use on slot"
This patch clears eos flag on creating info change task to hal thread.
Change-Id: Ibbb92155ec1d7d0d406c781ebaaa81a98a2fc893
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
We need to turn off this switch to prevent some areas
of the video from flickering, but there may be other effects.
However, a choice needs to be made.
Change-Id: Ia52a604eed21e381f7310b1c85fe1c0434a1db13
Signed-off-by: Rimon Xu <rimon.xu@rock-chips.com>
When need_split flag is disabled decoder can only receive input packet
as one frame. But if user send two frames in one packet decoder will
loss a valid frame and finally lead to memory leak.
This patch treat this case as an error and bypass later hardware
proccsing. Althrough this process will lead to frame skip it still
brings in more stability.
Change-Id: Ibe566c847e0c7e259d14913ac210171edcfc903b
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
tip: when first frame is field, missing to write out.
Change-Id: I22f3e6041b9cceebefd3bec953c333a91e721b00
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
Buildroot uses it's own toolchain.cmake, which leads to completely
different CMAKE_SYSTEM_PROCESSOR settings.
And buildroot's toolchain is built for specific architecture, there's
no need to specify architecture features.
Change-Id: I6516bc083f809b01f485db7ba92b1543c6191959
Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
When mpp output packet binary file with size config file test case
should be enable to parser the corresponding config file.
This patch implement the config file option with "-c" prefix.
Command line sample:
mpi_dec_test -t 7 -i /sdcard/in.bin -i /sdcard/ops.bin
Then the test case will read in.bin file with size division specified
in ops.bin.
Change-Id: I8b18a6475d77f0303f12614a063888dcd9505f16
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
When decoding 422 source the YUV422 frame is default in YUV422SP mode.
But software like vooya does not support this format. So we change it to
YUV422P format for better user experience.
Change-Id: I103445470db5e6dd46ff1dc2cb705ae7e47bd8bc
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
When there is hal_task on PROC_DONE status on reset the reset process
should set these tasks to IDLE status.
Change-Id: I8a9e25fb98e597e22b9b99a6d13f84a4a0e59e3b
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>