Commit Graph

119 Commits

Author SHA1 Message Date
Chandler Chen
dd1be23a61 [h264d_api] add compatible for avcc fmt judgement
Signed-off-by: Chandler Chen <chandler.chen@rock-chips.com>
Change-Id: If7b077238c21fb5b4e07d8073e093350afc98984
2023-02-10 09:56:38 +08:00
Yandong Lin
6ff45db4e8 [h264d_api]: fix misjudging as avcc fmt issue
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: Ie96deb45f7c609bca5b504cb501d07f40f51cd26
2023-01-11 10:15:40 +08:00
Hongjin Li
520980b83b [h264_dpb]: add fast play once
fast once can be controlled by cmake cmd:
-DENABLE_FASTPLAY_ONCE=ON

Change-Id: Id0073ef8356acec700030b98b417d4f6999bf894
Signed-off-by: Hongjin Li <vic.hong@rock-chips.com>
2023-01-05 18:42:49 +08:00
xueman.ruan
68b1e1072e [h264d]: Fix empty EOS process error.
Dpb can not be flushed before split process when sending EOS in split mode.

Signed-off-by: xueman.ruan <xueman.ruan@rock-chips.com>
Change-Id: Id8ac89960ea2311f06ab80a2551ee114afafc83f
2022-12-27 17:53:47 +08:00
Johnson Ding
6e954f5142 [mpp]: Add MVC enable option
Change-Id: I11c4ef1954add18491f3745b23c91b79de60d181
Signed-off-by: Johnson Ding <johnson.ding@rock-chips.com>
2022-12-14 14:22:41 +08:00
Johnson Ding
0923f061ad [h264d]: Support 3D MVC decoding
Only support stereo high profile MVC. Frames with the same POC of two
views will be output in turn. The base view will be output at first.

Change-Id: I534e07bd079dc31d1a1e9178b81dfb21ffec8f60
Signed-off-by: Johnson Ding <johnson.ding@rock-chips.com>
2022-12-14 14:22:41 +08:00
Xingwen Fang
41c5a44a9c [h264d]: Fix memory leak of pps
Change-Id: Idf5b48bc72a927ac4d5aa9eaff7ee93ef90210f9
Signed-off-by: Xingwen Fang <fxw@rock-chips.com>
2022-11-30 08:46:55 +08:00
Hongjin Li
1e55b8395d [h264d]: Fix 264d decoding missing last frame
When the last packet sends empty data, h264d_prepare
returns in advance, causing the previous nalu to not
be saved normally, resulting in the loss of the last
frame of data.

Change-Id: Ic519b4326935d82b2534e7442c0ba5175885cef2
Signed-off-by: Hongjin Li <vic.hong@rock-chips.com>
2022-09-09 15:02:21 +08:00
Hongjin Li
da38e7c7d9 [h264d]: Fix missing frames in 264 decoding issue
After receiving the last packet of data, the program exits
without parsing, resulting in the frame loss of the last
packet of data.

Change-Id: I2effe7ae111402d8318095c016269f27467cb987
Signed-off-by: Hongjin Li <vic.hong@rock-chips.com>
2022-09-08 11:50:59 +08:00
Herman Chen
7256403b49 [mpp_callback]: Optimize callback module
1. Move callback module to osal for later mpp_device callback.
2. Make callback command a pre-defined value to avoid include issue.
3. Separate callback cmd and param to separate header.

Change-Id: Ibd5cf11650a1cd2a326baddb82dc60fa1767ac87
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2021-10-09 17:14:44 +08:00
Yandong Lin
c1cec3933c [h264d_parser]: optimize the size of some struct
optimize the size of some structures as blow:
1. H264dVideoCtx_t
2. H264dCurCtx_t
3. DXVA_Slice_H264_Long

Change-Id: If3d7ca2f8d92d2a590767a97324537700848ab90
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
2021-08-23 14:05:50 +08:00
sayon.chen
9eb347a5ae [h264d]: Support hw resolution capability check
Add hw capability to parser and check resolustion based on hardware
capability.

Change-Id: Id9b719b238c74d6b77f78fd8d583a3de854a94f4
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
2021-06-18 08:56:57 +08:00
Herman Chen
90b1c01b55 [h264d]: Reduce malloc / free
Change-Id: Id33f6928d31de4832bad3807ad4a1c5e6a637853
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2021-05-06 14:03:32 +08:00
Ding Wei
23fa2f0bd3 [h264d]: avoid every frame to mpp_frame_init/mpp_frame_deinit
Change-Id: Idc5cb835653ce2dfbc1597c8463bd25f2a9172a6
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
2021-04-21 17:02:22 +08:00
Herman Chen
5f26c80d95 [hal_dec]: Remove old MppDeviceId
Change-Id: I8285a3f998bb3360dce4c71d0108411dd8bc6f21
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-12-08 19:42:53 +08:00
Herman Chen
13b4f27390 [mpp_dec]: Use callback to handle hardware status
Change-Id: Iff972f276f00621dc0289633178e487d897b2e0e
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-12-08 19:42:53 +08:00
Herman Chen
d9c59b7c0a [mpp_dec]: Add MppDecCfg ctrl process to mpp_dec
Change-Id: I767e7b248922904d61aa19afd657a5543a2b9995
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-12-08 17:48:09 +08:00
Ding Wei
a720d9c230 [h264d]: fix issue for judge stream whether is avcc
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
Change-Id: I294bcc9f267fe5ab52dbce8bf4fbbc966f99b3f8
2020-08-31 11:33:05 +08:00
Ding Wei
8d38d4b2f0 [mpp_dec]: add immediate_out flag in mpp struct
tips: control cmd for immediate_out, can send both before and after mpp_init.

Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
Change-Id: Ibe66878cfab1f592b952d01bee3adade7c9d31bc
2020-05-27 10:22:03 +08:00
Chen Jinsen
fdc8ef19cb [mpp]: Fix output slot index assertion failure while get parse error
Change-Id: I06a9897bad7edbcd96b171faaecdab38a08d46eb
Signed-off-by: Chen Jinsen <kevin.chen@rock-chips.com>
2019-11-10 10:10:54 +08:00
Herman Chen
ea476ad4d1 [misc]: Change internal API interface
1. Change internal api RK_S32 cmd to MpiCmd.
2. Remove external MppEncCfgSet in MPI and move it internal data.

Change-Id: I0b93429f3b9f92712a57d0df54a1c76b3e08bf9d
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2019-10-14 20:21:41 +08:00
Herman Chen
585b187b18 [misc]: Use MppDeviceId to replace HalDeviceId
Change-Id: I3fd2f6a673f4f8d05420bfccb78e8b103f2ca26d
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2019-10-14 17:18:13 +08:00
Herman Chen
cd9a1cca3f [misc]: Change interface header file dependency
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>
2019-06-14 10:15:12 +08:00
Rimon Xu
ea21bdfc5d [h264d]: add sei parser for pic timing.
parser picture timing to judge frame type.

Change-Id: If573a36d84a521ce6a4d4d53905a2822e822baaf
Signed-off-by: Rimon Xu <rimon.xu@rock-chips.com>
2019-01-04 16:28:48 +08:00
Ding Wei
93824dc713 [hal_task]: add ref_err flag, use parse_err instead of had_error
tips:
a) when parse syntax error, enable parse_err;
b) when dpb ref error, enable ref_err;
c) when use disable err, only disable ref_err, parse_err cannot.
above all, using these flags, when  parse error, it also can
go ahead to hal thread, and loop all.

Change-Id: I639248dbf4499a8ed473b9f44f1e1332409c5c22
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2018-08-21 09:03:12 +08:00
Ding Wei
8df4ab798a [hal_apil][parser_api]: use .member type to set static api
Change-Id: Ibe7b053e1571873e32c5978f82af1fdf20ff8be8
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
2018-05-03 18:14:29 +08:00
Ding Wei
3f9d60aa7c [h264d]: updated appropriate function name
Change-Id: I84c93d414fdcfc350454b33ba9ce051d82dd60dc
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
2018-05-03 09:53:10 +08:00
Ding Wei
44ad1558ec [vpu_api]: add command VPU_API_SET_IMMEDIATE_OUT
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>
2018-05-03 09:53:10 +08:00
Ding Wei
55c070ee00 [h264d]: fix frame eos
tips:
a) when eos is empty frame, direct flush and return.
b) when last frame has eos, then decode it and flush.
c) mpp_put_frame must check frame slot whether empty.
d) when eos_frame decode error, mark error in eos_frame

Change-Id: Ia78445b2e568195f411b2f339469f4097e83b570
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
2018-01-02 18:45:05 +08:00
Ding Wei
c6594ae192 [mpi_cmd]: add disable error command
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>
2017-12-22 11:44:33 +08:00
leo.ding
ef02ca75ff [h264d]: fix bug: when judge whether is end of frame
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>
2017-06-22 15:01:44 +08:00
leo.ding
a2dd73c249 [h264d]: when got eos, only flush dpb, not to reset flag
Change-Id: Iaee15a21666554aad99598c1359e6a61c6a7bd33
Signed-off-by: leo.ding <leo.ding@rock-chips.com>
2017-04-04 13:02:52 +08:00
Herman Chen
a8e6c27d0b [mpp]: Move vpu.c out of libmpp.so
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>
2017-04-01 17:44:11 +08:00
leo.ding
3df2fb810d [h264d]: fix bug: flush only output not to clear dpb
Tips: when flush, only output the frame which can be output,
not to clear all frames. Such as, when infochange, then flush
is called, while current frame is for reference and should be
reserved, it would be error if it be cleared.

Change-Id: Ie33b0f51bbe54c1b6cad6d1d569b3409ca6414a2
Signed-off-by: leo.ding <leo.ding@rock-chips.com>
2017-03-27 09:16:43 +08:00
leo.ding
22886af46b [h264d]: remove writing log file
1. remove h264d_log.h, add separate it in h264d_global.h and hal_h264d_global.h
2. remove write log file functions

Change-Id: Ia283fafe4a0b0613dbb2f1689c508d0fd7655ac1
Signed-off-by: leo.ding <leo.ding@rock-chips.com>
2016-12-16 14:44:13 +08:00
leo.ding
fb718f33fc [h264d]: add split mode
1. add split mode prepare branch
2. modify h264d_test for verify split mode

Change-Id: I387a78b45ef2417a118d03cb4b171557cf8534aa
Signed-off-by: leo.ding <leo.ding@rock-chips.com>
2016-12-01 11:32:44 +08:00
linyuhui
d59f92c0af [h264d]: remove dpb error flag error over-mark
Change-Id: Idf5394bb48c02aa46dd7957ff1cda81d01d8a526
2016-10-24 09:11:44 +08:00
leo.ding
6b744430b4 [h264d] use realloc buffer instead of fixed buffer size;
Change-Id: Idffd810dd89e8b25bd080fc14510b24c39adc25f
Signed-off-by: leo.ding <leo.ding@rock-chips.com>
2016-09-02 15:55:42 +08:00
GaoZhili
3249378118 only format the unformated code to standard style
git-svn-id: https://10.10.10.66:8443/svn/MediaProcessPlatform/trunk/mpp@1020 6e48237b-75ef-9749-8fc9-41990f28c85a
2016-07-14 09:34:04 +00:00
ChenSiyong
0b259c5837 [264d_parser] fixed eos not set to task at prepare status
git-svn-id: https://10.10.10.66:8443/svn/MediaProcessPlatform/trunk/mpp@1008 6e48237b-75ef-9749-8fc9-41990f28c85a
2016-07-12 02:57:25 +00:00
ChenSiyong
fa119620cd [mpp_dec] modify eos flow, fixed eos no notify to user
git-svn-id: https://10.10.10.66:8443/svn/MediaProcessPlatform/trunk/mpp@967 6e48237b-75ef-9749-8fc9-41990f28c85a
2016-06-30 02:02:45 +00:00
DingWei
cc102579f6 [hal_task] add hal callback strut;
[h264d] remove register error judge to hal_wait from callback;
[h264d] update vdpu hal module, and set it mode as use_mpp_mode = 2;



git-svn-id: https://10.10.10.66:8443/svn/MediaProcessPlatform/trunk/mpp@942 6e48237b-75ef-9749-8fc9-41990f28c85a
2016-06-21 02:33:13 +00:00
DingWei
282bd2d59d [h264d] 宁夏IPTV; update: mpp_dec_flush call h264d_flush to flush out frames, not to remove;
git-svn-id: https://10.10.10.66:8443/svn/MediaProcessPlatform/trunk/mpp@919 6e48237b-75ef-9749-8fc9-41990f28c85a
2016-06-15 10:28:21 +00:00
ChenHengming
4201f689c0 [format]: format coding style
git-svn-id: https://10.10.10.66:8443/svn/MediaProcessPlatform/trunk/mpp@907 6e48237b-75ef-9749-8fc9-41990f28c85a
2016-06-13 09:47:19 +00:00
DingWei
6e48de3ea5 [h264d] add struct PictureError; add poc_interval for as soon as write picture out;
git-svn-id: https://10.10.10.66:8443/svn/MediaProcessPlatform/trunk/mpp@888 6e48237b-75ef-9749-8fc9-41990f28c85a
2016-06-07 13:25:11 +00:00
ChenHengming
f3822e7828 [h264d]: remove extra flush on deinit
[h265d]: prevent possible multiple set eos

git-svn-id: https://10.10.10.66:8443/svn/MediaProcessPlatform/trunk/mpp@882 6e48237b-75ef-9749-8fc9-41990f28c85a
2016-06-07 02:57:35 +00:00
ChenHengming
7707ce1b2d [h264d]: fix abort on multiple h264d flush operation
git-svn-id: https://10.10.10.66:8443/svn/MediaProcessPlatform/trunk/mpp@881 6e48237b-75ef-9749-8fc9-41990f28c85a
2016-06-07 02:40:41 +00:00
DingWei
e468304675 [h264d] h264d_flush use has_get_eos for eos and change dpb_used_size for notify callback;
git-svn-id: https://10.10.10.66:8443/svn/MediaProcessPlatform/trunk/mpp@825 6e48237b-75ef-9749-8fc9-41990f28c85a
2016-05-26 07:29:42 +00:00
DingWei
cbacdb43bc [h264d] remove log H264D_DBG_DPB_FREE && H264D_DBG_DPB_DISPLAY; add used_for_reference in check_dpb_continuous;
git-svn-id: https://10.10.10.66:8443/svn/MediaProcessPlatform/trunk/mpp@785 6e48237b-75ef-9749-8fc9-41990f28c85a
2016-05-19 11:46:22 +00:00
DingWei
106772a2ea [h264d] add cur_err_flag; dpb_err_flag => had_err;
git-svn-id: https://10.10.10.66:8443/svn/MediaProcessPlatform/trunk/mpp@752 6e48237b-75ef-9749-8fc9-41990f28c85a
2016-05-13 07:13:36 +00:00