GitHub/LineageOS/G12/android_hardware_amlogic_kernel-modules_media.git
4 years agomedia_module: fixed some issues for gts. [1/1]
Yixin Peng [Sun, 1 Dec 2019 08:12:19 +0000 (16:12 +0800)]
media_module: fixed some issues for gts. [1/1]

PD#SWPL-17322

Problem:
    h265 seeking test fail.

Solution:
    After seek, Clear the DPB queue.

Verify:
    AC214

Change-Id: I52b6d4b7a64c99916e5ec0efc2ae48619c877a7d
Signed-off-by: Yixin Peng <yixin.peng@amlogic.com>
4 years agov4l: fixed the issue of h264/h265 parser. [1/1]
Nanxin Qin [Sat, 30 Nov 2019 13:58:36 +0000 (21:58 +0800)]
v4l: fixed the issue of h264/h265 parser. [1/1]

PD#SWPL-17322

Problem:
1. when a frame inclued 2 or more sps and they are differnt
   which cause to triggle event of resultion change infinite.
2. play the tiny stream maybe caused crash.

Solution:
1. fixed the issue of h264/h265 parser.
2. fixed the tiny es playback iusse.

Verify:
U212

Change-Id: I313991b13867b3c057225473e0407c05b20d799f
Signed-off-by: Nanxin Qin <nanxin.qin@amlogic.com>
4 years agov4l: fixed some issues for v4l codec. [1/1]
Nanxin Qin [Thu, 28 Nov 2019 06:30:53 +0000 (14:30 +0800)]
v4l: fixed some issues for v4l codec. [1/1]

PD#SWPL-5313

Problem:
Decoder V4L2 interface Phase3(AFBC&MMU Support)

Solution:
1. add the limit of vdec input frames.
2. add config parms canvas_mode and endian.

Verify:
U212

Change-Id: Ib3365cd1a09fac7c029bba64c70a3ed40bbd8e3f
Signed-off-by: Nanxin Qin <nanxin.qin@amlogic.com>
4 years agomedia_module: h264 playback stuck [1/1]
Yixin Peng [Thu, 28 Nov 2019 14:33:34 +0000 (22:33 +0800)]
media_module: h264 playback stuck [1/1]

PD#SWPL-17322

Problem:
    resolution changes cause stuck.

Solution:
    The DPB size is updated every time
    to solve this problem.

Verify:
    U212

Change-Id: I232961c836ee5a071de506d45cbde958c9ff3305
Signed-off-by: Yixin Peng <yixin.peng@amlogic.com>
4 years agomedia_module: h264 add REQUEST_RESET message to user space [1/1]
Yixin Peng [Wed, 27 Nov 2019 13:29:00 +0000 (21:29 +0800)]
media_module: h264 add REQUEST_RESET message to user space [1/1]

PD#SWPL-5313

Problem:
    When the decode driver needs to reset,
    a message needs to be sent to the user
    space for this operation.

Solution:
    Add this feature.

Verify:
    U212

Change-Id: If112862058db61b870dce0e0eb9d6d13c6109152
Signed-off-by: Yixin Peng <yixin.peng@amlogic.com>
4 years agompeg12 mpeg4: fix some mpeg video problem. [1/1]
shihong.zheng [Thu, 28 Nov 2019 08:52:18 +0000 (16:52 +0800)]
mpeg12 mpeg4: fix some mpeg video problem. [1/1]

PD#SWPL-17549

Problem:
1. testCodecResetsMpeg2WithSurface fail on andorid q.
2. special xvid video can not seek.

Solution:
1. add timeout for mpeg12 ucode WAIT_MCW_WRRSP
2. save context even some frames canot be decode,
 the context may necessary for behind frames(tv-10657).
ucode gerrit id: 90009
ucode change id: I6d127c5c
ucode commit id: 6cea5dfc

Verify:
AC214 x301

Change-Id: I822f6812f7b1774e7fe2cfb5d1ba935fd96132de
Signed-off-by: shihong.zheng <shihong.zheng@amlogic.com>
4 years agov4l: fixed some issues for v4l codec. [1/1]
Nanxin Qin [Sun, 24 Nov 2019 09:40:53 +0000 (17:40 +0800)]
v4l: fixed some issues for v4l codec. [1/1]

PD#SWPL-5313

Problem:
Decoder V4L2 interface Phase3(AFBC&MMU Support)

Solution:
1. fixed an issue of get/set parms abnormal.
2. fixed the issue of register vfm failed cause crash.
3. added post events for exception happend.
4. fixed profile_idc changes cause stuck.

Verify:
U212

Change-Id: I4519c91409d570e6fe8f9fedaad6c48628be85a0
Signed-off-by: Nanxin Qin <nanxin.qin@amlogic.com>
4 years agoh264_enc: set colorspace to bt709 for 720p and above [1/1]
Rico Yang [Mon, 25 Nov 2019 15:45:36 +0000 (23:45 +0800)]
h264_enc: set colorspace to bt709 for 720p and above [1/1]

PD#SWPL-15982

Problem:
h264 encoder set colorspace to bt709 for all resolution

Solution:
set colorspace to bt709 for 720p and above only

Verify:
verified on franklin

Change-Id: Ic1755181681de32750473548f96a25c05fa10044
Signed-off-by: Rico Yang <wei.yang@amlogic.com>
4 years agodecoder: fix mpeg4 display green screen. [1/1]
shihong.zheng [Wed, 13 Nov 2019 08:35:34 +0000 (16:35 +0800)]
decoder: fix mpeg4 display green screen. [1/1]

PD#IPTV-5117

Problem:
mpeg4 start decode when first frame not
ready.

Solution:
add set start_dec_buf_level for ready to run.
same with mpeg2 mjpeg mpeg4.

Verify:
S905L2A

Change-Id: I046fbfd4dfee97238eaf0982375a3a1e1759a12e
Signed-off-by: shihong.zheng <shihong.zheng@amlogic.com>
5 years agov4l: fixed build issue on the android P. [1/1]
Nanxin Qin [Sat, 23 Nov 2019 15:16:03 +0000 (23:16 +0800)]
v4l: fixed build issue on the android P. [1/1]

PD#SWPL-5313

Problem:
the symbol undefined cause build fail.

Solution:
fixed build issue on the android P

Verify:
u212

Change-Id: I7a576efc202b851bf88e68769f7627f7db501a82
Signed-off-by: Nanxin Qin <nanxin.qin@amlogic.com>
5 years agov4l: fixed some issues for v4l codec. [3/3]
Nanxin Qin [Tue, 29 Oct 2019 14:08:34 +0000 (22:08 +0800)]
v4l: fixed some issues for v4l codec. [3/3]

PD#SWPL-5313

Problem:
Decoder V4L2 interface Phase3(AFBC&MMU Support)

Solution:
1. opitimize the event of notify eos when play end,
   need not alloc more buffer to dispatch ending event.
2. opitimize the interface of get buffs from m2m pool.
3. v4l2 vf video display support.
4. support config parms for v4l codec.
5. add afbc an dw for h265, vp9.
6. fixed the box and memory leak.
7. support report hdr infos from v4l codec.
8. opitimize the event of report resolution change.

Verify:
U212

Change-Id: I446f9bb3f3b64a66540f6dd32af2cd7e71d0a280
Signed-off-by: Nanxin Qin <nanxin.qin@amlogic.com>
5 years agomedia_modlue: add v4lvideo path [1/1]
jintao xu [Wed, 31 Jul 2019 03:01:32 +0000 (11:01 +0800)]
media_modlue: add v4lvideo path [1/1]

PD#SWPL-5996

Problem:
add v4lvideo path

Solution:
add v4lvideo path

Verify:
U212

Change-Id: I1cab775e74b8365a7995a2b479a21bd0a5979564
Signed-off-by: jintao xu <jintao.xu@amlogic.com>
5 years agomh264: fix i only not out frame. [1/1]
shihong.zheng [Wed, 20 Nov 2019 13:15:02 +0000 (21:15 +0800)]
mh264: fix i only not out frame. [1/1]

PD#IPTV-4993

Problem:
i_only do not ouput frames. the dpb is full.
all frames are ref pic.

Solution:
flush dpb when decode next frame.
do not check dpb error for i_only

Verify:
S905L2A

Change-Id: I6739491e56d38440d7875f679df405a44b58f2b9
Signed-off-by: shihong.zheng <shihong.zheng@amlogic.com>
5 years agomedia_module: h264 green pixelation is seen during playback [1/1]
Peng Yixin [Thu, 31 Oct 2019 05:47:20 +0000 (13:47 +0800)]
media_module: h264 green pixelation is seen during playback [1/1]

PD#OTT-6820

Problem:
    Only when the resolution is switched from a stream with a lot of
    decoded buffers to another stream that needs a lot of decoded
    buffers,this problem occur when the canvas id used at the same
    time has exceeded the maximum value and cannot be allocated.

Solution:
    When switching the resolution, there is no need the canvas id
    of the previous resolution, so release it, the canvas id will
    not be insufficient to cause flower screen.

Verify:
    S922X

Change-Id: Ie9944f71d1bc85c8c90198573c9b209b74f5f828
Signed-off-by: Peng Yixin <yixin.peng@amlogic.com>
5 years agoh265: The code stream with width and height of 64 failed the CTS test. [1/1]
Gan Zhang [Wed, 20 Nov 2019 05:49:54 +0000 (13:49 +0800)]
h265: The code stream with width and height of 64 failed the CTS test. [1/1]

PD#SWPL-17038

Problem:
When the width and height of the decoded macro block is 1,
the HEVC_PARSER_LCU_START parameter read from the register is 0,
which will cause the decoded data to be set to error.

Solution:
(hevc->lcu_x_num * hevc->lcu_y_num != 1)
Add the above judgment conditions to unset the decoded data to Error.

Verify:
P212

Change-Id: Ia89f5381059ef6d996bb8c60408324e0509e5b2d
Signed-off-by: Gan Zhang <gan.zhang@amlogic.com>
5 years agomedia_module: h265 full-screen mosaic during playback [1/1]
Peng Yixin [Thu, 17 Oct 2019 05:14:31 +0000 (13:14 +0800)]
media_module: h265 full-screen mosaic during playback [1/1]

PD#SWPL-12387

Problem:
    The first I frame was not incorrectly detected,
    resulting display mosaic picture.

Solution:
    Add error detection for the first I frame to
    solve this problem.

Verify:
    Verified U212

Change-Id: I2247a878c3bd7b9d13c17614856cb101623e6dab
Signed-off-by: Peng Yixin <yixin.peng@amlogic.com>
5 years agomedia_module: h265 interlace format show mosaic pitcutre [1/1]
Peng Yixin [Sat, 26 Oct 2019 08:36:12 +0000 (16:36 +0800)]
media_module: h265 interlace format show mosaic pitcutre [1/1]

PD#SWPL-12376

Problem:
    1. The incorrect type information was transmitted to the backend.
    2. pending_q KFIFO is not initialized.
    3. Error data in video file causes picture freeze.

Solution:
    1. Pass the correct type vf information to the back end.
    2. Initialize pending_q KFIFO.
    3. Modify error handling logic to solve the picture freeze problem.

Verify:
    Verified AC213

Change-Id: I939fa780c30d500b1a16d43cc13764f4f862e808
Signed-off-by: Peng Yixin <yixin.peng@amlogic.com>
5 years agomedia_module: fix the call sequence of del_timer_sync and cancel_work_sync [1/1]
apollo.ling [Tue, 5 Nov 2019 08:16:15 +0000 (16:16 +0800)]
media_module: fix the call sequence of del_timer_sync and cancel_work_sync [1/1]

PD#SWPL-16242

Problem:
{stresstest} {KASAN} avs bug causes system crash when do DTV 2s channel switch
and 15s suspend.(1/6,none)

Solution:
correct the call sequence of del_timer_sync and cancel_work_sync

Verify:
X301

Change-Id: I53534f207d3379fe6e463ae2e57badeceeb5f9ec
Signed-off-by: apollo.ling <apollo.ling@amlogic.com>
5 years agodvb: fix demux set serial ts mode issue [1/1]
Cheng Tong [Wed, 6 Nov 2019 06:11:31 +0000 (14:11 +0800)]
dvb: fix demux set serial ts mode issue [1/1]

PD#OTT-7142

Problem:
demux can't set ts source correctly if ts 1 at serial mode

Solution:
fix the right ts mode

Verify:
verify on s805y

Change-Id: Ie8cbbe1320d925bcd4744ea5c0ab710b58055d3b
Signed-off-by: Cheng Tong <cheng.tong@amlogic.com>
5 years agovdec: update the many parse_one_sei_record printings [1/1]
apollo.ling [Mon, 4 Nov 2019 08:09:02 +0000 (16:09 +0800)]
vdec: update the many parse_one_sei_record printings [1/1]

PD#SWPL-16189

Problem:
{stresstest} it continues print "parse_one_sei_record: payload_type"
and causes watchdog_reboot when do DTV 2s channel switch and 15s
suspend.(4/6,none)

Solution:
update the many parse_one_sei_record printings

Verify:
X301

Change-Id: Ia9aa165c1f37bd0db9f23ee5c027aaad1d124f60
Signed-off-by: apollo.ling <apollo.ling@amlogic.com>
5 years agomedia_module: fix vp9 video with encoded with VBAQ,show macro blocks [1/1]
Peng Yixin [Sat, 2 Nov 2019 04:04:00 +0000 (12:04 +0800)]
media_module: fix vp9 video with encoded with VBAQ,show macro blocks [1/1]

PD#SWPL-16144

Problem:
When playing the vp9 video with encoded with VBAQ enabled, there're
macro blocks on the screen and sometimes even worse, the decoded frames
may be crashed because of incapable of decoding.

Solution:
Modify microcode to solve this problem.

Verify:
AC213

Change-Id: Idac43674047ca9481154ef9054688e6ed66ae832
Signed-off-by: Peng Yixin <yixin.peng@amlogic.com>
5 years agomedia_module: h265 playback show some mosaic pictures [1/1]
Gan Zhang [Wed, 30 Oct 2019 06:48:42 +0000 (14:48 +0800)]
media_module: h265 playback show some mosaic pictures [1/1]

PD#IPTV-4309

Problem:
In stream mode,h265 format playback show some mosaic pictures.

Solution:
Optimize the logic of handling error frames to solve
this problem.

Verify:
AC213

Change-Id: Ibaf07e45557fdf597a48bab742a092942530608b
Signed-off-by: Gan Zhang <gan.zhang@amlogic.com>
5 years agovdec: remove some printings [1/1]
apollo.ling [Thu, 31 Oct 2019 07:14:26 +0000 (15:14 +0800)]
vdec: remove some printings [1/1]

PD#SWPL-15106

Problem:
h264 keep print "ref_pic_list_reordering error"

Solution:
remove some printings

Verify:
X301

Change-Id: Ic8f9bc0c1c536abd209775d4d1b501303fc4ef67
Signed-off-by: apollo.ling <apollo.ling@amlogic.com>
5 years agovdec: improve timeout handling for vmmpeg12/vmmh264/vmmh265 [1/1]
apollo.ling [Tue, 29 Oct 2019 09:33:17 +0000 (17:33 +0800)]
vdec: improve timeout handling for vmmpeg12/vmmh264/vmmh265 [1/1]
supplementary commit.

PD#SWPL-14196

Problem:
{stress test} trunk crash and watchdog reboot happen when
do DTV h264 2s channel switch and 15s suspend.(1/5,none)

Solution:
improve the timout handling mechanism

Verify:
X301

Change-Id: I7989ad2b015855d6cacec1c54e8e05d585c8934e
Signed-off-by: apollo.ling <apollo.ling@amlogic.com>
5 years agov4l: fixed some issues for v4l codec. [2/2]
Nanxin Qin [Mon, 19 Aug 2019 12:50:09 +0000 (20:50 +0800)]
v4l: fixed some issues for v4l codec. [2/2]

PD#SWPL-5313

Problem:
Decoder V4L2 interface Phase3(AFBC&MMU Support)

Solution:
1. fixed issue of the dpb size calc.
2. remove dpb size_margin and enable 4k.
3. fixed playback stuck when work on the muti-instance.
4. remove virt to phy address to avoid warring.
5. alloc the buf of v4l when it is about to decoding.
6. timestamp unsigned long int -> u64
7. add the common module of bitstream parser.
8. h264, vp9 & h265 supports playback with multi-resolution.
9. add mpeg12 mpeg4 and mjpeg for v4l codec.
10. supports single plane for the capture buffer.
11. only count capture buff with the mode mmap.
12. supports memory scatter for v4l codec.
13. supports ucode to parse params sets.
14. implement the interface of reset for h265 & vp9.
15. supports to switch picture formats nv12 & nv21

Verify:
u212

Change-Id: I1e7fb210e1a7c8acafa81ab6f30fd03a69b94c26
Signed-off-by: Nanxin Qin <nanxin.qin@amlogic.com>
5 years agovdec: avoid double release same resources [1/1]
apollo.ling [Thu, 17 Oct 2019 08:00:16 +0000 (16:00 +0800)]
vdec: avoid double release same resources [1/1]

PD#SWPL-10720

Problem:
Media AutoTest system met kernel crash and RAM DUMP

Solution:
check to avoid double release same resources

Verify:
P215

Change-Id: I58928ad333036aa4e146798f50764a9e201c4ecd
Signed-off-by: apollo.ling <apollo.ling@amlogic.com>
5 years agovdec: improve timeout handling for vmmpeg12/vmmh264/vmmh265 [1/1]
apollo.ling [Thu, 17 Oct 2019 12:31:08 +0000 (20:31 +0800)]
vdec: improve timeout handling for vmmpeg12/vmmh264/vmmh265 [1/1]

PD#SWPL-14196

Problem:
{stress test} trunk crash and watchdog reboot happen when
do DTV h264 2s channel switch and 15s suspend.(1/5,none)

Solution:
improve the timout handling mechanism

Verify:
X301

Change-Id: Id7bad614c3aff15630daef13ac598e3a86405e01
Signed-off-by: apollo.ling <apollo.ling@amlogic.com>
5 years agoamports: audio: Add mutex lock protect for audio port reset [1/1]
Zhizhong Zhang [Fri, 25 Oct 2019 05:22:58 +0000 (13:22 +0800)]
amports: audio: Add mutex lock protect for audio port reset [1/1]

PD#OTT-6893

Problem:
System restart after launch/exit LiveTv multiple

Solution:
Add mutex lock protect for audio port reset

Verify:
patch build of U212

Change-Id: Id175422a3c829e23b59927aea6c60e8818b9dd37
Signed-off-by: Zhizhong Zhang <zhizhong.zhang@amlogic.com>
5 years agompeg2: fix mosaics when set error_skip. [1/1]
shihong.zheng [Fri, 25 Oct 2019 03:30:13 +0000 (11:30 +0800)]
mpeg2: fix mosaics when set error_skip. [1/1]

PD#SWPL-12375

Problem:
mpeg2 mosaics after set error_frame_skip_level to 2.
a error p frame store to ref list, so have not set
error skip flag in error_skip(). the next mosaic b frame
display before p.

Solution:
set b frame error when error p in ref list.
set error_frame_skip_level to 2 default.

Verify:
u212

Change-Id: Ide23f0cf8a5f6ef72e1a6a6e129a7f7f1ef658fa
Signed-off-by: shihong.zheng <shihong.zheng@amlogic.com>
5 years agomh264: reload ucode when decode error. [1/1]
shihong.zheng [Thu, 24 Oct 2019 09:31:28 +0000 (17:31 +0800)]
mh264: reload ucode when decode error. [1/1]

PD#SWPL-14162

Problem:
h264 can not decode out frame when reboot or
hot plug signal cable.
pmem ucode may switch to swap code. and decode
timeout or other error, then amvdec_stop, the
pmem ucode cannot start decode when start next
frame, so need reload ucode.

Solution:
reload ucode to avoid the swap code in pmem when
start decode.

Verify:
x301

Change-Id: Id55054599b90b2baab5d5a0ccff191e1186a03ad
Signed-off-by: shihong.zheng <shihong.zheng@amlogic.com>
5 years agovmh264: fix error frame detect issue [1/1]
Hui Zhang [Sun, 29 Sep 2019 08:46:04 +0000 (16:46 +0800)]
vmh264: fix error frame detect issue [1/1]

PD#SWPL-12967

Problem:
in frame mode, some pic miss stream data, which may cause
data_request from hw, but driver think it is data not comming
,not skip this error frame

Solution:
in frame mode, change data_reqest handle to pic_done. driver
will check if there is error with mb number. the error will
be detected

Verify:
AC-213

Change-Id: I186c6149fc6802fbd4636f4e02b1ea787fba85be
Signed-off-by: Hui Zhang <hui.zhang@amlogic.com>
5 years agomedia_module: tiny h264 stream decode error [1/1]
Gan Zhang [Tue, 8 Oct 2019 05:14:40 +0000 (13:14 +0800)]
media_module: tiny h264 stream decode error [1/1]

PD#SWPL-13083

Problem:
tiny h264 stream decode error

Solution:
disable this read cache when frame width <= 64
IQIDCT_CONTROL, bit[16] â€“ dcac_dma_read_cache_disable

Verify:
AC213

Change-Id: I8a07b70347b335709ebe7be44735f6aa667801c6
Signed-off-by: Gan Zhang <gan.zhang@amlogic.com>
5 years agomedia_module: fixed mpeg2 playback stuck issue [1/1]
Peng Yixin [Tue, 10 Sep 2019 11:54:06 +0000 (19:54 +0800)]
media_module: fixed mpeg2 playback stuck issue [1/1]

PD#OTT-5167

Problem:
mpeg2 formate playback stuck when switch channel.

Solution:
Modify the condition to trigger decoder timeout to
resolve this problem.

Verify:
U212

Change-Id: I2642a90f9debd1dcc656581c0771c0f1d8a640d0
Signed-off-by: Peng Yixin <yixin.peng@amlogic.com>
5 years agodvb: support two si2168(si2151/av2018) [1/3]
Chuangcheng Peng [Mon, 30 Sep 2019 05:52:17 +0000 (13:52 +0800)]
dvb: support two si2168(si2151/av2018) [1/3]

PD#SWPL-13198

Problem:
support U212-D814

Solution:
support U212-D814

Verify:
verify at u212-D814

Change-Id: Iede357c8cdfa24975db9d19f1f5121a51a48c85a
Signed-off-by: Chuangcheng Peng <chuangcheng.peng@amlogic.com>
5 years agoMerge "h264: h264 dpb_print error. [1/1]" into amlogic-4.9-dev
Hui Zhang [Mon, 30 Sep 2019 02:16:04 +0000 (19:16 -0700)]
Merge "h264: h264 dpb_print error. [1/1]" into amlogic-4.9-dev

5 years agoMerge "media: h264 encoder add svc feature [1/1]" into amlogic-4.9-dev
Zhi Zhou [Sun, 29 Sep 2019 11:16:38 +0000 (04:16 -0700)]
Merge "media: h264 encoder add svc feature [1/1]" into amlogic-4.9-dev

5 years agomedia_module: h264 add force modify canvas mode node [1/1]
Peng Yixin [Fri, 27 Sep 2019 07:48:39 +0000 (15:48 +0800)]
media_module: h264 add force modify canvas mode node [1/1]

PD#NONE

Problem:
Cannot modify canvas mode with node.

Solution:
Add logic to solve this problem.

Verify:
u212

Change-Id: I487fa2d50b60f7bdfb309fd9f2a18e42c9658956
Signed-off-by: Peng Yixin <yixin.peng@amlogic.com>
5 years agomedia_module: add without display node [1/1]
Peng Yixin [Fri, 14 Dec 2018 09:26:26 +0000 (17:26 +0800)]
media_module: add without display node [1/1]

PD#IPTV-4140

Problem:
There are no nodes to test for decoding performance without display.

Solution:
Add without display node to resolve this issue.

Verify:
u212

Change-Id: Idec4b174f194dd719853cae7fd8fdbe56f54f816
Signed-off-by: Peng Yixin <yixin.peng@amlogic.com>
5 years agoh264: h264 dpb_print error. [1/1]
shihong.zheng [Fri, 27 Sep 2019 04:33:24 +0000 (12:33 +0800)]
h264: h264 dpb_print error. [1/1]

PD#SWPL-14595

Problem:
h264 crash when ref list error.

Solution:
format print error fix.

Verify:
u212

Change-Id: Ifb40e465d5b7c536351dec8e0df4b932a76dd8dd
Signed-off-by: shihong.zheng <shihong.zheng@amlogic.com>
5 years agomedia_module: the screen freeze when stream mode playback [1/1]
Peng Yixin [Wed, 18 Sep 2019 12:09:10 +0000 (20:09 +0800)]
media_module: the screen freeze when stream mode playback [1/1]

PD#SWPL-13053

Problem:
Keeps entering the logic that waits for more data
to decode, but never gets more data, it cause the
screen freeze.

Solution:
Modify wait more data's logic to solve this problem.

Verify:
u212

Change-Id: I51091939dcdc0ff9bbf4ea00295b9bc87b5ff213
Signed-off-by: Peng Yixin <yixin.peng@amlogic.com>
5 years agodecoder: fix mpeg4 multi frames in packet consume data abnormal. [1/1]
shihong.zheng [Wed, 25 Sep 2019 11:53:58 +0000 (19:53 +0800)]
decoder: fix mpeg4 multi frames in packet consume data abnormal. [1/1]

PD#TV-10609

Problem:
1. mpeg4 video black screen 20s at start. bug when deal with
frames size less than 8 bytes in one packets.
2. mpeg2 1088 height error.

Solution:
1. no need set back align bytes when consume byte less then 8.
2. mpeg2 1080 height limit modify to 1088.

Verify:
x301

Change-Id: Ia05018c04fc0224ee66071add819759243477bbd
Signed-off-by: shihong.zheng <shihong.zheng@amlogic.com>
5 years agomedia_modules: h265 format playback appears mosaic [1/1]
Peng Yixin [Wed, 18 Sep 2019 13:29:36 +0000 (21:29 +0800)]
media_modules: h265 format playback appears mosaic [1/1]

PD#SWPL-13111

Problem:
Garbage image is observed after forwarding/rewinding.
The HEVC decoder working buffer has missing initializing
before decoding and it may cause decoder internal
wrong state and generate bad output.

Solution:
Clear decoder internal working buffer before decoding.

Verify:
U212

Change-Id: Ie3b942bbbf9470d1869cb2f4e20647e9dbbea86a
Signed-off-by: Peng Yixin <yixin.peng@amlogic.com>
5 years agovmh264: fixed playback for the interlace source. [1/1]
Nanxin Qin [Mon, 17 Jun 2019 13:33:35 +0000 (21:33 +0800)]
vmh264: fixed playback for the interlace source. [1/1]

PD#OTT-4563

Problem:
1080i-25-H264.mkv playback failed,no video and audio

Solution:
fixed playback for the interlace source.

Verify:
w400

Change-Id: Ie01282e4173b51f62165ebcbbffb0e7f55c58025
Signed-off-by: Nanxin Qin <nanxin.qin@amlogic.com>
5 years agoesparser: fix address mapping warning [1/1]
Song Zhao [Thu, 12 Sep 2019 20:40:51 +0000 (13:40 -0700)]
esparser: fix address mapping warning [1/1]

PD#TV-10166

Problem:
End of AIU buf are not mapped.

Solution:
Avoid converting it to virtual address

Verify:
T962E2

Change-Id: I7ca5d8f987773cb96970a3f3f6bf7f10b28c0889
Signed-off-by: Song Zhao <song.zhao@amlogic.com>
5 years agovmh264: fix memory pollution issue caused by LMEM DMA [1/1]
Hui Zhang [Thu, 12 Sep 2019 05:59:39 +0000 (13:59 +0800)]
vmh264: fix memory pollution issue caused by LMEM DMA [1/1]

PD#SWPL-14018

Problem
LMEM DMA caused memory pullotion

Solution:
read LMEM dma address from scratch regiest directly

ucode gerrit: 85777
ucode change id: I98ef
ucode commit id: ee37df

Verify:
X301

Change-Id: I25f129dc1d8b4f77633fbdf49c43794e2b7fe2bf
Signed-off-by: Sandy Luo <sandy.luo@amlogic.com>
5 years agovmh264: fix StreamSpark{8669-128} playback not smooth issue [1/1]
Hui Zhang [Sat, 14 Sep 2019 10:03:37 +0000 (18:03 +0800)]
vmh264: fix StreamSpark{8669-128} playback not smooth issue [1/1]

PD#SWPL-10335

Problem:
default value of start_decode_buf_level is big and
cause too much time cost on check run ready. decoding
output is not quick. and display not smooth

Solution:
change start_decode_buf_level to 0x4000

Verify:
R314

Change-Id: Ia09432495dababcb51964b4d05e05bd9bfcda8ec

5 years agovmh264: fix pic discard issue [1/1]
Hui Zhang [Fri, 13 Sep 2019 09:30:26 +0000 (17:30 +0800)]
vmh264: fix pic discard issue   [1/1]

PD#SWPL-10954

Problem:
in reference list error, it will cause bufmgr reset
and discard more frames.

Solution:
1) not to do bufmgr for each reference list error.
2) change flag to NODISP for reference list error

Verify:
r314

Change-Id: Icab4dd31ca0674584e046c434e4702929c142dc8
Signed-off-by: Hui Zhang <hui.zhang@amlogic.com>
5 years agovh265: fix seek mosaic issue [1/1]
Hui Zhang [Thu, 12 Sep 2019 04:54:05 +0000 (12:54 +0800)]
vh265: fix seek mosaic issue   [1/1]

PD#SWPL-14049

Problem:
there is mosaic in screeen when ff/ff or seek

Solution:
not to do error flush until first pic decoded

Verify:
r314

Change-Id: Idd0499add7040ff5bb059ebdc0db16d6680a4600
Signed-off-by: Hui Zhang <hui.zhang@amlogic.com>
5 years agovmh264: fix memory pollution issue caused by DCAC DMA [1/1]
Hui Zhang [Mon, 9 Sep 2019 08:59:43 +0000 (16:59 +0800)]
vmh264: fix memory pollution issue caused by DCAC DMA  [1/1]

PD#SWPL-13280

Problem:
DCAC dma address is invalid. cause memory pollution

Solution:
read mem_offset from SCRATCH register directly. because
some corner cases, mem_offset will be set to 0. it will
cause DMA Address outof range

ucode gerrit: 85293
ucode change id: I4b82d
ucode commit id: 5aed5

Verify:
x301

Change-Id: Ifdadb92c0f86e5ed2e6f23cbb4d43e8a9544c23e
Signed-off-by: Hui Zhang <hui.zhang@amlogic.com>
5 years agovmh264: fix frame drop issue in nts [1/1]
Hui Zhang [Thu, 5 Sep 2019 11:38:38 +0000 (19:38 +0800)]
vmh264: fix frame drop issue in nts [1/1]

PD#SWPL-13465

Problem:
force di happaned when resolution changed,which
cause frame drop in nts

Solution:
disable force di in secure mode

Verify:
U212

Change-Id: Ie19edacef07c46ac3eb39385b674a1d366c3c3c3
Signed-off-by: Hui Zhang <hui.zhang@amlogic.com>
5 years agoaats: fix mpeg2 and avs frame check fail. [1/1]
Gan Zhang [Mon, 2 Sep 2019 09:58:54 +0000 (17:58 +0800)]
aats: fix mpeg2 and avs frame check fail. [1/1]

PD#NONE

Problem:
On X301 platform, the avs code stream has random frame errors.
On AB301 platform, 64bit code mpeg2 flush size is small.

Solution:
1.Flush dcache buffer is used to ensure the correctness of data to
solve the problem of random frame check error of avs code stream.
2.By changing the y and uv sizes of canvas, the frame calibration error
caused by mpeg2 code stream in 64-bit system due to canvas buffer can be solved.

Verify:
x301,ab311

Change-Id: I7017a2b6768e73b8335ea6785f0cb4aeb12f466f
Signed-off-by: Gan Zhang <gan.zhang@amlogic.com>
5 years agomedia_module: fixed gts h264 crash issue [1/1]
Peng Yixin [Mon, 29 Jul 2019 11:34:53 +0000 (19:34 +0800)]
media_module: fixed gts h264 crash issue [1/1]

PD#SWPL-9611

Problem:
gts test crash.
Due to an internal scheduling problem with 264,
the state is unnormal, causeing kernel crash.

Solution:
Let it not exit the decoding schedule when
DEC_RESULT_CONFIG_PARAM logic in vh264_work.

Verify:
S805Y_P244

Change-Id: I3019e88695aec9f6ca4f7e87a3bb3b67b921d672
Signed-off-by: Peng Yixin <yixin.peng@amlogic.com>
5 years agoQ-bringup: modify makefile for build and boot succeed [5/8]
Shuide Chen [Fri, 28 Dec 2018 05:31:40 +0000 (13:31 +0800)]
Q-bringup: modify makefile for build and boot succeed [5/8]

PD#SWPL-3168

Problem:
cannot build media modules

Solution:
fix build requirement for Q, as:
https://android.googlesource.com/platform/build/+/master/Changes.md

Verify:
locally and patchbuild.

Change-Id: I2dda5a4804bd8ceb09fbba4a88fb0faebaa13147
Signed-off-by: Shuide Chen <shuide.chen@amlogic.com>
Signed-off-by: Tellen Yu <tellen.yu@amlogic.com>
5 years agovh265: fix h265 playback stutter issue [1/1]
Hui Zhang [Sat, 31 Aug 2019 03:01:57 +0000 (11:01 +0800)]
vh265: fix h265 playback stutter issue  [1/1]

PD#SWPL-12773

Problem:
when play back to start in dvb, there is error in stream.
it caused poc issue and output is not in correct order

Solution:
add check for poc. once there is some errors. for ex:
new poc more less than pre poc. and it is idr pic.
decoder need to do a flush first. and start decoding
from new poc

Verify:
x301

Change-Id: I04b4086a9a08d195e5453fe8cc765c3303e2a369
Signed-off-by: Hui Zhang <hui.zhang@amlogic.com>
5 years agomedia_module: fixed screen static when play PIP local content [1/1]
Peng Yixin [Thu, 27 Jun 2019 03:11:41 +0000 (11:11 +0800)]
media_module: fixed screen static when play PIP local content [1/1]

PD#OTT-4677

Problem:
Multi-channel local playback of different format,
one channel will stuck when seek another channel. The
uncorrect ucode was loaded due to a logic problem, which
caused playback stuck.

Solution:
The loading ucode logic was modified to
solve this problem.
When core->last_vdec=null, set vdec->mc_loaded = 0,
the ucode will be loaded correctly.

Verify:
u212

Change-Id: Ib9ec52329138b58410079ab0a801e03a6f471e5d
Signed-off-by: Peng Yixin <yixin.peng@amlogic.com>
5 years agoh264: play some video mosaics on dvb. [1/1]
shihong.zheng [Fri, 23 Aug 2019 09:17:16 +0000 (17:17 +0800)]
h264: play some video mosaics on dvb. [1/1]

PD#TV-7574

Problem:
some mosaics when play dvb bitstream.

Solution:
1. reset bufmgr when dec_dpb_status is timeout;
2. clear mv buf after alloc, it may mosaic after reset;
3. set error flag when decode_mb_count less than
   first_mb_in_slice * (1 + mbaff_frame_flag).

Verify:
T972

Change-Id: Ic2ca584a70bb0243e9d4262232df0ae3e51295ad
Signed-off-by: shihong.zheng <shihong.zheng@amlogic.com>
5 years agovh265: can't playback issue on R314 [1/1]
Hui Zhang [Wed, 21 Aug 2019 10:35:02 +0000 (18:35 +0800)]
vh265: can't playback issue on R314  [1/1]

PD#SWPL-13016

Problem:
h265 gxl based ucode size overflow, cause can't playback
caused by TV8081 commit

Solution:
fix size over flow issue, remove some nop

ucode gerrit: 83642
ucode change id : I22a4b
ucode commit id: 8263b2

Verify:
R314

Change-Id: I68e319c3326461bbf9f172012dfd24ba3834ba0f
Signed-off-by: Hui Zhang <hui.zhang@amlogic.com>
5 years agoRevert "vh265: fix h265 playback stutter issue [1/1]"
Hui Zhang [Wed, 21 Aug 2019 08:48:23 +0000 (16:48 +0800)]
Revert "vh265: fix h265 playback stutter issue  [1/1]"

This reverts commit 4dac82134254e061cb40a23b856cd6896eea56c8.

Change-Id: I60cf2f0f0ed7b3afa8f00a271e86dcd2318aaf6a

5 years agovmh264: avoid the used_size becoming negative. [1/1]
Nanxin Qin [Mon, 12 Aug 2019 09:51:06 +0000 (17:51 +0800)]
vmh264: avoid the used_size becoming negative. [1/1]

PD#SWPL-9472

Problem:
h264 ANR issue when DTV weak signal

Solution:
avoid the used_size becoming negative.

Verify:
x301

Change-Id: Ib61d1dc942faa7f60e6548f0134ecc86e3944dbc
Signed-off-by: Nanxin Qin <nanxin.qin@amlogic.com>
5 years agovh265: fix h265 playback stutter issue [1/1]
Hui Zhang [Sun, 18 Aug 2019 08:34:13 +0000 (16:34 +0800)]
vh265: fix h265 playback stutter issue  [1/1]

PD#SWPL-12773

Problem:
when play back to start in dvb, there is error in stream.
it caused poc issue and output is not in correct order

Solution:
add check for poc. once there is some errors. for ex:
new poc more less than pre poc. and it is idr pic.
decoder need to do a flush first. and start decoding
from new poc

Verify:
x301

Change-Id: I5442f1b120b0c94aafed6078190a8dfc689b47b1
Signed-off-by: Hui Zhang <hui.zhang@amlogic.com>
5 years agoesparser: fix vp9 play abnormal. [1/1]
shihong.zheng [Sat, 17 Aug 2019 07:33:21 +0000 (15:33 +0800)]
esparser: fix vp9 play abnormal. [1/1]

PD#SWPL-12692

Problem:
vp9 play abnormal, data dropped at end
when threadrw workqueue wirte bitstream.
int type implicit convert to size_t when
compare with size_t type.

Solution:
firstly check ret less than 0, avoid
complicit convert to size_t int 64bit
when compare with left which is size_t type.

Verify:
p212

Change-Id: I8942ea23c2e711d084971bbbde63e3374b4a9b6b
Signed-off-by: shihong.zheng <shihong.zheng@amlogic.com>
5 years agohevc_core: fix crash issue caused by mpred dma. [1/1]
Hui Zhang [Tue, 20 Aug 2019 00:34:59 +0000 (08:34 +0800)]
hevc_core: fix crash issue caused by mpred dma. [1/1]

PD#TV-8081

Problem:
for some serious error h265 stream. it might set HEVC_MPRED_TILE_SIZE_LCU
to 0. and it caused :

1) Zero tile size will cause end address result wrong
2) Zero tile size will cause Mpred AXI write address offset wrong

it will cuase mpred dma out of range and memory poluation

Solution:
add a check for non-Zero before to set HEVC_MPRED_TILE_SIZE_LCU  register.
if 0. decoder will stop to go ahead to avoid invalid processing

ucode gerrit id: 83256
ucode change id: I4bd85
ucode commit id: 91e8ea

Verify:
X301

Change-Id: Ia72791fd7e6699a91f492fd0e5c5d10457c0c741
Signed-off-by: Hui Zhang <hui.zhang@amlogic.com>
5 years agodemux: add reset flag for iptv [1/1]
Chuangcheng Peng [Fri, 16 Aug 2019 03:00:12 +0000 (11:00 +0800)]
demux: add reset flag for iptv [1/1]

PD#168964

Problem:
iptv need reset all demux

Solution:
add demux_reset_all_flag node

Verify:
verify at R311

Change-Id: I78da0a67833752a58dbeab7839f98ed77c469c44
Signed-off-by: Chuangcheng Peng <chuangcheng.peng@amlogic.com>
5 years agomedia: h264 encoder add svc feature [1/1]
yongchun.li [Sat, 27 Jul 2019 03:00:20 +0000 (20:00 -0700)]
media: h264 encoder add svc feature [1/1]

PD#SH-703

Problem:
Need SVC feature for customer project

Solution:
Support SVC feature on G12A/B h264 encoder
  add module parameters to enable and config it.

Config:Set how many continously non-reference P frames.
between two reference frames. 1 here as example
echo 1 > /sys/module/encoder/parameters/svc_ref_conf
To enable:
echo 1 > /sys/module/encoder/parameters/svc_enable

open device and encode as needed.

for multi-instances with different configration,
just configure/enable/change before open the
device for that instance.

Verify:
G12B W400

Change-Id: Ib7992db9fea994d6b2760fda58a7f19e4d509b3e
Signed-off-by: yongchun.li <yongchun.li@amlogic.com>
5 years agomedia_modules: add dec slt test code. [2/3]
shihong.zheng [Fri, 2 Aug 2019 09:39:45 +0000 (17:39 +0800)]
media_modules: add dec slt test code. [2/3]

PD#OPS-679

Problem:
add dec slt test code.

Solution:
add slt test interface in amstream and frame check.

Verify:
x301

Change-Id: Ia44ebc862d194b4175a38b211f95124e3b304404
Signed-off-by: shihong.zheng <shihong.zheng@amlogic.com>
5 years agovp9: fix vp9 display abnormal when double write 0x10. [1/1]
shihong.zheng [Fri, 26 Jul 2019 09:34:29 +0000 (17:34 +0800)]
vp9: fix vp9 display abnormal when double write 0x10. [1/1]

PD#SWPL-11767

Problem:
1. vp9 display abnormal when double write 0x10, function
   get_double_write_mode return 1 before frame valid;
2. some h264 video can not play in single mode.

Solution:
1. return valid double write mode when it mask by 0x300;
2. clear AV_STRATCH_J to end the userdata wait loop.

Verify:
u212

Change-Id: Ib7ae2c164393bdd1c665cbb1e298ebd38b23b705
Signed-off-by: shihong.zheng <shihong.zheng@amlogic.com>
5 years agodemux: add license for source file. [1/1]
Chuanzhi Wang [Thu, 25 Jul 2019 02:56:34 +0000 (10:56 +0800)]
demux: add license for source file. [1/1]

PD#SWPL-11719

Problem:
clean no license source file.

Solution:
add  license for source file.

Verify:
r314

Change-Id: I13ba77b78dab2f963af8219cd3173decd3bfb519
Signed-off-by: chuanzhi.wang <chuanzhi.wang@amlogic.com>
5 years agovvp9: enable low-latency mode by default [1/1]
Hui Zhang [Tue, 25 Jun 2019 01:28:03 +0000 (09:28 +0800)]
vvp9: enable low-latency mode by default [1/1]

PD#GH-51

Problem:
there is a little delay in vp9 decoder output

Solution:
enable low-latency mode by default in driver

Verify
X301

Change-Id: I6ddea36ad37dc7ac5c9a125cf33d41adecffdbcb
Signed-off-by: Hui Zhang <hui.zhang@amlogic.com>
5 years agomedia_module: control CAM throw mcu and used api to control mcu. [1/1]
hualing chen [Tue, 30 Jul 2019 08:51:39 +0000 (16:51 +0800)]
media_module: control CAM throw mcu and used api to control mcu. [1/1]

PD#SWPL-10659

Problem:
spi_regist_boardinfo is changed,we need used amlogic spi regist api.

Solution:
1 change "spi_register_board_info" to "dirspi_register_board_info".

Verify:
verified on t962x3-t312 box.

Change-Id: I49a2769e368ce0124f381397c8b356ad14e1c785
Signed-off-by: hualing chen <hualing.chen@amlogic.com>
5 years agompeg2: fix mpeg2 disp error when switch resolution. [1/1]
shihong.zheng [Wed, 17 Jul 2019 07:07:46 +0000 (15:07 +0800)]
mpeg2: fix mpeg2 disp error when switch resolution. [1/1]

PD#SWPL-11133

Problem:
mpeg2 display picture overlapping when switch resolution.
it cause by ucode do not parse new seq header after save
context when seq end.

Solution:
1. update width and height for every pic;
2. do not save context but userdata buf wp when seq end,
   if not save userdata wp, userdata buf wp will be new
   and data may be dropped;
3. set second field pts zero.
ucode gerrit id: 80391
ucode change id: I8826818

Verify:
T962X-R314

Change-Id: Ifd3f24dad2909d2f914b95880011a816574e76f5
Signed-off-by: shihong.zheng <shihong.zheng@amlogic.com>
5 years agomedia_module: clean no license source file [1/1]
Gan Zhang [Mon, 29 Jul 2019 08:26:15 +0000 (16:26 +0800)]
media_module: clean no license source file [1/1]

PD#SWPL-11720

Problem:
clean no license source file.

Solution:
Add license information to the source file.

Verify:
U212

Change-Id: I928f2dd834b98bba6f3722d1146887896a1c0e49
Signed-off-by: Gan Zhang <gan.zhang@amlogic.com>
5 years agomedia_module: control CAM throw mcu and used api to control mcu. [3/9]
hualing chen [Wed, 3 Jul 2019 05:39:11 +0000 (13:39 +0800)]
media_module: control CAM throw mcu and used api to control mcu. [3/9]

PD#SWPL-10659

Problem:
not support control mcu by spi and rw cam card by spi mode.
not support ts3 port.

Solution:
1 add control mcu function and rw cam card api.
2 add ts3 port support.
3 add en50221 funtion for mcu mode.

Verify:
verified on t962x3-t312 box.

Change-Id: If87964cc26feed0145bb8ee8d57316c45f6342c2
Signed-off-by: hualing chen <hualing.chen@amlogic.com>
5 years agosecure: Buffer overflow in amstream driver (due to integer overflow) [1/1]
apollo.ling [Wed, 24 Jul 2019 02:41:42 +0000 (10:41 +0800)]
secure: Buffer overflow in amstream driver (due to integer overflow) [1/1]

PD#OTT-5057

Problem:
When convert 64bit to 32bit, truncation happens

Solution:
avoid the truncation

Verify:
u212

Change-Id: I864171be1ffc918cd37e175e2a121a40fbe18dc4
Signed-off-by: apollo.ling <apollo.ling@amlogic.com>
5 years agompeg4: fix a mpeg4 stream can not play on sm1. [1/1]
shihong.zheng [Wed, 24 Jul 2019 03:28:46 +0000 (11:28 +0800)]
mpeg4: fix a mpeg4 stream can not play on sm1. [1/1]

PD#SWPL-10461

Problem:
mpeg4 can not play, there are some errors at the
begin of stream. decoder timeout repeatly.

Solution:
1. add some reset bit on sm1 vdec;
2. clear workspace buf at first run;
3. do not run one packet multi-frames code before first i ready.

Verify:
AC213, U212

Change-Id: I3195c430aa9c7660006ad6f3b9d1a7d90411ad16
Signed-off-by: shihong.zheng <shihong.zheng@amlogic.com>
5 years agomedia_module: fix put_timer_func crash issue [1/1]
Hui Zhang [Mon, 3 Jun 2019 05:09:30 +0000 (13:09 +0800)]
media_module: fix put_timer_func crash issue [1/1]

PD#OTT-4243

Problem:
backend transfer an invalid vf pointer to decoder.
and make system crash

Solution:
add vf invalid check in vf_put to skip invalid vf pointer

Verify:
s805x

Change-Id: Ie9ed298e6cee294946d9db568d5a48f7003e330c
Signed-off-by: Hui Zhang <hui.zhang@amlogic.com>
5 years agobuild: fix uninitialized-use when build with prebuilt toolchain [1/1]
Chia-hung Duan [Wed, 3 Jul 2019 06:25:31 +0000 (14:25 +0800)]
build: fix uninitialized-use when build with prebuilt toolchain [1/1]

PD#SWPL-8241

Problem:
**SYNC from GOOGLE**
Build failed due to uninitialzed variable

Solution:
Init to reasonable value

Verify:
Build with Android prebuilt toolchain

Change-Id: Ieb8cd73d357c64dd3629079fc9a2a86c60717ebf
Reviewed-on: https://eureka-partner-review.googlesource.com/c/amlogic/media_modules/+/132909
Tested-by: Ben Cheng <bccheng@google.com>
Reviewed-by: Ben Cheng <bccheng@google.com>
Commit-Queue: Ben Cheng <bccheng@google.com>

5 years agomh264: fix h264 aspect ratio error. [1/1]
shihong.zheng [Mon, 1 Jul 2019 08:48:43 +0000 (16:48 +0800)]
mh264: fix h264 aspect ratio error. [1/1]

PD#SWPL-10327

Problem:
h264 multi intance aspect ratio wrong.
aspect ratio is calc in back end now. in vui_config func,
no calculation about h264_ar in most case, just set it to 0x3ff.
when dtv get it from vdecstat by ioctl, aspect ratio will be wrong.

Solution:.
porting the calculation of aspect ratio to vdec_status
from single mode.

Verify:
x301

Change-Id: Ib8e44b0995f46d18c30d202d6c17faefe6e2257f
Signed-off-by: shihong.zheng <shihong.zheng@amlogic.com>
5 years agodecoder: fix mpeg4 timeout and mosaic long time test. [1/1]
shihong.zheng [Mon, 8 Jul 2019 12:28:26 +0000 (20:28 +0800)]
decoder: fix mpeg4 timeout and mosaic long time test. [1/1]

PD#OTT-4817

Problem:
decode timeout,display mosaic.

Solution:
1. update the time threshold to timeout process;
2. flush workspace buf when start decode frame.
3. add frame_num and input chunk size&chksum log print when timeout.
4. fix the bugs of timeout in 64bit.
5. change dpb num from 4 to 8.

Verify:
G12B-W400

Change-Id: If5f1ca84610139cadc8c809b7c3a5005fd33452c
Signed-off-by: shihong.zheng <shihong.zheng@amlogic.com>
5 years agovmh264: fix gts fail issue. [1/1]
Hui Zhang [Fri, 19 Jul 2019 08:30:30 +0000 (16:30 +0800)]
vmh264: fix gts fail issue. [1/1]

PD#SWPL-9414

Problem:
sometimes there is search empty happened in first frame
in frame mode which lead first header been missed and cause
gts fail

Solution:
skip search empty before header parsered in frame mode
ucode gerrit: 78236
ucode change id: Ie21c0
ucode commit id: 6e5e0

Verify:
U221

Change-Id: I321348e923e0877ced61f172b3e1614f318e2cb0
Signed-off-by: Hui Zhang <hui.zhang@amlogic.com>
5 years agomedia_module: fixed h265 playback stuck issue [1/1]
Peng Yixin [Wed, 26 Jun 2019 03:30:09 +0000 (11:30 +0800)]
media_module: fixed h265 playback stuck issue [1/1]

PD#SWPL-9615

Problem:
h265 format playback stuck.

Solution:
When video file has some error, there is a problem with the buffer
management and no buffer is available for decode. Fix this problem
by forcing released the lowest poc incorrect ref buffer while stuck.

Verify:
u212

Change-Id: Ie7f91d7694083f7578b669111d86da6c4733b0d6
Signed-off-by: Peng Yixin <yixin.peng@amlogic.com>
5 years agovmh264: fix video quality issue [1/1]
Hui Zhang [Tue, 16 Jul 2019 09:05:03 +0000 (17:05 +0800)]
vmh264: fix video quality issue [1/1]

PD#SWPL-10667

Problem:
force di cause bad video qulity for some progressive
source.

Solution:
add more condition constraint force di

Verify:
x301

Change-Id: I77125e3a086905c36127c922e112c442e61a3a15
Signed-off-by: Hui Zhang <hui.zhang@amlogic.com>
5 years agoci: incorrect code sequence [1/1]
Zhiqiang Han [Fri, 17 May 2019 02:48:09 +0000 (10:48 +0800)]
ci: incorrect code sequence [1/1]

PD#SWPL-8317

Problem:
incorrect code sequence introduced NULL pointer

Solution:
set target 1st, then arm the operater
cut the func_p off when exit, because the thread not stopped
fixed conflict status value

Verify:
Patchbuild on R314

Change-Id: I9c88e244baa9f2f91eddb1753550a7e310333c44
Signed-off-by: Zhiqiang Han <zhiqiang.han@amlogic.com>
5 years agovh265: fix repeatly print no mem for amvdec_h265. [1/1]
shihong.zheng [Mon, 10 Jun 2019 06:02:37 +0000 (14:02 +0800)]
vh265: fix repeatly print no mem for amvdec_h265. [1/1]

PD#SWPL-8803

Problem:
repeatly print no mem error cause system block.

Solution:
set no mem error, return from repeatly alloc.

Verify:
x301

Change-Id: Ib978f6bf72a968c7bd0e08bbcfa5109a8a6f4393
Signed-off-by: shihong.zheng <shihong.zheng@amlogic.com>
5 years agovmh264: reset bufmgr when ref error happaned [1/1]
Hui Zhang [Mon, 8 Jul 2019 06:56:29 +0000 (14:56 +0800)]
vmh264: reset bufmgr when ref error happaned [1/1]

PD#SWPL-10897

Problem:
hot-plug dvb cable cause video decoder error and not
frame output

Solution:
enable bufmgr reset  when reference error happend

Verify:
x301

Change-Id: I9cf1e39e5e3b1bf1f8f7de78877fda8f3a294b11
Signed-off-by: Hui Zhang <hui.zhang@amlogic.com>
5 years agovmh264: fix decoding error issue. [1/1]
Hui Zhang [Wed, 10 Jul 2019 02:38:59 +0000 (10:38 +0800)]
vmh264: fix decoding error issue. [1/1]

PD#OTT-4903

Problem:
there is a bug in vmh264 multi-slice in frame mode if
more slice in one package. decoder will return empty
when first slice not decoded completely. it will cause
this frame decode error happened

Solution:
change code to return empty directly only in pic_done
ucode gerrit id: 79737
ucode change id: I00dc
ucode commit id: f44ba
Verify:
x301

Change-Id: If859f1f93481e431c00d78a80e2993fb8568b82d
Signed-off-by: Hui Zhang <hui.zhang@amlogic.com>
5 years agomedia: support stream mode for AVS multi-instance [1/4]
Peng Yixin [Fri, 17 May 2019 09:04:34 +0000 (17:04 +0800)]
media: support stream mode for AVS multi-instance [1/4]

PD#SWPL-5860

Problem:
Decoder cannot support stream mode for AVS multi-instance.

Solution:
add C driver code and video_ucode.bin
ucode gerrit id: 74323
ucode change id: I6ae493b1ce8ee4494719d0af3cf636a8ca73de60

Verify:
U212

Change-Id: If3339d8c02e2d842a4c23d45154b5a2f7c289dfc
Signed-off-by: Peng Yixin <yixin.peng@amlogic.com>
5 years agoMerge "media_module: Decoder add scaling down config for 1080p(dw mode 0x300) [1...
Hui Zhang [Mon, 8 Jul 2019 08:15:30 +0000 (01:15 -0700)]
Merge "media_module: Decoder add scaling down config for 1080p(dw mode 0x300) [1/1]" into amlogic-4.9-dev

5 years agomedia_module: Decoder add scaling down config for 1080p(dw mode 0x300) [1/1]
apollo.ling [Wed, 3 Jul 2019 02:54:37 +0000 (10:54 +0800)]
media_module: Decoder add scaling down config for 1080p(dw mode 0x300) [1/1]

PD#SWPL-10642

Problem:
Add dw mode 0x300

Solution:
resolution>720p,vdec ratio 1/2,others vdec ratio 1/1

Verify:
franklin

Change-Id: Ibeb06fcea18f8fd61fa67153af9e8c4862b5bc27
Signed-off-by: apollo.ling <apollo.ling@amlogic.com>
5 years agovdec: add keep last pic mem_handle for multi instance. [1/1]
shihong.zheng [Thu, 20 Jun 2019 06:54:56 +0000 (14:54 +0800)]
vdec: add keep last pic mem_handle for multi instance. [1/1]

PD#IPTV-3280

Problem:
flash green screen when change to noraml play from fast forward.

Solution:
1. add mem_handle for keeper;
2. do not vmap cc phyaddr when tvp enable;
3. clear some debug code, optimize code.

Verify:
S905L3

Change-Id: I8d04c2859cb2b62588b5587494cd79c7c9c029ec
Signed-off-by: shihong.zheng <shihong.zheng@amlogic.com>
5 years agodvb: fix compile error about stack size [1/1]
Chuangcheng Peng [Thu, 4 Jul 2019 12:11:43 +0000 (20:11 +0800)]
dvb: fix compile error about stack size [1/1]

PD#SWPL-10868

Problem:
compile error about stack size

Solution:
demux compile use 32bit

Verify:
verify at R311

Change-Id: I8de7cf34e28136d7353014ffba2d8afa8800e59e
Signed-off-by: Chuangcheng Peng <chuangcheng.peng@amlogic.com>
5 years agovmh264: fixed playback not smooth issue. [1/1]
Hui Zhang [Wed, 3 Jul 2019 02:10:53 +0000 (10:10 +0800)]
vmh264: fixed playback not smooth issue. [1/1]

PD#SWPL-7105

Problem:
this stream pts not smooth which lead playback not smooth

Solution:
when pts is 0 and slice is B frame in one field. we use
duration to calulate a new pts

Verify:
x301

Change-Id: I4a5c947c762b9a3c5cbf68298b870290200391f2
Signed-off-by: Hui Zhang <hui.zhang@amlogic.com>
5 years agommpeg4: fix timeout repeatedly when vfifo empty. [1/1]
shihong.zheng [Wed, 3 Jul 2019 12:25:32 +0000 (20:25 +0800)]
mmpeg4: fix timeout repeatedly when vfifo empty. [1/1]

PD#SWPL-8550

Problem:
mpeg4 stuck, consuming input data,
decode timeout repeatedly.

Solution:
retry and result done if it can't dec out.
do not save incomplete context.
ucode gerrit id: 79111
ucode change id: I40176d

Verify:
x301

Change-Id: Ie2b18508ebba1891ea52d82898a762b281eb025e
Signed-off-by: shihong.zheng <shihong.zheng@amlogic.com>
5 years agomedia: Solve can not play encrypt video of youtube [1/1]
Peng Yixin [Fri, 24 May 2019 15:58:47 +0000 (23:58 +0800)]
media: Solve can not play encrypt video of youtube [1/1]

PD#SWPL-8977

Problem:
Can not play encrypt video of youtube

Solution:
Due to the competition, the number of input buff
was judged in the wrong position, cause nofurther scheduling.

Verify:
U212

Change-Id: If56cf9a4664d16520e54a2e327cf971e0481c17b
Signed-off-by: Peng Yixin <yixin.peng@amlogic.com>
5 years agovp9: fixed the issue of the driver probe fail. [1/1]
Nanxin Qin [Fri, 28 Jun 2019 03:06:27 +0000 (11:06 +0800)]
vp9: fixed the issue of the driver probe fail. [1/1]

PD#SWPL-10426

Problem:
the driver probe fail cause to can not playback.

Solution:
the max pic size with W & H need to config default value
to avoid the oversize checked fail.

Verify:
u212

Change-Id: I8a50e500810e4e6587eaf02a7410ce8649056775
Signed-off-by: Nanxin Qin <nanxin.qin@amlogic.com>
5 years agovmh264: fix multi-slice error detect issue [1/1]
Hui Zhang [Fri, 28 Jun 2019 10:00:41 +0000 (18:00 +0800)]
vmh264: fix multi-slice error detect issue [1/1]

PD#IPTV-3460

Problem:
error frame can't detect and display mosiac

Solution:
fix multi-slice error detect in code

Verify:
S905L3

Change-Id: Iad5767aa57933d5e0c74195f8fbaec69e23320f7
Signed-off-by: Hui Zhang <hui.zhang@amlogic.com>
5 years agomedia_modules: init Open dec_control force interlace [1/1]
Conglin Guo [Fri, 28 Jun 2019 02:25:06 +0000 (10:25 +0800)]
media_modules: init Open dec_control force interlace [1/1]

PD#SWPL-5950

Problem:
init Open dec_control force interlace.

Solution:
init Open dec_control force interlace.

Verify:
T962X2-X301

Change-Id: Ib26c95154ca313860bf1d7ace35e681df2ceafcb
Signed-off-by: Conglin Guo <conglin.guo@amlogic.com>
5 years agoMerge "media_module: add the instance id on the dump_vdec_chunks node [1/1]" into...
Hui Zhang [Fri, 28 Jun 2019 02:00:16 +0000 (19:00 -0700)]
Merge "media_module: add the instance id on the dump_vdec_chunks node [1/1]" into amlogic-4.9-dev

5 years agofirmware: optimize the fw mgt structure and update to ver v0.2. [1/5]
Nanxin Qin [Fri, 17 May 2019 19:22:52 +0000 (03:22 +0800)]
firmware: optimize the fw mgt structure and update to ver v0.2. [1/5]

PD#SWPL-8757

Problem:
1. the video firmware load rules improvement.
2. the video firmware date redundancy.

Solution:
1. support the parse of the duplicate fws.
2. add the firmware for avs multi-inst.
3. ucode commit id:
   577ef8dd6376f3b4d7ee213f2cbc53d7f51840b6

Verify:
x301

Change-Id: I1929ebb32037195135f3576c721d26ce6247c625
Signed-off-by: Nanxin Qin <nanxin.qin@amlogic.com>
5 years agomedia_module: add the instance id on the dump_vdec_chunks node [1/1]
Peng Yixin [Fri, 1 Mar 2019 12:56:06 +0000 (20:56 +0800)]
media_module: add the instance id on the dump_vdec_chunks node [1/1]

PD#SWPL-NONE

Problem:
Through the dump_vdec_chunks node, it is not clear know the
input buffer of video in each channel during multi-channel
playback.

Solution:
Adding the corresponding instance id of the input buffer to
solves this problem.

Verify:
u212

Change-Id: Ibdae99e6861a4ae3afb65b2487fcfd11655e8f20
Signed-off-by: Peng Yixin <yixin.peng@amlogic.com>
5 years agodvb: update CI & delete old CI [1/1]
Chuangcheng Peng [Mon, 24 Jun 2019 05:52:11 +0000 (13:52 +0800)]
dvb: update CI & delete old CI [1/1]

PD#SWPL-10195

Problem:
update ci & delete old CI

Solution:
update ci & delete old CI

Verify:
verify at R314

Change-Id: I0b4b5da35809500a67a52e74ae77a38f33a84d4c
Signed-off-by: Chuangcheng Peng <chuangcheng.peng@amlogic.com>