GitHub/LineageOS/G12/android_hardware_amlogic_kernel-modules_media.git
4 years agompeg12: improve mpeg12 buf use cnt. [1/1]
shihong.zheng [Mon, 2 Mar 2020 08:11:11 +0000 (16:11 +0800)]
mpeg12: improve mpeg12 buf use cnt. [1/1]

PD#OTT-8694

Problem:
mpeg12 mosaic and freeze.

Solution:
separate buf use cnt and reference pic count.

Verify:
ac-200

Change-Id: Ia9668e706e51cef8775e6b48137290c94fdf76bd
Signed-off-by: shihong.zheng <shihong.zheng@amlogic.com>
4 years agodmx: more info for CRC fail [1/1]
Zhiqiang Han [Thu, 12 Mar 2020 04:23:49 +0000 (12:23 +0800)]
dmx: more info for CRC fail [1/1]

PD#SWPL-22300

Problem:
got nothing from CRC fail

Solution:
print pid who's CRC fail

Verify:
Patchbuild

Change-Id: Ied406616e2d81a97d3b8569fac3a60c2d1cd19d2
Signed-off-by: Zhiqiang Han <zhiqiang.han@amlogic.com>
4 years agosubtitle: reset subtitle parser in dmx reset [1/1]
Zhiqiang Han [Wed, 4 Mar 2020 09:41:32 +0000 (17:41 +0800)]
subtitle: reset subtitle parser in dmx reset [1/1]

PD#SWPL-22300

Problem:
The parser,
will be operated in driver dmx and amstream,
which must be carefully maintained
with its buf ptr.
The reset procedure among dmx and amstream,
destroyed the buf ptr.

Solution:
reset the buf ptr in dmx

Verify:
Patchbuild

Change-Id: Idc080e4bbba1f30d44193a02f23996d3b62f767d
Signed-off-by: Zhiqiang Han <zhiqiang.han@amlogic.com>
4 years agompeg2: fixed the issue of picture type error. [1/1]
Nanxin Qin [Mon, 16 Mar 2020 06:45:02 +0000 (14:45 +0800)]
mpeg2: fixed the issue of picture type error. [1/1]

PD#SWPL-22217

Problem:
the picture format type has not be set caused display abnormal.

Solution:
the picture format type be set to NV21 default.

Verify:
u212

Change-Id: I3da7bf50cca874f2304d1757606daa1c8af1c907
Signed-off-by: Nanxin Qin <nanxin.qin@amlogic.com>
4 years agoh265: fix some hevc interlace issue. [1/1]
shihong.zheng [Mon, 16 Mar 2020 02:47:02 +0000 (10:47 +0800)]
h265: fix some hevc interlace issue. [1/1]

PD#OTT-8900

Problem:
hevc interlace display half picture.
hevc interlace double write 3 configed.

Solution:
1. set double write mode 1 for hevc interlace.
2. set hevc->double_write_mode valid when set
0x8000000x > double_write_mode.
3. set vdec status height x2 for hevc interlace.

Verify:
u212

Change-Id: I80f041902baad1204ce86b4bbbd8c073bec0b3cb
Signed-off-by: shihong.zheng <shihong.zheng@amlogic.com>
4 years agomedia_modules: H265 seek operation crash [1/1]
Peng Yixin [Tue, 3 Mar 2020 02:12:15 +0000 (10:12 +0800)]
media_modules: H265 seek operation crash [1/1]

PD#SWPL-21997

Problem:
H265 video file seek operation crash.
1.Memory freed is still being used
2.The number of buffers calculated by the
decoder driver and v4l2 is inconsistent.

Solution:
1.Free memory correctly
2.The number of buffers calculated by the
decoder driver and v4l2 stay the same.

Verify:
AC214

Change-Id: Idaee66c8a4e0dbf63d493555e224b15c131dcb64
Signed-off-by: Peng Yixin <yixin.peng@amlogic.com>
4 years agomedia_module: mh264 avoid to use cache to do dma [1/1]
apollo.ling [Wed, 11 Mar 2020 15:02:32 +0000 (23:02 +0800)]
media_module: mh264 avoid to use cache to do dma [1/1]

PD#SWPL-19513

Problem:
in mh264 driver. the dma may use cache which may incur memory violation.

Solution:
in mh264 driver. use dma_alloc_coherent instead.

Verify:
X301

Change-Id: Id0a601178eb5873a0b803133bcc022388063646d
Signed-off-by: apollo.ling <apollo.ling@amlogic.com>
4 years agoamstream: CTC need support IPTV Player event. [4/4]
wenjie.chen [Thu, 9 Jan 2020 02:54:34 +0000 (10:54 +0800)]
amstream: CTC need support IPTV Player event. [4/4]

PD#SWPL-18534

Problem:
CTC need support IPTV Player event report to middleware
from amstream.

Solution:
CTC support IPTV Player event report to middleware
from amstream.

Verify:
u212

Change-Id: I0c66beb988b7cd6166aa0c4d2092af1d47c236b8
Signed-off-by: wenjie.chen <wenjie.chen@amlogic.com>
4 years agodecoder: set cap_pix_fmt in vidioc_vdec_s_fmt [1/1]
Song Zhao [Thu, 12 Mar 2020 17:31:27 +0000 (10:31 -0700)]
decoder: set cap_pix_fmt in vidioc_vdec_s_fmt [1/1]

PD#SWPL-21954

Problem:
vidioc_vdec_g_fmt() is not the correct place to set this fmt

Solution:
set cap_pix_fmt in vidioc_vdec_s_fmt()

Verify:
U212 with v4l2-uvm-test

Change-Id: I6174c872cb459ee7e1236d0af5dbdbbdfbd6f8ba
Signed-off-by: Song Zhao <song.zhao@amlogic.com>
4 years agoamstream: add IPTV Player event report to middleware from amstream. [2/2]
yanan.wang [Mon, 24 Feb 2020 10:54:04 +0000 (18:54 +0800)]
amstream: add IPTV Player event report to middleware from amstream. [2/2]

PD#SWPL-21119

Problem:
support AmlProbe feature to AndroidQ.

Solution:
add IPTV Player event report to middleware from amstream.

Verify:
u212

Change-Id: Ifa0fd5accbf2beb17ff660801b4021688284aec3
Signed-off-by: yanan.wang <yanan.wang@amlogic.com>
4 years agodecoder: resolve UV revertion issue for NV12 [1/1]
Nanxin Qin [Wed, 11 Mar 2020 11:19:37 +0000 (19:19 +0800)]
decoder: resolve UV revertion issue for NV12 [1/1]

PD#SWPL-21954

Problem:
Vframe->type is not correctly set for NV12

Solution:
Put NV12 format to vframe->type

Verify:
U212 with v4l2-uvm-test

Change-Id: Ib20f583605e6acec3660d871f8cd6c0ef8022b83
Signed-off-by: Nanxin Qin <nanxin.qin@amlogic.com>
4 years agoRevert "decoder: resolve UV revertion issue for NV12 [1/1]"
Hui Zhang [Wed, 11 Mar 2020 09:43:36 +0000 (01:43 -0800)]
Revert "decoder: resolve UV revertion issue for NV12 [1/1]"

This reverts commit 3441f4085ee5c8f435863832bab372bfad4f762d.

Change-Id: If8160328fbd33c3dc73e09bb942decbd0552df81

4 years agodecoder: resolve UV revertion issue for NV12 [1/1]
Song Zhao [Sat, 29 Feb 2020 08:53:33 +0000 (00:53 -0800)]
decoder: resolve UV revertion issue for NV12 [1/1]

PD#SWPL-21954

Problem:
Vframe->type is not correctly set for NV12

Solution:
Put NV12 format to vframe->type

Verify:
U212 with v4l2-uvm-test

Change-Id: I76ea36ffc2eeea6382ead52693a8082838aa0e95

4 years agomedia_module: h264 mosaics issue [1/1]
Yixin Peng [Fri, 6 Mar 2020 10:17:46 +0000 (18:17 +0800)]
media_module: h264 mosaics issue [1/1]

PD#OTT-7437

Problem:
Because of the video file have some error,
the decoder did not filter out some masaics frames,
result show mosaic picture.

Solution:
1.Due to the video file error, the DPB buffer is flushed
when the driver logic is wrong, resulting in the
reference frame referenced by the later frame is not
correct, result show mosaic picture, remove the error
logic to solve this problems.
2.When there are some frames lost in the video file and
have frame number gap, the reference frame relationship
will be wrong and the decoding will show mosaic picture.
In this case, the decoding of the frame will be marked
wrong, to solve this problem.
3.Resolve the error in the stream file, all the frames
except for I frame were marked as wrong frames, resulting
playback unsmooth.

Verify:
u212

Signed-off-by: Yixin Peng <yixin.peng@amlogic.com>
Change-Id: I530c47ffb6c0d7f9a59143101bf7b58076eb8513

4 years agoh265: fix h265 dv crash. [1/1]
shihong.zheng [Sat, 7 Mar 2020 05:54:20 +0000 (13:54 +0800)]
h265: fix h265 dv crash. [1/1]

PD#SWPL-21687

Problem:
h265 dv crash.
some dv data will get after current frame output.
aux data will be changed when cb get aux data.

Solution:
current pic do not output after get new pic.

Verify:
u212

Change-Id: I85d56a47beb9c92b6361e644ffc5a9b8d9acf2a9
Signed-off-by: shihong.zheng <shihong.zheng@amlogic.com>
4 years agoh265: 8k performance improvement [2/2]
Hui Zhang [Fri, 28 Feb 2020 08:31:17 +0000 (16:31 +0800)]
h265: 8k performance improvement  [2/2]

PD#TV-14744

Problem:
8k performance limitation

Solution:
add multi-tile optimation for performance improvement

Verify:
X301

Change-Id: I5d9121869eb9e1396369175719f7e42afba63e15
Signed-off-by: Hui Zhang <hui.zhang@amlogic.com>
4 years agodmx: Optimize memory of aml_dmx_hw_init(768KB) [1/1]
Zhiqiang Han [Tue, 25 Feb 2020 00:57:27 +0000 (08:57 +0800)]
dmx: Optimize memory of aml_dmx_hw_init(768KB) [1/1]

PD#SWPL-20868

Problem:
too much memory used

Solution:
optimize

Verify:
Patchbuild

Change-Id: Ic68d7f4d99cee0fc53ec104684c84b29bfba83f3
Signed-off-by: Zhiqiang Han <zhiqiang.han@amlogic.com>
4 years agomjpeg: dump mjpeg yuv from decoder. [1/1]
shihong.zheng [Sat, 8 Feb 2020 06:27:11 +0000 (14:27 +0800)]
mjpeg: dump mjpeg yuv from decoder. [1/1]

PD#SH-2447

Problem:
mjpeg display abnormal.

Solution:
add mjpeg dump yuv420 code for debug.

Verify:
u212

Change-Id: I5aaf4298063d394a8627f77b06b45ab2dd411061
Signed-off-by: shihong.zheng <shihong.zheng@amlogic.com>
4 years agov4l: support parse of parms sets by ucode for v4l codec. [1/1]
Yixin Peng [Tue, 11 Feb 2020 02:06:35 +0000 (10:06 +0800)]
v4l: support parse of parms sets by ucode for v4l codec. [1/1]

PD#SWPL-20308

Problem:
need to support parse of parms sets by ucode.

Solution:
support parse of parms sets by ucode.

Verify:
u212

Change-Id: I2030332303e02fd338eb5ba29f51b46b136cd7ba
Signed-off-by: Yixin Peng <yixin.peng@amlogic.com>
4 years agovmh264: fix oversize check issue [1/1]
Hui Zhang [Tue, 25 Feb 2020 02:27:28 +0000 (10:27 +0800)]
vmh264: fix oversize check issue [1/1]

PD#TV-14024

Problem:
for long time stress test with error in h264 stream.
vdec dmc voulation happened. because oversize check
including 8K, it's a mistake. maybe cause memory
polution our h264 decoder doesn't support 8K

Solution:
1) remove 8K in oversize check
2) fix vf check valid bug (not related with dmc voilation)

Verify:
T972

Change-Id: I1b5dbb395a1d77d8030fd545219f69402df6c7a5
Signed-off-by: Hui Zhang <hui.zhang@amlogic.com>
4 years agovdec: add vfm path config [1/1]
miaohong chen [Wed, 26 Feb 2020 08:14:45 +0000 (16:14 +0800)]
vdec: add vfm path config [1/1]

PD#SWPL-20691

Problem:
vfm path need config in driver.

Solution:
cfg in decoder driver.

Verify:
u212

Change-Id: I1d53c514b9fdc8efcf4ad89af31d9eebb20e55ea
Signed-off-by: miaohong chen <miaohong.chen@amlogic.com>
4 years agoMerge "fw: fixed issue of slab out of bounds. [1/1]" into amlogic-4.9-dev
Hui Zhang [Wed, 26 Feb 2020 07:46:18 +0000 (23:46 -0800)]
Merge "fw: fixed issue of slab out of bounds. [1/1]" into amlogic-4.9-dev

4 years agofw: fixed issue of slab out of bounds. [1/1]
Nanxin Qin [Tue, 25 Feb 2020 11:27:07 +0000 (19:27 +0800)]
fw: fixed issue of slab out of bounds. [1/1]

PD#OTT-8429

Problem:
H.264 Video encoder fails when trying 2-way Video

Solution:
fixed issue of slab out of bounds.

Verify:
u212

Change-Id: Ia949f2b6ff47373871c93e30cf1bc8ba62f805ff
Signed-off-by: Nanxin Qin <nanxin.qin@amlogic.com>
4 years agoucode: The h264 failed in the CTS test on AndroidQ [1/1]
Gan Zhang [Mon, 24 Feb 2020 15:47:36 +0000 (23:47 +0800)]
ucode: The h264 failed in the CTS test on AndroidQ [1/1]

PD#SWPL-21038

Problem:
On the G12A platform, the 64x720 resolution of
h264 failed in the CTS test.

Solution:
restore DCAC_DDR_BYTE64_CTL reg after reset on G12A platform.

ucode gerrit : 99693
ucode commit : f3e3bf

Verify:
U212 and AC214

Change-Id: Idcdeac086b145c663318e04e54721b39d22a93e1
Signed-off-by: Gan Zhang <gan.zhang@amlogic.com>
4 years agoMedia modules: Start play slow. [1/2]
jianchuan.ping [Fri, 14 Feb 2020 14:05:48 +0000 (22:05 +0800)]
Media modules: Start play slow. [1/2]

PD#SWPL-20222

Problem:
Pts not set correctly in AUDIO_START for tsync_abreak not correct.

Solution:
Not set tsync_abreak flag anymore.

Verify:
S905L3

Change-Id: I0ea13805582df20dc86c602e27e1be6c15b8b8dd
Signed-off-by: jianchuan.ping <jianchuan.ping@amlogic.com>
4 years agomedia_modules: add pip tunnel mode path [3/3]
shuanglong.wang [Wed, 12 Feb 2020 04:33:59 +0000 (12:33 +0800)]
media_modules: add pip tunnel mode path [3/3]

PD#SWPL-20255

Problem:
add pip tunnel mode path

Solution:
add pip tunnel mode path

Verify:
verify by buildroot

Change-Id: Ie892b72d6b2b15cc8fc088d79116beaf3ed12d34
Signed-off-by: shuanglong.wang <shuanglong.wang@amlogic.com>
4 years agov4l: fixed build err on arch 32bit.
Nanxin Qin [Tue, 25 Feb 2020 05:19:28 +0000 (13:19 +0800)]
v4l: fixed build err on arch 32bit.

PD#SWPL-20317

Problem:
android p patchbuild err.

Solution:
fixed build err on arch 32bit, dma_addr_t is
differece on the diff arch.

Verify:
u212

Change-Id: Ia9d6c6ff5e7202905326c31e02839796601fb87c
Signed-off-by: Nanxin Qin <nanxin.qin@amlogic.com>
4 years agovmh264: add vf_valid_check function [1/1]
shengyang.lin [Mon, 24 Feb 2020 05:53:02 +0000 (13:53 +0800)]
vmh264: add vf_valid_check function [1/1]

PD#OTT-8684

Problem:
vf is null pointer cause reboot

Solution:
add a vf_valid_check to protect

Verify:
905x2 9.0

Change-Id: I2137039448aa4b9f59adee8d8307add663af713c
Signed-off-by: shengyang.lin <shengyang.lin@amlogic.com>
4 years agov4l: support drm input on model of dmabuf. [1/1]
Nanxin Qin [Tue, 11 Feb 2020 08:36:30 +0000 (16:36 +0800)]
v4l: support drm input on model of dmabuf. [1/1]

PD#SWPL-20317

Problem:
need to support drm input for use drm.

Solution:
support drm input on model dmabuf.

Verify:
u212

Change-Id: I442aced436891949a1d50d834284fcd154c2abd8
Signed-off-by: Nanxin Qin <nanxin.qin@amlogic.com>
4 years agovdec: system reboot during channel switch [1/2]
Hui Zhang [Sat, 8 Feb 2020 01:59:52 +0000 (09:59 +0800)]
vdec: system reboot during channel switch  [1/2]

PD#SWPL-20142

Problem:
there is 2 instances during channel switch.
decoding fail in parallel_decode (vdec stream + hevc frame)
there is a race conditioni in dmc set.

Solution:
remove heve_wait_ddr in vdec_save_input_context

Verify:
AC214

Change-Id: I4a4fca88d4fa013793541cd81f08cd84fc2e2009
Signed-off-by: Hui Zhang <hui.zhang@amlogic.com>
4 years agovdec: vdec add count for di NR support [2/2]
shihong.zheng [Thu, 13 Feb 2020 13:06:19 +0000 (21:06 +0800)]
vdec: vdec add count for di NR support [2/2]

PD#SWPL-19111

Problem:
no support P video NR process

Solution:
add vdec count for di NR support

Verify:
AC-214

Change-Id: If242f4500356025f8eea933c8ae52ae1756da442
Signed-off-by: shihong.zheng <shihong.zheng@amlogic.com>
4 years agoh265: support 12 tile width stream [2/2]
Hui Zhang [Fri, 21 Feb 2020 02:39:49 +0000 (10:39 +0800)]
h265: support 12 tile width stream [2/2]

PD#TV-14744

Problem:
 h265 10 tiles width stream playback fail

Solution:
add support for update to 12 tiles witdh in h265 stream
ucode gerrit : 99213
ucode commit id : 7a9ef

Verify:
X301

Change-Id: Id4dc35c023f43cce439e37b60fd81a99962f8aa0
Signed-off-by: Hui Zhang <hui.zhang@amlogic.com>
4 years agompeg4: Play h263 video bus hang [1/1]
Hui Zhang [Thu, 20 Feb 2020 07:12:36 +0000 (15:12 +0800)]
mpeg4: Play h263 video bus hang [1/1]

PD#SWPL-20663

Problem:
When playing h263 video on TM2 platform,
the decoding hardware did not stop completely when exiting
resulting in the bus hang when writing to DMC during playback.

Solution:
Add a hardware reset when exiting.

Verify:
TM2

Change-Id: I726eebed8850732a0429794c5ed8bee64cdf0a95
Signed-off-by: Hui Zhang <hui.zhang@amlogic.com>
4 years agovdec: avoid array underfollow [1/1]
apollo.ling [Thu, 20 Feb 2020 03:00:20 +0000 (11:00 +0800)]
vdec: avoid array underfollow [1/1]

PD#TV-14622

Problem:
System reboot when burn-in play 3D video

Solution:
Avoid the array underfollow.

Verify:
verified at X31A0-T950X2 project.

Change-Id: Ia1f90bc1056b3bd9accd9c10c7ae78a5e50cb1a1
Signed-off-by: apollo.ling <apollo.ling@amlogic.com>
4 years agodemux: correct ciplus bit [1/1]
Chuangcheng Peng [Tue, 18 Feb 2020 12:51:44 +0000 (20:51 +0800)]
demux: correct ciplus bit [1/1]

PD#SWPL-20857

Problem:
demux data lost when switch scrambled channels

Solution:
correct ciplus bit.

Verify:
 verify at ZTE/Magecable project

Change-Id: I814563e408f2790a470bb4e9e899b82d61520a7a
Signed-off-by: Chuangcheng Peng <chuangcheng.peng@amlogic.com>
4 years agomedia_modules: optimize the loading of demod and tuner [2/3]
nengwen.chen [Tue, 14 Jan 2020 11:56:54 +0000 (19:56 +0800)]
media_modules: optimize the loading of demod and tuner [2/3]

PD#SWPL-20095

Problem:
1.optimize the loading of demod and tuner.

Solution:
1.optimize the loading of demod and tuner.
2.DVB uniformly calls the attach interface to load demod or tuner.
3.Demod and Tuner internal structure is independent of DVB structure.
4.All demod and tuner configuration parameters are passed on attach.

Verify:
Verified by x301 and ac214.

Change-Id: I99f4fb0312e0299fddd5e1cdce51456ff1810a6e
Signed-off-by: nengwen.chen <nengwen.chen@amlogic.com>
4 years agov4l: fixed the problem of multi plane addr [1/1]
Nanxin Qin [Tue, 17 Dec 2019 09:04:06 +0000 (17:04 +0800)]
v4l: fixed the problem of multi plane addr [1/1]

PD#SWPL-13705

Problem:
1. HEBC/VP9 doesn't support multi planar buffer
2. revert limite the buffer number returned from REQBUFS
   as some issue on the mediahal will to be fixed.

Solution:
Configure canvas correctly according to vdec_v4l2_buffer

Verify:
U212 with VP9/HEVC streamer playback

Change-Id: I0ba73005ae6e610d19eba7e8bed1b038022f7cd1
Signed-off-by: Nanxin Qin <nanxin.qin@amlogic.com>
4 years agoavs: avs single mode use 8 bufs. [2/2]
Hui Zhang [Tue, 28 Jan 2020 10:32:52 +0000 (18:32 +0800)]
avs: avs single mode use 8 bufs. [2/2]

PD#SWPL-17453

Problem:
vc1 format decoder need set 8 decoder output margin.

Solution:
1)add 8 refer buffers for vc1 decoder.
2) compatible with old 4 buf driver
ucode gerrit: 98011
ucode commit id: 3e888

Verify:
u212

Change-Id: I8bda273f55529f948ba532658793636bde6c315b
Signed-off-by: Hui Zhang <hui.zhang@amlogic.com>
4 years agov4l2: mpeg2: support multi-planar [1/1]
Song Zhao [Wed, 18 Dec 2019 05:35:41 +0000 (21:35 -0800)]
v4l2: mpeg2: support multi-planar [1/1]

PD#SWPL-12624

Problem:
1. Enable V4L2 Mpeg2 decoder
2. Enable V4L2 Mpeg2 ucode parser to support secure mode

Solution:
* Use canvas linear mode
* Support NV21
* Add frame dump feature in aml_port
* Use width/heigh from IF layer before ucode is enable to parse it, it
  will make sure canvas is correctly configured (not 0 width and height).
* Add 00 00 01 00 padding for every frame in unsecure mode
* pass buffer margin number from interface to decoder. Make sure
  vdec_mpeg12_hw_s->buf_num and aml_vcodec_ctx->dpb_size are in sync.
* use completion to wait for decoder to parse the stream
* Also limite the buffer number returned from REQBUFS to ctx->dbp_size
  It will prevent application from allocate more memory than enough.

Verify:
U212

Change-Id: Ib7542fccdde6a10f9ec38b5584b8b523d4d378dc
Signed-off-by: Song Zhao <song.zhao@amlogic.com>
4 years agosub: may sleep in irq-disabled [1/2]
Zhiqiang Han [Sun, 19 Jan 2020 04:57:19 +0000 (12:57 +0800)]
sub: may sleep in irq-disabled [1/2]

PD#SWPL-20113

Problem:
may sleep in irq-disabled

Solution:
use self maintaining buf for sub pes channel

Verify:
Patchbuild

Change-Id: I12ebc0182c9789f026b0f31246d7ba99b01792ca
Signed-off-by: Zhiqiang Han <zhiqiang.han@amlogic.com>
4 years agovmpeg12: fix stream mode no frame ouput. [1/1]
shihong.zheng [Mon, 10 Feb 2020 09:10:07 +0000 (17:10 +0800)]
vmpeg12: fix stream mode no frame ouput. [1/1]

PD#SWPL-20197

Problem:
mpeg12 no frame output in stream mode.

Solution:
fix bug condition in run.

Verify:
newton

Change-Id: I12a46256679421f4e5bf7297d5cfe798b6305aa9
Signed-off-by: shihong.zheng <shihong.zheng@amlogic.com>
4 years agov4l: opitimize v4l debug module and interface unification. [1/1]
Nanxin Qin [Sat, 1 Feb 2020 10:37:37 +0000 (18:37 +0800)]
v4l: opitimize v4l debug module and interface unification. [1/1]

PD#SWPL-20310

Problem:
Opitimize v4l debug module and interface unification.

Solution:
opitimize v4l debug module and interface unification.

Verify:
u212

Change-Id: Ic7ee875c87389771505c838453dd2f5dd1c3e529
Signed-off-by: Nanxin Qin <nanxin.qin@amlogic.com>
4 years agovmh264: bitstream cts case fail on Q
Hui Zhang [Sat, 1 Feb 2020 11:55:45 +0000 (19:55 +0800)]
vmh264: bitstream cts case fail on Q

PD#SWPL-15890

Problem:
bitstream test case fail randomly

Solution:
1)for tiny picure (64 width), need disable Hw Cache
2)add ENABLE_WAIT_BUFDW_WRRSP
3)flush yuv buf cache after allocated

ucode gerrit : 98032
ucode commit : c1c101

Verify:
AC214

Change-Id: I8e845f4c87860b2495f7bbc40cec2f8156521e5c
Signed-off-by: Hui Zhang <hui.zhang@amlogic.com>
4 years agodecoder: Android P hardware/amlogic/media_modules coverity issue [1/1]
apollo.ling [Tue, 7 Jan 2020 11:01:48 +0000 (19:01 +0800)]
decoder: Android P hardware/amlogic/media_modules coverity issue [1/1]

PD#SWPL-11723

Problem:
media_modules coverity issue

Solution:
According to the coverity reports, fix the decoder related issues

Verify:
u212

Change-Id: I7931abe2d10ff59282d6f1148d437b09ffabe70e
Signed-off-by: apollo.ling <apollo.ling@amlogic.com>
4 years agoh265: fixed the issue of release sequence. [1/1]
Nanxin Qin [Tue, 14 Jan 2020 06:34:13 +0000 (14:34 +0800)]
h265: fixed the issue of release sequence. [1/1]

PD#SWPL-19283

Problem:
Irdeto and YouTube switch between each other, OTT restarts automatically

Solution:
1. it's wrong of release seq that the pic release after dec instance rm..
2. fixed some worring of kasan that caused by release sequece abnormal.

Verify:
ac214

Change-Id: I9a4347e94d9cbb16df295ed1b893e50bef99375b
Signed-off-by: Nanxin Qin <nanxin.qin@amlogic.com>
4 years agovdec: add struct for getting multi-vdec information modules part [1/1]
apollo.ling [Mon, 20 Jan 2020 15:39:46 +0000 (23:39 +0800)]
vdec: add struct for getting multi-vdec information modules part [1/1]

PD#SWPL-1449

Problem:
sizeof in android P is unsined int but long unsigned int in Q

Solution:
covert sizeof type to u32

Verify:
u212

Change-Id: Iee31852ddbb3af61fd9636f2ccd39afb1253d8c7
Signed-off-by: apollo.ling <apollo.ling@amlogic.com>
4 years agovdec: add struct for getting multi-vdec information modules part [1/4]
apollo.ling [Sun, 29 Sep 2019 06:57:18 +0000 (14:57 +0800)]
vdec: add struct for getting multi-vdec information modules part [1/4]

PD#SWPL-1449

Problem:
need to implement a way to get multi-vdec information

Solution:
add new data struct to dynamically record each VDEC's information

Verify:
u212

Change-Id: I03cf0ff013e64b865dbd83cce85ff7abc43b15a4
Signed-off-by: apollo.ling <apollo.ling@amlogic.com>
4 years agov4l: fixed video blurred when resolution change. [2/2]
Nanxin Qin [Sun, 12 Jan 2020 09:08:17 +0000 (17:08 +0800)]
v4l: fixed video blurred when resolution change. [2/2]

PD#SWPL-19709

Problem:
Playback youtube 360vr video blurred screen when switch

Solution:
need to check the inst is valid when the res change.

Verify:
u212

Change-Id: I8d9f65a320e62568f470d0ed17621f9cfd5b6dd5
Signed-off-by: Nanxin Qin <nanxin.qin@amlogic.com>
4 years agomedia_module: interlace file playback stuck [1/1]
Yixin Peng [Fri, 6 Dec 2019 02:07:16 +0000 (10:07 +0800)]
media_module: interlace file playback stuck [1/1]

PD#SWPL-17439

Problem:
    Interlace file playback will stuck

Solution:
    Since multiple vf are not supported in
    v4l2 to correspond to a buffer, and there
    is no di module at present, only one vf
    is transmitted to the interlace source first,
    and then how to implement it will be discussed
    after adding di module to v4l2.

Verify:
    U212

Change-Id: Ib5fb7f0dc8a4960ab3f7daff91ab88a0f53643e2
Signed-off-by: Yixin Peng <yixin.peng@amlogic.com>
4 years agovmh264: Solve the problem of picture shake [1/1]
miaohong chen [Thu, 16 Jan 2020 12:42:05 +0000 (20:42 +0800)]
vmh264: Solve the problem of picture shake [1/1]

PD#IPTV-5848

Problem:
local play "LHDMI--wumochou.ts" the video is judders

Solution:
Obtain the top and bottom field priority flags from the sei grammar
to determine whether to output the top or bottom field first.

Verify:
S905L2A

Change-Id: Id3dd99d90b782a97014c7b0f7b7b0c4c94537751
Signed-off-by: miaohong chen <miaohong.chen@amlogic.com>
4 years agomedia_module: h264 playback freeze on v4l2. [1/1]
Yixin Peng [Thu, 12 Dec 2019 02:43:44 +0000 (10:43 +0800)]
media_module: h264 playback freeze on v4l2. [1/1]

PD#SWPL-18089

Problem:
h264 playback freeze on v4l2.

Solution:
1. Solve the DPB size error of v4l2 parsing.
2. Solve the problem of v4l2 not detecting
the video switch.

Verify:
AC214

Change-Id: I31a7b91d604f3e7ef535f11c546a15b73e469da3
Signed-off-by: Yixin Peng <yixin.peng@amlogic.com>
4 years agovh265: some h265 stream playback stuck issue [1/1]
Hui Zhang [Sat, 11 Jan 2020 02:58:39 +0000 (10:58 +0800)]
vh265: some h265 stream playback stuck issue [1/1]

PD#SWPL-19329

Problem:
there is error in errors in some h265 stream which cause dpb overflow and
decoder can't get free buf to go on.

Solution:
1. force release error and output mark frames
2. if hard to release buf since  error inside dpb, flush out dpb

Verify:
AC214

Change-Id: I9b603f13a94db13c91564d337b7e918a8a30391e

4 years agoMerge "Revert "vmh264: Solve the problem of picture shake [1/1]"" into amlogic-4...
Hui Zhang [Thu, 16 Jan 2020 09:00:48 +0000 (01:00 -0800)]
Merge "Revert "vmh264: Solve the problem of picture shake [1/1]"" into amlogic-4.9-dev

4 years agoRevert "vmh264: Solve the problem of picture shake [1/1]"
Miaohong Chen [Thu, 16 Jan 2020 08:47:57 +0000 (00:47 -0800)]
Revert "vmh264: Solve the problem of picture shake [1/1]"

This reverts commit a59d2f8c71f7322d2c91861b57b522a968aef030.

Change-Id: Ia5dc9ffc2211666e97796fb18f1e853cfa916e11

4 years agomedia_modules: fix hardfault in h264 encoder [1/1]
Rico Yang [Wed, 15 Jan 2020 06:10:54 +0000 (14:10 +0800)]
media_modules: fix hardfault in h264 encoder [1/1]

PD#SWPL-18911

Problem:
h264 encoder may encounter hardfault

Solution:
reset encoder after every frame

Verify:
verified on franklin

Change-Id: If1985e76b0edb191a848baee7e2644ea13d9648e
Signed-off-by: Rico Yang <wei.yang@amlogic.com>
4 years agodecode: the second part of local reset patches. [1/1]
Nanxin Qin [Mon, 30 Dec 2019 03:27:44 +0000 (11:27 +0800)]
decode: the second part of local reset patches. [1/1]

PD#SWPL-18664

Problem:
optimize local reset when decode error happened.

Solution:
optimize local reset when decode error happened

Verify:
u212

Change-Id: I3a32c5a21e125a412167c839cd28cee108f1dcd0
Signed-off-by: Nanxin Qin <nanxin.qin@amlogic.com>
4 years agosub: fixed crash in sub process [1/1]
Zhiqiang Han [Mon, 13 Jan 2020 12:44:42 +0000 (20:44 +0800)]
sub: fixed crash in sub process [1/1]

PD#SWPL-19896

Problem:
obsolete virt addr

Solution:
renew the addr of sub buf on every vid start

Verify:
Patchbuild

Change-Id: I709192d0aa0a006a38ea89e5f2eb742c045e922e
Signed-off-by: Zhiqiang Han <zhiqiang.han@amlogic.com>
4 years agovmh264: Solve the problem of picture shake [1/1]
miaohong chen [Tue, 14 Jan 2020 09:20:27 +0000 (17:20 +0800)]
vmh264: Solve the problem of picture shake [1/1]

PD#IPTV-5848

Problem:
local play "LHDMI--wumochou.ts" the video is judders

Solution:
Obtain the top and bottom field priority flags from the sei grammar
to determine whether to output the top or bottom field first.

Verify:
S905L2A

Change-Id: I6163c9e2a32e03d5d2f1ee7b2837a7735ac1c2c1
Signed-off-by: miaohong chen <miaohong.chen@amlogic.com>
4 years agomedia_module: avs support multi instance for frame mode [1/1]
Rain Zhang [Thu, 19 Sep 2019 22:46:14 +0000 (15:46 -0700)]
media_module: avs support multi instance for frame mode [1/1]

PD#SWPL-1471

Problem:
support multi instance for both stream and frame mode.

Solution:
1) support frame mode.
2) handle pts for frame base code.
3) fix print id bug if there are mult instances.
4) fix mosaic problem (need update ucode)
5) increase default buffer num to 8

ucode gerrit: 86236
ucode change id: Ia26e5
ucode commit id: 32c848

Verify:
U212

Change-Id: Ib35911731e73021818edd12877583394c571e9e8
Signed-off-by: Rain Zhang <rain.zhang@amlogic.com>
4 years agovdec: When set double write mode 0x80000010, it doesn't take effect [1/1]
apollo.ling [Mon, 13 Jan 2020 08:02:03 +0000 (16:02 +0800)]
vdec: When set double write mode 0x80000010, it doesn't take effect [1/1]

PD#SWPL-19870

Problem:
When set double write mode 0x80000010, it doesn't take effect

Solution:
Don't use the application passed double_write_mode value

Verify:
X301

Change-Id: I93eb3daed6ceb053c979553a2c988b5b3a5e99b3
Signed-off-by: apollo.ling <apollo.ling@amlogic.com>
4 years agodmx: reduce demux file clock [1/1]
Pengfei Liu [Thu, 9 Jan 2020 10:07:53 +0000 (18:07 +0800)]
dmx: reduce demux file clock [1/1]

PD#SWPL-19729

Problem:
Some stream inject by HIU and use AES CIPLUS,
dumxe would empty some bytes.

Solution:
reduce demux file clock.

Verify:
Android P + U212

Change-Id: I3082ca2ad46bac951d34391a953a95e76fbd95f6
Signed-off-by: Pengfei Liu <pengfei.liu@amlogic.com>
4 years agoMerge "media_module: Optimize h264 decoder error recovery issue [1/1]" into amlogic...
Hui Zhang [Fri, 10 Jan 2020 01:24:21 +0000 (17:24 -0800)]
Merge "media_module: Optimize h264 decoder error recovery issue [1/1]" into amlogic-4.9-dev

4 years agomedia_module: Optimize h264 decoder error recovery issue [1/1]
Peng Yixin [Thu, 9 Jan 2020 09:00:26 +0000 (17:00 +0800)]
media_module: Optimize h264 decoder error recovery issue [1/1]

PD#NONE

Problem:
1.Set the correct value for error_proc_policy.
2.Modify the value of the mb_count_threshold
to reduce the display of the mosaic.

Solution:
1.Set the value of error_proc_policy to 0x7Cfb6
2.Set the value of mb_count_threshold to 5

Verify:
U212

Change-Id: I89421ef9953ec1189e793b6af07a0b9102dad679
Signed-off-by: Peng Yixin <yixin.peng@amlogic.com>
4 years agosub: sleep in irq_handler [1/4]
Zhiqiang Han [Mon, 30 Dec 2019 07:54:38 +0000 (15:54 +0800)]
sub: sleep in irq_handler [1/4]

PD#SWPL-19036

Problem:
sleep in irq_handler

Solution:
change dynamic phys2virt to init base once

Verify:
Patchbuild

Change-Id: I734a6c5c02c84daa5eda1ceb00d97287d7b699ba
Signed-off-by: Zhiqiang Han <zhiqiang.han@amlogic.com>
4 years agomedia_module: h264 Update the ref queue correctly [1/1]
Peng Yixin [Mon, 30 Dec 2019 16:24:00 +0000 (00:24 +0800)]
media_module: h264 Update the ref queue correctly [1/1]

PD#OTT-7782

Problem:
When there is some error data in the stream, the error ref frame is
forced to be released. Since the list of ref frames is not updated,
decoder driver thinks that the DPB buffer is incorrect and the entire
DPB queue to be cleared, result frame drop.

Solution:
This problem is resolved by updating the list of refs when the
incorrect ref frames are removed to dpb queue.

Verify:
u212

Change-Id: I754434ae1daaaf8df56e9efc10233ca7725df86e
Signed-off-by: Peng Yixin <yixin.peng@amlogic.com>
4 years agomedia_module: A minute later, display the previous frame with the mosaic [1/1]
Peng Yixin [Wed, 25 Dec 2019 14:43:08 +0000 (22:43 +0800)]
media_module: A minute later, display the previous frame with the mosaic [1/1]

PD#OTT-7781

Problem:
Due to some error data in the video stream, several reference frames
remained in the DPB queue and were referenced by other frames
incorrectly later, resulting in show mosaic picture.

Solution:
A timeout mechanism has been added so that when one frame is in
the DPB queue for a long time, this frame will be forcibly removed
from the DPB queue.

Verify:
U212

Change-Id: I42350771c2a88465750f20fbef2e463a4115d691
Signed-off-by: Peng Yixin <yixin.peng@amlogic.com>
4 years agoamstream: dump streambuf data. [1/1]
shihong.zheng [Wed, 1 Jan 2020 03:37:33 +0000 (11:37 +0800)]
amstream: dump streambuf data. [1/1]

PD#OTT-7937

Problem:
demux error data cause decoder reset.

Solution:
dump stream buf to locate issue.
usage:
change stbuf size and block the stream mode decode
to dump more data.
dump video stbuf cmd:
mdkir -p /data/tmp -m 777;setenforce 0;
echo 0 > /sys/class/amstream/dump_stream;

Verify:
P212

Change-Id: I1f44a95841038265d71c746889d01b46c6154fb1
Signed-off-by: shihong.zheng <shihong.zheng@amlogic.com>
4 years agoh264: fixed playback stuck when local reset. [1/1]
Nanxin Qin [Fri, 3 Jan 2020 08:09:04 +0000 (16:09 +0800)]
h264: fixed playback stuck when local reset. [1/1]

PD#SWPL-15748

Problem:
the program will stuck after the bitstream play for a cycle.

Solution:
it is not notity the reset event to backend when error reset
happend, the vf could not be back to decode on android P.

Verify:
x301

Change-Id: Ia0e1883b43d52c9d44cdcab2c5932c682e05c50c
Signed-off-by: Nanxin Qin <nanxin.qin@amlogic.com>
4 years agomedia_module: h264 detect wrong multi slice status[1/1]
Peng Yixin [Thu, 26 Dec 2019 04:32:03 +0000 (12:32 +0800)]
media_module: h264 detect wrong multi slice status[1/1]

PD#OTT-7782

Problem:
When the stream has some error video data, one frame data is
incomplete, ucode interrupt messages do not report the completion
of decoding this frame, cause can't store this frame in the DPB
queue, and continue to decode the next frame data, which causes
the DPB queue incorrect and the entire DPB queue to be cleared.

Solution:
Through slice header parameter to determine whether there is no correct
interrupt messages received, thus we can store the incomplete data
frame in the DPB queue.

Verify:
U212

Change-Id: I9991f2599dc02ec69ad7cc798edbbc380b584d1d
Signed-off-by: Peng Yixin <yixin.peng@amlogic.com>
4 years agomedia_module: Optimize the h264 frame drop problem [1/1]
Peng Yixin [Sat, 28 Dec 2019 09:41:52 +0000 (17:41 +0800)]
media_module: Optimize the h264 frame drop problem [1/1]

PD#OTT-7782

Problem:
Very few decoded macro block error can also cause the
frame drop.

Solution:
If the decoded macro block error rate less than 10% (it can adjust
the threshold based on field conditions later), the frame is
considered correct, thus reducing the frame drop and ensuring that
there is only a small mosaic.

Verify:
U212

Change-Id: I62d9d4ed5c4929689f2102979081a223765b3a18
Signed-off-by: Peng Yixin <yixin.peng@amlogic.com>
4 years agomedia_module: h264 store picture to dpb buffer when timeout status. [1/1]
Peng Yixin [Mon, 30 Dec 2019 05:32:39 +0000 (13:32 +0800)]
media_module: h264 store picture to dpb buffer when timeout status. [1/1]

PD#OTT-7782

Problem:
For the timeout state, the driver will discards the frame,
causing the buffer reset.

Solution:
store picture to dpb buffer when timeout status.

Verify:
u212

Change-Id: If14f02fc0ac44eaf4947dd44ef66095d38941d7a
Signed-off-by: Peng Yixin <yixin.peng@amlogic.com>
4 years agomedia_module: h264 mosaics appear after buffer reset [1/1]
Peng Yixin [Wed, 23 Oct 2019 05:57:38 +0000 (13:57 +0800)]
media_module: h264 mosaics appear after buffer reset [1/1]

PD#SWPL-16745

Problem:
h264 mosaics appear after buffer reset.

Solution:
The frame following I frame, but belonging to the
previous POC is not display.

Verify:
AC214

Change-Id: I4e949a292d8a64085a5325b1f6a667b19370fd6d
Signed-off-by: Peng Yixin <yixin.peng@amlogic.com>
4 years agomedia_module: h264 playback freeze [1/1]
Peng Yixin [Thu, 2 Jan 2020 04:24:33 +0000 (12:24 +0800)]
media_module: h264 playback freeze [1/1]

PD#OTT-7774

Problem:
the h264 ucode has the swap operation,
so it needs to be reloaded every run time.

Solution:
reload ucode every time

Verify:
U212

Change-Id: I37d0485be67df56d63ea3157bc27cd40392027e4
Signed-off-by: Peng Yixin <yixin.peng@amlogic.com>
4 years agovdec: add work to substitude directly calling vp9_recycle_mmu_buf [1/1]
apollo.ling [Mon, 21 Oct 2019 05:07:18 +0000 (13:07 +0800)]
vdec: add work to substitude directly calling vp9_recycle_mmu_buf [1/1]

PD#SWPL-13765

Problem:
BuildRoot S905X2 mutex_lock called in timer context

Solution:
add work to substitude directly calling vp9_recycle_mmu_buf

Verify:
u212

Change-Id: I329579c7f24beddaa18092fdde1409f3f26f0076
Signed-off-by: apollo.ling <apollo.ling@amlogic.com>
4 years agovmh264: fix frames drop bug [1/1]
miaohong chen [Fri, 3 Jan 2020 11:53:53 +0000 (19:53 +0800)]
vmh264: fix frames drop bug [1/1]

PD#IPTV-5464

Problem:
Video stutter about 2s when start play time-shift of HD channel.

Solution:
When encountering an IDR frame, end the dropped frame.

Verify:
S905M2

Change-Id: I641c9e0d8c4eebfe9f7f3a331846d05b0b117a3a
Signed-off-by: miaohong chen <miaohong.chen@amlogic.com>
4 years agomedia_module: avoid out-of-bound writing [1/1]
apollo.ling [Mon, 23 Dec 2019 13:57:48 +0000 (21:57 +0800)]
media_module: avoid out-of-bound writing [1/1]

PD#OTT-7799

Problem:
kernel crash and system reboot when switch channel playback.

Solution:
Check sei data bound before writing.
avoid new thread function when in vdec releasing.

Verify:
U212

Change-Id: I221babcd5c06c70a06197644be984ad4a245da5b
Signed-off-by: apollo.ling <apollo.ling@amlogic.com>
4 years agoh264: flush dpb queue when error reset. [1/1]
Nanxin Qin [Thu, 2 Jan 2020 08:18:20 +0000 (16:18 +0800)]
h264: flush dpb queue when error reset. [1/1]

PD#SWPL-15748

Problem:
the program will stuck after the bitstream play for a cycle.

Solution:
flush dpb queue when error reset.

Verify:
x301

Change-Id: I8dfcc4ffe54fafdca0f9a9219476aa599147a258
Signed-off-by: Nanxin Qin <nanxin.qin@amlogic.com>
4 years agoesparser: fix wrong return value when drm_write [1/1]
Tao Guo [Wed, 13 Nov 2019 09:13:18 +0000 (17:13 +0800)]
esparser: fix wrong return value when drm_write [1/1]

PD#OTT-7272

Problem:
Video can not start due to codec_write return 0
When playing drm, omx write drminfo to amstream, but codec_write
return the data size in drminfo, then omx calculate the wrong
remain size, and trying to write the remain data. but codec_write
always return 0 due to wrong data

Solution:
if drminfo only, return drminfo size
if drminfo + esdata, return esdata size + drminfo size
if esdata only, return esdata size

Verify:
JIO project

Change-Id: Iec0481a1a3a1ff928bcb0998fd19e0015c62593f
Signed-off-by: Tao Guo <tao.guo@amlogic.com>
4 years agoh264: fix unsmooth caused by frame dur wrong. [1/1]
shihong.zheng [Sat, 28 Dec 2019 06:33:26 +0000 (14:33 +0800)]
h264: fix unsmooth caused by frame dur wrong. [1/1]

PD#SWPL-18973

Problem:
h264 force interlace video unsmooth.
frame duration is double than normal.

Solution:
video vui param time_scale is wrong,
correct duration from key frames pts
and other conditions.

Verify:
AC214

Change-Id: Idea1b79afb868f14e02eaac6b2a8f0e0182f658b
Signed-off-by: shihong.zheng <shihong.zheng@amlogic.com>
4 years agompeg2: fix cts adaptive playback test fail. [1/1]
shihong.zheng [Mon, 30 Dec 2019 11:15:59 +0000 (19:15 +0800)]
mpeg2: fix cts adaptive playback test fail. [1/1]

PD#SWPL-19221

Problem:
mpeg2 cts case AdaptivePlaybackTest
failed.

Solution:
add two extra buffers for display.

Verify:
AC214

Change-Id: I34602c30447f2a91d387177c49be2e25b762a1ac
Signed-off-by: shihong.zheng <shihong.zheng@amlogic.com>
4 years agov4l: optimize flow of reset for v4l codec. [1/1]
Nanxin Qin [Mon, 23 Dec 2019 17:17:31 +0000 (01:17 +0800)]
v4l: optimize flow of reset for v4l codec. [1/1]

PD#SWPL-18391

Problem:
youtube playback drop amount of frames.

Solution:
1. default config input size is 2M.
2. dont free vdec input buffer when have not frames in block.
3. vp9 mv buffer has not free when reset happend.

Verify:
u212

Change-Id: If907625d73cb2dce68047cb605efaa9e8d87d4f5
Signed-off-by: Nanxin Qin <nanxin.qin@amlogic.com>
4 years agomedia_module: renamed first deinterlace to dimulti for pip. [1/1]
renjiang.han [Thu, 26 Dec 2019 11:05:04 +0000 (19:05 +0800)]
media_module: renamed first deinterlace to dimulti for pip. [1/1]

PD#SWPL-18842

Problem:
When dtv and youTube are switched, the kernel panic is
caused by the deinterlace same name.

Solution:
Renamed first deinterlace to dimulti for pip

Verify:
on S905X3-AC214

Change-Id: I8a970337f13367fbd72bd8156a131bfd2fcb8b88
Signed-off-by: renjiang.han <renjiang.han@amlogic.com>
4 years agodecode: optimize local reset when decode error happened. [1/1]
Nanxin Qin [Wed, 18 Dec 2019 14:17:33 +0000 (22:17 +0800)]
decode: optimize local reset when decode error happened. [1/1]

PD#SWPL-18664

Problem:
optimize local reset when decode error happened.

Solution:
just clear dpb reference when decode error reset.

Verify:
u212

Change-Id: If8628625ce8ed0d95048ea900dbd972fcfa57ccf
Signed-off-by: Nanxin Qin <nanxin.qin@amlogic.com>
4 years agomedia_module: mpeg2 playback stuck [1/1]
Yixin Peng [Fri, 20 Dec 2019 06:05:44 +0000 (14:05 +0800)]
media_module: mpeg2 playback stuck [1/1]

PD#OTT-7825

Problem:
mpeg2 playback stuck.

Solution:
Due to do not clear some flag of cc
subtitle in time, cause normal the
interrupt of video decoding are mistaken
for CC interrupts and cause freeze.

Verify:
AC214

Change-Id: Ia25a376d56932f318c5effd3c23e3b9b65696eed
Signed-off-by: Yixin Peng <yixin.peng@amlogic.com>
4 years agodecode: fixed the kernel crash when testing sts. [1/1]
Nanxin Qin [Mon, 23 Dec 2019 08:37:33 +0000 (16:37 +0800)]
decode: fixed the kernel crash when testing sts. [1/1]

PD#SWPL-18697

Problem:
CtsSecurityTestCases 2 fail

Solution:
fixed the kernel crash when testing sts

Verify:
u212

Change-Id: Ic7ec31daadb4c2374f1527db5b355b14e85549b3
Signed-off-by: Nanxin Qin <nanxin.qin@amlogic.com>
4 years agoirdeto: support msr2 set dsc in ta [1/2]
Chuangcheng Peng [Fri, 11 Oct 2019 03:11:23 +0000 (11:11 +0800)]
irdeto: support msr2 set dsc in ta [1/2]

PD#RSP-245

Problem:
dmx reset will clear TA dsc setting

Solution:
add dsc in/out setting and not clear dsc

Verify:
verify at ac213

Change-Id: I66edccd3dfac6a1bc3f331e3df38165f7ce3a38d
Signed-off-by: Chuangcheng Peng <chuangcheng.peng@amlogic.com>
4 years agomedia_module: h264 mosaics appear after seek operation [1/1]
Yixin Peng [Fri, 6 Dec 2019 11:36:05 +0000 (19:36 +0800)]
media_module: h264 mosaics appear after seek operation [1/1]

PD#SWPL-17412

Problem:
reset the iqidct register cause mosaics.

Solution:
Don't to reset the iqidct register.

Verify:
AC214

Change-Id: I24c3d8c9b95134f65e1dab02404bb993761467e4
Signed-off-by: Yixin Peng <yixin.peng@amlogic.com>
4 years agodecoder: add dynamic buf margin for mpeg12/mpeg4/mjpeg/avs2/mvc. [1/1]
shihong.zheng [Tue, 10 Dec 2019 12:13:25 +0000 (20:13 +0800)]
decoder: add dynamic buf margin for mpeg12/mpeg4/mjpeg/avs2/mvc. [1/1]

PD#SWPL-18189

Problem:
add more buffers control mpeg2/mpeg4/mjpeg/avs2/mvc
for multi-instance.

Solution:
add dynamic_buf_num_margin interface for
mpeg2/mpeg4/mjpeg/avs2 decoder driver.

Verify:
U212

Change-Id: I1e5edccbea1d51e7d85c65fdeb83305cf21d50fc
Signed-off-by: shihong.zheng <shihong.zheng@amlogic.com>
4 years agovmh264: fix baseline fast output bug. [1/1]
shihong.zheng [Tue, 17 Dec 2019 12:44:13 +0000 (20:44 +0800)]
vmh264: fix baseline fast output bug. [1/1]

PD#OTT-7765

Problem:
baseline h264 stream but reorder_pic_num is 2.
fast output set will cause output frame disorder.

Solution:
add reorder_pic_num check when set baseline
fast output 8.

Verify:
S905X

Change-Id: Ia6a5ace66296d0034404f7974b6e43de485ea997
Signed-off-by: shihong.zheng <shihong.zheng@amlogic.com>
4 years agohenc: disable the flooding print by default [1/1]
yongchun.li [Tue, 10 Dec 2019 02:52:48 +0000 (18:52 -0800)]
henc: disable the flooding print by default [1/1]

PD#SWPL-18190

Problem:
There is flooding print information by default

Solution:
move the flooding inforamtion to INFO level

Verify:
A311D

Change-Id: Ibbf1fc4ef0c58ee2546da8cdebcf617961107afb
Signed-off-by: yongchun.li <yongchun.li@amlogic.com>
4 years agov4l2: drop frames [2/3]
rongrong zhou [Wed, 4 Dec 2019 10:38:43 +0000 (18:38 +0800)]
v4l2: drop frames [2/3]

PD#SWPL-17328

Problem:
drop frames

Solution:
1. add trace for debug
2. store vf get count in vf->index_disp
3. set out thread SCHED_FIFO
4. install privdata every vf

Verify:
local

Change-Id: I08fda1994a40d8331bff159bdfdeb20b38fa871c
Signed-off-by: rongrong zhou <rongrong.zhou@amlogic.com>
4 years agov4l: fixed the issue of mosaic shows when seeking. [1/1]
Nanxin Qin [Sat, 7 Dec 2019 13:46:08 +0000 (21:46 +0800)]
v4l: fixed the issue of mosaic shows when seeking. [1/1]

PD#SWPL-18134

Problem:
playback youtube 4k videos, the automatically switched resolution or
seek operation,Display abnormal.

Solution:
fixed the issue of mosaic shows when seeking or resolution change.

Verify:
u212

Change-Id: I9654fdbba7711c76dfcee4b999f63ee8ed12899d
Signed-off-by: Nanxin Qin <nanxin.qin@amlogic.com>
4 years agovdec: enable two channnel di [2/2]
jintao xu [Tue, 10 Dec 2019 11:20:21 +0000 (19:20 +0800)]
vdec: enable two channnel di [2/2]

PD#SWPL-18329

Problem:
enable two channel di

Solution:
enable two channel di

Verify:
Verify on u212

Change-Id: I4fc94bc45d221432fca15009ebfa4548e756bd83
Signed-off-by: jintao xu <jintao.xu@amlogic.com>
4 years agov4l: optimize the input buff schedule.
Nanxin Qin [Thu, 5 Dec 2019 18:15:41 +0000 (02:15 +0800)]
v4l: optimize the input buff schedule.

Change-Id: I8224639e94696d99484e7cb94c4a0e97457389bd
Signed-off-by: Nanxin Qin <nanxin.qin@amlogic.com>
4 years agoMerge "v4l: fixed the issue of parser. [1/1]" into amlogic-4.9-dev
Zhi Zhou [Wed, 4 Dec 2019 10:10:57 +0000 (02:10 -0800)]
Merge "v4l: fixed the issue of parser. [1/1]" into amlogic-4.9-dev

4 years agodvb: the AD audio output noise. [1/2]
hualing chen [Fri, 29 Nov 2019 12:12:27 +0000 (20:12 +0800)]
dvb: the AD audio output noise. [1/2]

PD#SWPL-17238

Problem:
play Dual_Strm_2PID_swp_AssocRouting_
ddp_DVB_h264_25fps.trp,
the audio output noise.

Solution:
add AUDIO3 type for AD get pes data.
we set default type to BYPASS_PACKET for dvr mode.

Verify:
verify at ac214 in android p.

Change-Id: Ifa70d83eb5f04fd69a9d06bb5c11a2fdd5a7871a
Signed-off-by: hualing chen <hualing.chen@amlogic.com>
4 years agov4l: fixed the issue of parser. [1/1]
Nanxin Qin [Mon, 2 Dec 2019 03:05:46 +0000 (11:05 +0800)]
v4l: fixed the issue of parser. [1/1]

PD#SWPL-17646

Problem:
the stream parse err when the memory alloc failed.

Solution:
1. replace the kmalloc to vmalloc, when there are more
   memory fragments and order that maybe cause alloc failed.
2. reference a unique struct of file_private_data

Verify:
U212

Change-Id: I499c1bb128c929d2144dc3f9f17e8555bd62d5d3
Signed-off-by: Nanxin Qin <nanxin.qin@amlogic.com>
4 years agodecoder: add interface to get vf put count [2/2]
Brian Zhu [Thu, 28 Nov 2019 16:58:03 +0000 (00:58 +0800)]
decoder: add interface to get vf put count [2/2]

PD#SWPL-17393

Problem:
dv el can not drop frame

Solution:
add vf put count for drop frame

Verify:
verified on u212

Change-Id: I5fa699b44f174b27e4a8046cbb026563ea7fb107
Signed-off-by: Brian Zhu <brian.zhu@amlogic.com>
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>