GitHub/LineageOS/G12/android_hardware_amlogic_kernel-modules_media.git
4 years agovdec: Kernel 4.9: codec common/mm for GXLX (S905C) bring up [1/2]
apollo.ling [Fri, 8 May 2020 12:37:53 +0000 (20:37 +0800)]
vdec: Kernel 4.9: codec common/mm for GXLX (S905C) bring up [1/2]

PD#SWPL-24837

Problem:
Kernel 4.9: codec common/mm for GXLX (S905C) bring up

Solution:
Kernel 4.9: codec common/mm for GXLX (S905C) bring up

Verify:
p271

Change-Id: I4c8e6a18b27d7f7e967c5703b575989ee646eb6c
Signed-off-by: apollo.ling <apollo.ling@amlogic.com>
4 years agoh265: fix h265 video jitter. [1/1]
shihong.zheng [Tue, 12 May 2020 09:38:13 +0000 (17:38 +0800)]
h265: fix h265 video jitter. [1/1]

PD#SWPL-24702

Problem:
pts lookup deviated caused jitter.
some frame size is too small for
pts lookup accurately.

Solution:
adjust pts lookup margin accord to frame size.

Verify:
u212

Change-Id: Iea8450c7430cc4b3252b10372c9234188e4fe4a2
Signed-off-by: shihong.zheng <shihong.zheng@amlogic.com>
4 years agodecode: support multi-instance on stream mode. [1/1]
Hui Zhang [Thu, 27 Feb 2020 08:10:45 +0000 (16:10 +0800)]
decode: support multi-instance on stream mode. [1/1]

PD#SWPL-21360

Problem:
can not support multi-instance on stream mode.

Solution:
1. parser's wp and rp operations have been separated from decode.
2. remove register rw of parser from the stream input pipeline.
3. opitimize stbuf involves the struct and adds series of ops fun.
4. defualt used ops with esparser of stbuf, we can force switch
    non-parser mode used by the flag "enable_stream_mode_multi_dec"
    on stream_input.
echo 1 > /sys/module/decoder_common/parameters/enable_stream_mode_multi_dec

Verify:
u212, ab301
1. pass the base playeback that be tested by dailiang.
2. pass the dvb playback that be tested by chenyuanyuan.
3. pass cts testing for media that be tested by zhanggan.

Change-Id: I20abb42f894bee92bd11870b5e293b0f0a941930
Signed-off-by: Hui Zhang <hui.zhang@amlogic.com>
4 years agovh265: fix bug of ucode code segment size exceeding. [1/1]
miaohong chen [Fri, 15 May 2020 09:50:23 +0000 (17:50 +0800)]
vh265: fix bug of ucode code segment size exceeding. [1/1]

PD#SWPL-21638

Problem:
ucode code segment size exceeding

Solution:
Reduce debug code lines

ucode gerrit:109704
ucode commit id:1fb1cba

Verify:
u212

Change-Id: I58f508a194404ff0b2b2c2785795cdfb74388ed1
Signed-off-by: miaohong chen <miaohong.chen@amlogic.com>
4 years agovh265: fix fps statistics error [1/1]
Gan Zhang [Tue, 12 May 2020 06:26:34 +0000 (14:26 +0800)]
vh265: fix fps statistics error [1/1]

PD#SWPL-25770

Problem:
One more fps was counted, resulting in
an error in fps statistics.

Solution:
Only statistics fps once.

Verify:
AC214

Change-Id: I5d7d3f8ea81eaba069d83d8b755c891a29db36c0
Signed-off-by: Gan Zhang <gan.zhang@amlogic.com>
4 years agodvb: Reset the pcr register after reset dmx. [1/1]
Chuanzhi Wang [Wed, 29 Apr 2020 04:28:34 +0000 (12:28 +0800)]
dvb: Reset the pcr register after reset dmx. [1/1]

PD#SWPL-24760

Problem:
pcr value is equal to 0 after reset demux.

Solution:
Reset the pcr register after reset dmx.

Verify:
U215
Signed-off-by: Chuanzhi Wang <chuanzhi.wang@amlogic.com>
Change-Id: Iaaa11af7e18c14f9ad9c64e2551df0140febce75

4 years agovh265: fix bug of error stream cause stuck in stream mode. [1/1]
miaohong chen [Mon, 11 May 2020 07:27:09 +0000 (15:27 +0800)]
vh265: fix bug of error stream cause stuck in stream mode. [1/1]

PD#SWPL-21638

Problem:
ucode parse error stream cause stuck.

Solution:
When the code stream is single tile,
ucode does not judge the end of frame flag, and directly
reports the end of frame interrupt to the driver.

ucode gerrit:108952
ucode commit id:79e4009

Verify:
u212

Change-Id: Ib118cb2caaf9f13be58f6ca95f5f9789e2ad8cb7
Signed-off-by: miaohong chen <miaohong.chen@amlogic.com>
4 years agoamvenc_avc: add interface for setting color space [1/1]
Rico Yang [Sun, 22 Mar 2020 18:27:05 +0000 (02:27 +0800)]
amvenc_avc: add interface for setting color space [1/1]

PD#SWPL-22421

Problem:
h264 encoder needs interface for setting color space

Solution:
add interface for setting color space

Verify:
verified on w400 and 905x3

Change-Id: If7ac9f3ed4a51378574273845733da2155853785
Signed-off-by: Rico Yang <wei.yang@amlogic.com>
4 years agompeg2: dvb mpeg2 crash [1/1]
miaohong chen [Thu, 30 Apr 2020 10:58:50 +0000 (18:58 +0800)]
mpeg2: dvb mpeg2 crash [1/1]

PD#SWPL-25177

Problem:
VMX encrypted stream switch to "BBC MUX uh-ts"
and crash in dvb

Solution:
Non-null judgment on null pointer

Verify:
U215

Change-Id: I638acd8e94fad5ff1f51263c856115af03e4938c
Signed-off-by: miaohong chen <miaohong.chen@amlogic.com>
4 years agov4l: mpeg4 support parse of parms sets by ucode for v4l codec. [2/2]
Peng Yixin [Wed, 1 Apr 2020 02:02:52 +0000 (10:02 +0800)]
v4l: mpeg4 support parse of parms sets by ucode for v4l codec. [2/2]

PD#SWPL-23440

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

Solution:
mpeg4 support parse of parms sets by ucode.
ucode gerrit id: 104148
ucode change id: I6f3ec

Verify:
u212

Change-Id: I8e7b5e4cddee999d3a753ffda3d76d3d90fa93df
Signed-off-by: Peng Yixin <yixin.peng@amlogic.com>
4 years agovdec: Remove the unnecessory warning message in vdec [1/1]
apollo.ling [Sat, 9 May 2020 12:40:46 +0000 (20:40 +0800)]
vdec: Remove the unnecessory warning message in vdec [1/1]

PD#SWPL-25700

Problem:
Sometimes there are some unnecessory warning messages in vdec

Solution:
Remove the unnecessory warning message

Verify:
u212

Change-Id: Icb6dbf6291ee169be06aab39bbc2c53fde92c033
Signed-off-by: apollo.ling <apollo.ling@amlogic.com>
4 years agosubtitle: need to flush memory before read sub data. [1/1]
Nanxin Qin [Sat, 9 May 2020 04:12:32 +0000 (12:12 +0800)]
subtitle: need to flush memory before read sub data. [1/1]

PD#SWPL-25219

Problem:
Caption data acquisition error.

Solution:
flush memory before read sub data.

Verify:
u212

Change-Id: I68963f36a3ff6ceaabe93cd9d9f151ec989805c3
Signed-off-by: Nanxin Qin <nanxin.qin@amlogic.com>
4 years agovmh264: fix bug of h264 stream stuck [1/1]
miaohong chen [Thu, 7 May 2020 08:20:03 +0000 (16:20 +0800)]
vmh264: fix bug of h264 stream stuck [1/1]

PD#SWPL-24006

Problem:
h264 stream stuck.

Solution:
Modify reset judgment condition and
increase counter to avoid misjudgment caused
by subsequent state change

Verify:
u212

Change-Id: Idcdc9ce335561cf0761abeeea11827d50a131720
Signed-off-by: miaohong chen <miaohong.chen@amlogic.com>
4 years agomedia_module: h265 fixed display incorrect pictures [1/1]
Peng yixin [Thu, 30 Apr 2020 02:24:29 +0000 (10:24 +0800)]
media_module: h265 fixed display incorrect pictures [1/1]

PD#SWPL-25170

Problem:
Decoder output one more frame between the
first frame and the second frame.

Solution:
If video file only I frame, the first
frame will output twice, and when the
second frame display, the decoder is
already decoding another frame use
this buffer, resulting in show an
abnormal frame.

Verify:
AB311-B

Change-Id: Ieb9fe19ad8c5eca789e56c72c8dda549dfb1d5b6
Signed-off-by: Peng yixin <yixin.peng@amlogic.com>
4 years agomedia_modules: support standalone build for 4.9 + R [4/5]
Xindong Xu [Wed, 29 Apr 2020 07:33:08 +0000 (15:33 +0800)]
media_modules: support standalone build for 4.9 + R [4/5]

PD#SWPL-23333

Problem:
need to support standalone build for 4.9 + R

Solution:
support standalone build for 4.9 + R

Verify:
franklin

Change-Id: I457648faba7722620a7648160a53d9e0ef679ac2
Signed-off-by: Xindong Xu <xindong.xu@amlogic.com>
4 years agompeg12: improve the error frame drop. [1/1]
shihong.zheng [Tue, 21 Apr 2020 08:52:14 +0000 (16:52 +0800)]
mpeg12: improve the error frame drop. [1/1]

PD#SWPL-22234

Problem:
not smooth after resume playing.
1. frame GOP is dorpped after set
   error skip level 2.
2. first i flag will be clear after timeout,
   so it will cause unsmooth when the B frames
   after first i decode timeout.

Solution:
1. improve the error drop code.
2. the error pic is skiped, but error info saved,
   for example IBBP, the B after first i frame will
   be skipped, but error flag is not cleared. so
   clear last invlid pic error flag before ctx restore
   in ucode.
ucode gerrit id: 106830
ucode change id: I1caffae

Verify:
AC214

Change-Id: Icdb9541b2159804e8690c5b70d8a1cada4e2c2af
Signed-off-by: shihong.zheng <shihong.zheng@amlogic.com>
4 years agomedia_module: Fixed stream buf pollution issue [1/1]
Hui Zhang [Tue, 5 May 2020 02:46:29 +0000 (10:46 +0800)]
media_module: Fixed stream buf pollution issue [1/1]

PD#SWPL-25250

Problem:
when dmc monitor enabled for vdec. there is sometimes error
in swap dma, and cause streambuf context polluted because
cacheline flush

Solution:
use coherent alloc for swap buf.

Verify:
U215

Change-Id: I53a711fbd1c80b8b0c898a33f13f58ee80fd42f6
Signed-off-by: Hui Zhang <hui.zhang@amlogic.com>
4 years agovavs2: Fix avs2 seek crash [1/1]
Hui Zhang [Tue, 28 Apr 2020 02:34:07 +0000 (10:34 +0800)]
vavs2: Fix avs2 seek crash [1/1]

PD#SWPL-25090

Problem:
avs2 playabck in seek, there is a crash  happened sometimes

Solution:
add NULL pointer check before use it

Verify:
u212

Signed-off-by: Hui Zhang <hui.zhang@amlogic.com>
Change-Id: Ida6b7ddc2682823e772e07d765f2ebc9bda18fd5

4 years agommpeg4: fix mpeg4 VTS test fail. [1/1]
Gan Zhang [Sat, 2 May 2020 10:35:41 +0000 (18:35 +0800)]
mmpeg4: fix mpeg4 VTS test fail. [1/1]

PD#SWPL-25004

Problem:
State transition timeout in VTS test.

Solution:
remove some print in default output print.

Verify:
AC232

Change-Id: I8baafd4c27dedb65d186c542f0b08a886f94f970
Signed-off-by: Gan Zhang <gan.zhang@amlogic.com>
4 years agomedia: fix mpeg4 and mjpeg crash in VTS test. [1/1]
Gan Zhang [Wed, 29 Apr 2020 08:30:41 +0000 (16:30 +0800)]
media: fix mpeg4 and mjpeg crash in VTS test. [1/1]

PD#SWPL-25004

Problem:
The variable(hw->platform_dev) is null when used in DECODE_ID(hw).

Solution:
Initialize the variable(hw->platform_dev) before use.

Verify:
U212

Change-Id: Icdc43efd424e2a3ae61e82aa2b46d4b5f4f060c5
Signed-off-by: Gan Zhang <gan.zhang@amlogic.com>
4 years agov4l2: skip size check for dmabuf on output port [1/1]
Song Zhao [Thu, 30 Apr 2020 23:39:05 +0000 (16:39 -0700)]
v4l2: skip size check for dmabuf on output port [1/1]

PD#SWPL-25323

Problem:
When dmabuf is used on output port, the size of it is decided by the
allocator. But when REQBUFS is called to setup the vb2 queue, the
minimium size of plane is returned by queue_setup(). It will lead to a
sanity check failure in __qbuf_dmabuf().

Solution:
When dmabuf mode is used on output port. queue_setup() will return size
0 for it. And vb2 will use the size of the dmabuf itself.

Verify:
U212 + Cobalt + WV

Change-Id: I47c375f587fd40f4b187d747a58ef8ff0f4214ca
Signed-off-by: Song Zhao <song.zhao@amlogic.com>
4 years agodmx: PVR video playback appears stutter sometimes. [1/1]
hualing chen [Tue, 28 Apr 2020 11:08:50 +0000 (19:08 +0800)]
dmx: PVR video playback appears stutter sometimes. [1/1]

PD#SWPL-25042

Problem:
switch channel when recording,
PVR video playback appears stutter sometimes.

Solution:
1. check dmx source when set dmx source.
2. check stb source when set stb source.
3. check async fifo info when set reg.

Verify:
verified on 215.

Change-Id: I529fcfba536e2d0010cb4022517bd0f9fe637f0c
Signed-off-by: hualing chen <hualing.chen@amlogic.com>
4 years agov4l2: fill all fields in S_FMT [1/1]
Song Zhao [Mon, 27 Apr 2020 06:33:08 +0000 (23:33 -0700)]
v4l2: fill all fields in S_FMT [1/1]

PD#SWPL-23981

Problem:
Application will use the w/h returned by S_FMT for resolution change.

Solution:
When decoder has correct information after PROBE state, fill all format
fields

Verify:
U212 Cobalt

Change-Id: I7f68b3dd608a6b5d429312f10f2006404b6daa81
Signed-off-by: Song Zhao <song.zhao@amlogic.com>
4 years agovdec: add vdetect in path. [1/1]
renjiang.han [Tue, 31 Mar 2020 10:04:36 +0000 (18:04 +0800)]
vdec: add vdetect in path. [1/1]

PD#SWPL-19199

Problem:
add vdetect module for vnn scene judgment feature.

Solution:
Add the vdetect module to provide vf data for vnn to judge the scene.
set /sys/module/decoder_common/parameters/debug_vdetect to 0 can close
vdetect module function. The default of the vdetect module is closed.

Verify:
on ab301

Change-Id: Id8cce2a017f2cae3835c96668e13c457ed17929f
Signed-off-by: renjiang.han <renjiang.han@amlogic.com>
4 years agoRevert "vmh264: fix playback hangup issue in dvb. [1/1]"
Hui Zhang [Wed, 29 Apr 2020 08:35:15 +0000 (01:35 -0700)]
Revert "vmh264: fix playback hangup issue in dvb. [1/1]"

This reverts commit 810fa87b1139451bfe887f5ec3a2fdf214010ad6.

Change-Id: I66c488614bdd0e0aaf32c686a68dabf12d258a23

4 years agosub: fix the demux driver to support amsub interface. [1/1]
Gong Ke [Mon, 27 Apr 2020 10:25:21 +0000 (18:25 +0800)]
sub: fix the demux driver to support amsub interface. [1/1]

PD#SWPL-24950

Problem:
amsub interface cannot be used.

Solution:
fixed demux driver to support use amsub interface.

Verify:
need verify on subtitle service.

Signed-off-by: Gong Ke <ke.gong@amlogic.com>
Change-Id: Ie6792bd8c876f6165ce67633353d1a16be5aaee7

4 years agodecoder: vp9 and av1 format cann't keep yuv data. [2/2]
Gan Zhang [Thu, 16 Apr 2020 08:29:01 +0000 (16:29 +0800)]
decoder: vp9 and av1 format cann't keep yuv data. [2/2]

PD#SWPL-21296

Problem:
When double write is 3, because the keep in mem_head_handle is the
compressed data header and there is no keep to yuv data,the display
before starting to play is dirty data.

Solution:
Add mem_vf_handle to keep display yuv data.

Verify:
U212

Change-Id: I982fb1e7fd593abf11a94837a15d632a578edd1a
Signed-off-by: Gan Zhang <gan.zhang@amlogic.com>
4 years agomedia_module: Fixed h265 playback crash [1/1]
Yixin Peng [Sat, 4 Apr 2020 07:48:18 +0000 (15:48 +0800)]
media_module: Fixed h265 playback crash [1/1]

PD#SWPL-23625

Problem:
On the GXL, ucode loaded by 4k and 1080p in
h265 format is different, but we think
that the same ucode is loaded by h265,
so the different ucode is not loaded repeatedly,
which leads system restart.

Solution:
This problem is solved by reloading
the ucode each time when the decoder
instance switch.

Verify:
u212

Change-Id: I5f4c105a19e72199eee7276813bcad6a6e07a1bd
Signed-off-by: Yixin Peng <yixin.peng@amlogic.com>
4 years agomedia_module: h264 random appears playback jitter [1/1]
Peng yixin [Wed, 22 Apr 2020 11:36:25 +0000 (19:36 +0800)]
media_module: h264 random appears playback jitter [1/1]

PD#SWPL-24469

Problem:
h264 random appears playback jitter

Solution:
1. Decode the value of pic_struct not
assigned correctly in the first frame.
2. Solve the problem of top bottom inversion issue.

Verify:
U212

Change-Id: I576046f9f9813d392f83b4cf78b98e9cef224d68
Signed-off-by: Peng yixin <yixin.peng@amlogic.com>
4 years agodvb: control section monitor error times,default is enable and count is 2 [1/1]
Chuangcheng Peng [Wed, 22 Apr 2020 03:14:42 +0000 (11:14 +0800)]
dvb: control section monitor error times,default is enable and count is 2 [1/1]

PD#SWPL-24657

Problem:
 some projects need to section monitor.

Solution:
 monitor section set default is enable

Verify:
 not verify.

Change-Id: I1c544ec89e8d4d83a31af05f1f1c2fa9a6e41bf2
Signed-off-by: Chuangcheng Peng <chuangcheng.peng@amlogic.com>
4 years agoMerge "vdec: add sidebind interface for decoder [1/2]" into amlogic-4.9-dev
Hui Zhang [Fri, 24 Apr 2020 13:54:03 +0000 (06:54 -0700)]
Merge "vdec: add sidebind interface for decoder [1/2]" into amlogic-4.9-dev

4 years agovmh264: fix playback hangup issue in dvb. [1/1]
Hui Zhang [Fri, 24 Apr 2020 07:44:49 +0000 (15:44 +0800)]
vmh264: fix playback hangup issue in dvb. [1/1]

PD#SWPL-24006

Problem:
driver alwasy in loop check run ready after some error happened, no buffer available

Solution:
if no buffer available to run, force free an unused buf.
and decoding move on

Verify:
AC214

Signed-off-by: Hui Zhang <hui.zhang@amlogic.com>
Change-Id: I0e90fae5fdd201ba0c334e5847fa08f335d9e422

4 years agovdec: add sidebind interface for decoder [1/2]
apollo.ling [Tue, 21 Apr 2020 12:25:14 +0000 (20:25 +0800)]
vdec: add sidebind interface for decoder [1/2]

PD#SWPL-24413

Problem:
decoder receive sidebind type id and set to vf

Solution:
add this new feature

Verify:
u212

Change-Id: If4c36a07dc8cdde17ec55269a8db943ef0aec82d
Signed-off-by: apollo.ling <apollo.ling@amlogic.com>
4 years agoMerge "demux: fix ARB flush momery issue. [1/1]" into amlogic-4.9-dev
Zhi Zhou [Thu, 23 Apr 2020 13:18:35 +0000 (06:18 -0700)]
Merge "demux: fix ARB flush momery issue. [1/1]" into amlogic-4.9-dev

4 years agomedia_module: fixed h264 playback stuck issue [1/1]
Peng Yixin [Thu, 16 Apr 2020 08:56:18 +0000 (16:56 +0800)]
media_module: fixed h264 playback stuck issue [1/1]

PD#SWPL-24328

Problem:
If I frame is followed by frame B of the
previous GOP in the bitstream, it cause
that the B frame cannot find enough
reference frames after the operation of
buffer reset, resulting in reset the
buffer repeatedly, causing playback stuck.

Solution:
For this type of B frame, since the B
frame will not be displayed, we no need
to detect the frame reference relationship,
so the reset buffer will not be operation
repeatedly.

Verify:
U212

Change-Id: I311ea0787a4258b71f8f38b20247c4303c51a36c
Signed-off-by: Peng Yixin <yixin.peng@amlogic.com>
4 years agodemux: fix ARB flush momery issue. [1/1]
Yahui Han [Thu, 23 Apr 2020 06:11:26 +0000 (14:11 +0800)]
demux: fix ARB flush momery issue. [1/1]

PD#SWPL-24235

Problem:
SWPL-24235/SWPL-23934.

Solution:
1. add stored_page for asyncfifo.
2. add addr condition judge for secure dvr.
3. enable section monitor

Verify:
u215

Change-Id: I8e3e36f37aadc38b521f1f3c53e3e69154a9db53
Signed-off-by: yahui.han <yahui.han@amlogic.com>
4 years agoRevert "demux: dsc source enable [1/1]"
Chuangcheng Peng [Thu, 23 Apr 2020 05:28:33 +0000 (22:28 -0700)]
Revert "demux: dsc source enable [1/1]"

This reverts commit af807021e3027c96efa6bb6792b4fa134b4c9909.

Change-Id: I945b0f9f3d49dd6c0d0decddcf58de7c5b9fefba

4 years agoav1: fix 8k crash when max size error. [1/1]
shihong.zheng [Tue, 21 Apr 2020 13:01:27 +0000 (21:01 +0800)]
av1: fix 8k crash when max size error. [1/1]

PD#SWPL-23774

Problem:
av1 8k crash when the max size error.

Solution:
get the resolution from sequece header,
and resize the mmu map size.

Verify:
ab311

Change-Id: If3ca0b0037dc06bd20b85b15288764cff76b4e7e
Signed-off-by: shihong.zheng <shihong.zheng@amlogic.com>
4 years agodemux: dsc source enable [1/1]
Chuangcheng Peng [Fri, 3 Apr 2020 06:06:44 +0000 (14:06 +0800)]
demux: dsc source enable [1/1]

PD#SWPL-23541

Problem:
  REE set dsc source don't work in time.

Solution:
  add set dsc source work in time.

Verify:
  irdeto cas verify.

Change-Id: I761b6c18a68fbc35dcf6d26e75cb3a0904a9c1a2
Signed-off-by: Chuangcheng Peng <chuangcheng.peng@amlogic.com>
4 years agoasyncfifo: secure dvr IRQ used external buf size [1/1]
pengfei.liu [Thu, 16 Apr 2020 16:06:22 +0000 (00:06 +0800)]
asyncfifo: secure dvr IRQ used external buf size [1/1]

PD#SWPL-23704

Problem:
Record 4K secure content may have error data

Solution:
1. increase Secure buffer size to 2M
2. DVR IRQ used external buffer size

Verify:
Android 10 + AC214

Signed-off-by: pengfei.liu <pengfei.liu@amlogic.com>
Change-Id: I335597a4c76f620405a40b7d600ccf9ecbe16164

4 years agovc1: fixed the crash when some vc1 video ff. [1/1]
shilong.yang [Tue, 21 Apr 2020 02:46:33 +0000 (10:46 +0800)]
vc1: fixed the crash when some vc1 video ff. [1/1]

PD#SWPL-24046

Problem:
fast forward vc1 video, crash happened.

Solution:
reset vdec status when resume.

Verify:
TM2

Change-Id: I12b46fcaf11ed17bf52068de8d2b5822b089e1e8
Signed-off-by: shilong.yang <shilong.yang@amlogic.com>
4 years agovdec: 805 add di support [1/1]
jintao xu [Wed, 1 Apr 2020 08:58:38 +0000 (16:58 +0800)]
vdec: 805 add di support [1/1]

PD#SWPL-23335

Problem:
805 not support di

Solution:
vfm add di

Verify:
p212

Change-Id: I87a61909f748b1723a8c015587db876b9f8a0d9b
Signed-off-by: jintao xu <jintao.xu@amlogic.com>
4 years agovdec: add kpi trace log. [2/3]
jianchuan.ping [Fri, 13 Mar 2020 06:33:59 +0000 (14:33 +0800)]
vdec: add kpi trace log. [2/3]

PD#SWPL-21061

Problem:
Missing trace log in vdec module for kpi purpose

Solution:
Add trace log in video decoder driver including
H264-MultiInstance
H265
Mpeg12-MultiInstance

Verify:
AC214

Change-Id: I0177e571fdcc5064c1af9fc35be30962e386b775
Signed-off-by: jianchuan.ping <jianchuan.ping@amlogic.com>
4 years agovmh264: fix video jitter bug [1/1]
miaohong chen [Thu, 16 Apr 2020 02:57:27 +0000 (10:57 +0800)]
vmh264: fix video jitter bug [1/1]

PD#SWPL-24276

Problem:
Interlaced stream jitter.

Solution:
This type of stream consists of a pack of two fields
and a pack of single fields.
When the second field is the same as the pts of the first field,
the display module will drop the second field, causing jitter.
The pts of the second field needs to be set to 0,
and the display module reconstructs the pts
through duration / 2 to output the second field.

Verify:
u212

Change-Id: I53b0c4104c5e21a98423e49bb27831b1e9b20e11
Signed-off-by: miaohong chen <miaohong.chen@amlogic.com>
4 years agoh265: fix hevc interlace video freeze. [1/1]
shihong.zheng [Thu, 19 Mar 2020 06:35:58 +0000 (14:35 +0800)]
h265: fix hevc interlace video freeze. [1/1]

PD#OTT-9097

Problem:
hevc interlace video freeze after seek or
stress test.

Solution:
use max dec pic num for hevc interlace.
fix vf ref consume abnormal.

Verify:
u212

Change-Id: I4810130e05d10f14d637b455ff4880f1dde758bc
Signed-off-by: shihong.zheng <shihong.zheng@amlogic.com>
4 years agoopes: 8 bytes lost in the end of opes [1/1]
Zhiqiang Han [Thu, 26 Mar 2020 10:47:24 +0000 (18:47 +0800)]
opes: 8 bytes lost in the end of opes [1/1]

PD#SWPL-23950

Problem:
lost 8 bytes of data in ob buf,
as the wr ptr is used continuously,
the lost always occurs at the end of filtering.

Solution:
use the correct wr ptr.

Verify:
project verify

Change-Id: Id1c6a372fba4bf72b34902e81027b65c5b457a0a
Signed-off-by: Zhiqiang Han <zhiqiang.han@amlogic.com>
4 years agodvb: add variable to control section monitor [1/1]
Chuangcheng Peng [Wed, 15 Apr 2020 09:36:36 +0000 (17:36 +0800)]
dvb: add variable to control section monitor [1/1]

PD#OTT-9397

Problem:
 play video, it do not smooth.

Solution:
 monitor section, some stream will reset dmx
 it will cause video that don't smooth, add variable
 to control, default disable.

Verify:
 not verify.

Change-Id: I53e044a6765581ed16b011e0712b6acd7369d6a4
Signed-off-by: Chuangcheng Peng <chuangcheng.peng@amlogic.com>
4 years agodemux: fixed ts3 serial use s2p not work [1/1]
Chuangcheng Peng [Tue, 7 Apr 2020 05:05:28 +0000 (13:05 +0800)]
demux: fixed ts3 serial use s2p not work [1/1]

PD#TV-16787

Problem:
tsin_c serial input not work.

Solution:
correct to use s2p.

Verify:
verify at T962X3-AB301

Change-Id: I47c69fbb1ac00be535fbd448271a0a3068912b85
Signed-off-by: Chuangcheng Peng <chuangcheng.peng@amlogic.com>
4 years agomedia_modules: add jpeg encoder [1/1]
Rico Yang [Fri, 20 Mar 2020 16:08:27 +0000 (00:08 +0800)]
media_modules: add jpeg encoder [1/1]

PD#SWPL-18749

Problem:
tm2 needs hw jpeg encoder

Solution:
porting jpeg encoder driver

Verify:
verified on t962x3 ab301

Change-Id: I8c0d537c44cd7e9589b8d78d9647b7a74186af39
Signed-off-by: Rico Yang <wei.yang@amlogic.com>
4 years agoav1: fix 8k too many memory consume. [1/1]
shihong.zheng [Mon, 13 Apr 2020 13:03:18 +0000 (21:03 +0800)]
av1: fix 8k too many memory consume. [1/1]

PD#SWPL-24045

Problem:
8k av1 too many scatter alloc from sys, cause
out of memory and reboot.
av1 unsupport seek.

Solution:
1. av1 support seek;
2. optimize mv buffer alloc size;
3. change max pic width or height when no config from omx;
4. vcodec profile support av1 8k;
5. reduce some buffers for 8K play.

Verify:
ab311

Change-Id: I21e735049e5600fa95cd80c8434bda7e317ea777
Signed-off-by: shihong.zheng <shihong.zheng@amlogic.com>
4 years agofw: fixed the warning of KASAN. [1/1]
Nanxin Qin [Wed, 15 Apr 2020 07:49:41 +0000 (15:49 +0800)]
fw: fixed the warning of KASAN. [1/1]

PD#SWPL-24231

Problem:
slab-out-of-bounds in get_firmware_data

Solution:
the wrong of raw data size that include header size,
It caused out of bounds for read buffer.

Verify:
AB301

Change-Id: I324dac8b9db79a4c92555840b1a5298a4511b551
Signed-off-by: Nanxin Qin <nanxin.qin@amlogic.com>
4 years agodmx: Do timeshift than FF,the progress bar time display error. [1/2]
hualing chen [Tue, 7 Apr 2020 08:04:44 +0000 (16:04 +0800)]
dmx: Do timeshift than FF,the progress bar time display error. [1/2]

PD#SWPL-23655

Problem:
get delay time error.

Solution:
1.init vpts first vpts.
2.reset vpts first vpts when reset channel.

Verify:
verified on 214.

Change-Id: I6db97e2a0be6aa4270892a173b5e33f5deb36400
Signed-off-by: hualing chen <hualing.chen@amlogic.com>
4 years agomedia_modules: modify tuner and demod attach struct [2/3]
nengwen.chen [Fri, 10 Apr 2020 06:28:38 +0000 (14:28 +0800)]
media_modules: modify tuner and demod attach struct [2/3]

PD#SWPL-23756

Problem:
1.modify tuner and demod attach struct.

Solution:
1.modify tuner and demod attach struct.

Verify:
Verified by tl1, tm2, sm1.

Signed-off-by: nengwen.chen <nengwen.chen@amlogic.com>
Change-Id: I25bd9859553144c6a71f11c05aaabe0d4b093d71

4 years agomedia_modules: add some variables for driver interface [1/2]
apollo.ling [Sat, 14 Mar 2020 06:46:04 +0000 (14:46 +0800)]
media_modules: add some variables for driver interface [1/2]

PD#SWPL-21057

Problem:
some variable values obtained from the new driver interface are abnormal

Solution:
add the missing variables for driver interace

Verify:
x301,u212

Change-Id: I8d99820e7afcba2acd2adb39af7aa83911293f26
Signed-off-by: apollo.ling <apollo.ling@amlogic.com>
4 years agoav1: av1 support dv frame mode. [1/2]
shihong.zheng [Thu, 26 Mar 2020 07:30:04 +0000 (15:30 +0800)]
av1: av1 support dv frame mode. [1/2]

PD#SWPL-22440

Problem:
av1 support frame mode dolby vision.

Solution:
add av1 dv deivece and set dvbl provide name
when dual flag.
add without display node for debug.

Verify:
ab311

Change-Id: I7b4f154ca565b8dd0ff8e91071fe030cdb4bdb98
Signed-off-by: shihong.zheng <shihong.zheng@amlogic.com>
4 years agoav1: fix av1 mosaics. [1/1]
shihong.zheng [Wed, 8 Apr 2020 02:27:43 +0000 (10:27 +0800)]
av1: fix av1 mosaics. [1/1]

PD#SWPL-23681

Problem:
av1 video mosaics both compress and dw picture.

Solution:
TM2_REVB_FORCE_PALETTE_CLK_ON for tm2 revb.
defined is for TM2_REVB chip only. no need for other chips.
gerrit id: 104752
change id: I20bb44
commit id: c2b25e5

Verify:
tm2 revb ab311

Change-Id: Id3b5f955efcc5253d19fb13554a35783dc3ff015
Signed-off-by: shihong.zheng <shihong.zheng@amlogic.com>
4 years agovdec: secure add di [1/1]
jintao xu [Tue, 31 Mar 2020 09:31:49 +0000 (17:31 +0800)]
vdec: secure add di [1/1]

PD#SWPL-23144

Problem:
secure not di

Solution:
secure vfm add di

Verify:
AC-214

Change-Id: I3ccab38b3178a29445ed651b43c046491de81e8f
Signed-off-by: jintao xu <jintao.xu@amlogic.com>
4 years agofw: fixed issue of loading faild on aosp. [1/1]
Nanxin Qin [Wed, 8 Apr 2020 06:42:19 +0000 (14:42 +0800)]
fw: fixed issue of loading faild on aosp. [1/1]

PD#SWPL-23530

Problem:
fixed issue of loading faild on aosp.

Solution:
the dup feature default size is 0, we must be reset the
value after parser the fw data.

Verify:
ab311

Change-Id: If7b36ca3b91ec81499da4f49ff5cff6385524035
Signed-off-by: Nanxin Qin <nanxin.qin@amlogic.com>
4 years agoRevert "Vp9: Garbage picturen appears at the begin [1/1]"
Hui Zhang [Wed, 8 Apr 2020 06:58:46 +0000 (22:58 -0800)]
Revert "Vp9: Garbage picturen appears at the begin [1/1]"

This reverts commit 0d6cc485a7aea8bd01e01504f2067f5af37550b5.

Change-Id: I2931f79d892a0b6426b4cfebe86b98ba39b119b7

4 years agoVp9: Garbage picturen appears at the begin [1/1]
Gan Zhang [Wed, 25 Mar 2020 08:22:48 +0000 (16:22 +0800)]
Vp9: Garbage picturen appears at the begin [1/1]

PD#SWPL-21296

Problem:
When double write is 3, because the keep in mem_head_handle is the
compressed data header and there is no keep to yuv data,
the display before starting to play is dirty data.

Solution:
Change the data in mem_head_handle to yuv data.

Verify:
U212

Change-Id: I0e867152079c704173878a3c7bd939c62b141b44
Signed-off-by: Gan Zhang <gan.zhang@amlogic.com>
4 years agovdec: clean up debug log. [1/1]
joy.rao [Wed, 8 Apr 2020 04:07:49 +0000 (12:07 +0800)]
vdec: clean up debug log. [1/1]

PD#SWPL-23474

Problem:
need clean up some debug log

Solution:
clean up debug log.

Verify:
u212

Change-Id: I066ddec0a660062ed977992f997c213757adf847
Signed-off-by: joy.rao <joy.rao@amlogic.com>
4 years agodecoder: fix ff/fb for mpeg4&mpeg12&h265 format is abnormal. [1/2]
yanan.wang [Thu, 19 Mar 2020 11:39:31 +0000 (19:39 +0800)]
decoder: fix ff/fb for mpeg4&mpeg12&h265 format is abnormal. [1/2]

PD#SWPL-23122

Problem:
when ff/fb for mpeg4&mpeg12&h265 on trick mode is abnormal.

Solution:
add mpeg4&mpeg12&h265 TRICKMODE_I function.

Verify:
u212

Change-Id: If378a1d0d85f7212316d6c15ceff6becd0130071
Signed-off-by: yanan.wang <yanan.wang@amlogic.com>
4 years agofw: update ucode package video_ucode_v0.2.bin. [1/1]
Nanxin Qin [Mon, 16 Mar 2020 08:51:06 +0000 (16:51 +0800)]
fw: update ucode package video_ucode_v0.2.bin. [1/1]

PD#SWPL-23530

Problem:
it is the reason that the memory for secure os is not enough, we have to
optimize the size of firmware TA and ucode package, the version 0.2 is a
new design for ucode manager and save space of storage.

Solution:
updata ucode package of version 0.2.
ucode commit: e6fe92e9dabf13e6cc2d095d98e7d938cc811c8a

Verify:
p212, ac214

added duplicate feature to remove firmware redundancy to save storage space.

Change-Id: Ibcaca6e46e2c5c15ecfad4d308c87caf29047fca
Signed-off-by: Nanxin Qin <nanxin.qin@amlogic.com>
4 years agoav1: fix av1 frame mode pts wrong. [1/1]
shihong.zheng [Sat, 4 Apr 2020 07:36:46 +0000 (15:36 +0800)]
av1: fix av1 frame mode pts wrong. [1/1]

PD#SWPL-23502

Problem:
1.av1 frame mode pts wrong and not fluency.
  flash noisy on picture.
2. av1 use vp9 words.

Solution:
1. clear input chunks pts after used, so the remain
   frame in one packet will set pts 0. buffering input
   chunks pts, and use it when the output pic pts is 0.
2. replace vp9 to av1 in av1 driver.

Verify:
ab311

Change-Id: Ib1a4063c9aafc1307bdc2c5912005daf26af6681
Signed-off-by: shihong.zheng <shihong.zheng@amlogic.com>
4 years agovh265: fix frame output issue [1/1]
Hui Zhang [Sun, 5 Apr 2020 06:01:03 +0000 (14:01 +0800)]
vh265: fix frame output issue [1/1]

PD#SWPL-23636

Problem:
commit 98920 introduce this issue. first frame
will be output twice with same vf. because
first frame pic->num_reorder_pic was set to 0
by fast output. next output check will use
this flag and output it again.
which also cause cts and autotest fail

Solution:
for first output,using hevc->sps_num_reorder_pics_0
to check fast output

Verify:
AB311

Change-Id: I89ba47b7295b737325aa738caba273398177fe47
Signed-off-by: Hui Zhang <hui.zhang@amlogic.com>
4 years agov4l2: fix kernel panic after EOS [1/1]
Song Zhao [Thu, 20 Feb 2020 05:43:28 +0000 (21:43 -0800)]
v4l2: fix kernel panic after EOS [1/1]

PD#SWPL-20924

Problem:
After EOS, if there are still frames in dpb, vdec_v4l2_buffer can not be
fetched from vframe. Because rest flow already clear all buffer_specs[].

Solution:
Check for valid v4l_mem_handle

Verify:
U212

Change-Id: I6e22f538bbe01b258acf2b2f6cb5411fdc89e1c4
Signed-off-by: Song Zhao <song.zhao@amlogic.com>
4 years agohwdmux: add parser mediaconfig [2/2]
rongrong zhou [Thu, 2 Apr 2020 07:53:53 +0000 (15:53 +0800)]
hwdmux: add parser mediaconfig [2/2]

PD#SWPL-22965

Problem:
can not get stb pts

Solution:
add parser mediaconfig to get pts

Verify:
AC214

Signed-off-by: rongrong zhou <rongrong.zhou@amlogic.com>
Change-Id: I1f0cccc63ecc45cd470de2145d810a601c853a8e

4 years agoav1: fix some av1 issues [1/1]
shihong.zheng [Wed, 1 Apr 2020 02:51:28 +0000 (10:51 +0800)]
av1: fix some av1 issues [1/1]

PD#SWPL-18751

Problem:
1. av1 dv get meta data wrong;
2. play av1 pending;
3. hdr video_signal_type and metadata support.

Solution:
1. fix set metadata wrong and support hdr
metadata upload.
2. get video_signal_type from ucode.
3. waiting dma done and waiting more at end of frame.
ucode gerrit id: 103792
ucode commit id: e6fe92e9d

Verify:
ab311

Change-Id: I785b5c3cb0da3d708c4b42c3d995f5a6763a5575
Signed-off-by: shihong.zheng <shihong.zheng@amlogic.com>
4 years agov4l2: buffer not returned in DMABUF mode [1/1]
Song Zhao [Wed, 1 Apr 2020 20:48:10 +0000 (13:48 -0700)]
v4l2: buffer not returned in DMABUF mode [1/1]

PD#SWPL-23493

Problem:
aml_recycle_dma_buffers() is only called when aml_vdec_worker() is
schedule. If all buffers are queued into output port, application will
have no extra output buffer to trigfer aml_vdec_worker(). It will lead
to freed buffer inside input->vframe_block_free_list can not be returned
to application.  Thus, deadlock.

Solution:
Trigger aml_recycle_dma_buffers when capture buffer is dquened.

Verify:
U212

Change-Id: I8314bced72abc715ed371ce503976d4b447d9037
Signed-off-by: Song Zhao <song.zhao@amlogic.com>
4 years agov4l: fixed the issue of enum framesize. [1/1]
Nanxin Qin [Tue, 31 Mar 2020 10:38:32 +0000 (18:38 +0800)]
v4l: fixed the issue of enum framesize. [1/1]

PD#SH-2866

Problem:
can not playback 4k source on the platform linux.

Solution:
1. add type of picture format for enum frameszie.
2. change the value of stepwise to avoid pic size not match.

Verify:
w200

Change-Id: I336dea84062f79e3cd2d875cfb64bf4781cfa8de
Signed-off-by: Nanxin Qin <nanxin.qin@amlogic.com>
4 years agoav1: fix av1 av out of sync issue in frame mode. [1/1]
Hui Zhang [Wed, 1 Apr 2020 05:45:03 +0000 (13:45 +0800)]
av1: fix av1 av out of sync issue in frame mode. [1/1]

PD#SWPL-18571

Problem:
av1 av out of sync in frame mode

Solution:
use duration to cal new pts for NON-KEYFRAME, because
multi-frames in one packet might cause frame vpts is missed

Verify:
ab311

Change-Id: Id77cabcbe7940afc2a9056251b37073272e9d11c
Signed-off-by: Hui Zhang <hui.zhang@amlogic.com>
4 years agoav1: fix av1 decode timeout and crash. [1/1]
shihong.zheng [Mon, 30 Mar 2020 10:02:35 +0000 (18:02 +0800)]
av1: fix av1 decode timeout and crash. [1/1]

PD#SWPL-23300

Problem:
av1 decode timeout and crash.

Solution:
check pic_config null value.
timeout return when isr process busy.
disable timeout for mosaic issue.

Verify:
ab311

Change-Id: Ib55dd451e198aaab42d15f5611837fe7377c59eb
Signed-off-by: shihong.zheng <shihong.zheng@amlogic.com>
4 years agov4l: mpeg2 support parse of parms sets by ucode for v4l codec. [2/2]
Peng Yixin [Thu, 12 Mar 2020 09:13:44 +0000 (17:13 +0800)]
v4l: mpeg2 support parse of parms sets by ucode for v4l codec. [2/2]

PD#SWPL-21525

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

Solution:
1.mpeg2 support parse of parms sets by ucode.
2.Optimize the v4l2 code
3.Ucode parser is set by default.
ucode gerrit : 101628
ucode commit id: be19953

Verify:
u212

Change-Id: I284c9750c118edc607ea72c8ff5a94d196dfc529
Signed-off-by: Peng Yixin <yixin.peng@amlogic.com>
4 years agoh264: sps info wrong in ucode [1/1]
Hui Zhang [Tue, 31 Mar 2020 01:13:40 +0000 (09:13 +0800)]
h264: sps info wrong in ucode [1/1]

PD#SWPL-23224

Problem:
sps info was wrong write to sps base. because
missing a write lmem after parser . so following
info is wrong

Solution:
add this write lmem for correct sps memory locate
ucode gerrit : 103386
ucode commit id: 616d7

Verify:
U212

Change-Id: I51790e1e0ae441168d64d7e8359072e9ac32d031
Signed-off-by: Hui Zhang <hui.zhang@amlogic.com>
4 years agov4l: fixed the issue of crash on multi-inst when the app exit. [1/1]
Nanxin Qin [Wed, 25 Mar 2020 10:35:49 +0000 (18:35 +0800)]
v4l: fixed the issue of crash on multi-inst when the app exit. [1/1]

PD#SH-3015

Problem:
Exit double decoder playback  cause system reboot

Solution:
1. have an issue with waiting decoding ending thas has fixed.
2. we must be ensure the job statue switched when invoke m2m pause.
3. to protect the list of capture thread.

Verify:
u212

Change-Id: I389b541d48b3460ef004a89df921f88cf6bee196
Signed-off-by: Nanxin Qin <nanxin.qin@amlogic.com>
4 years agov4l: Resolve resolutions change at the end of a file [1/1]
Peng Yixin [Wed, 18 Mar 2020 07:35:45 +0000 (15:35 +0800)]
v4l: Resolve resolutions change at the end of a file [1/1]

PD#SWPL-23321

Problem:
Resolutions change at the end of a file, it cause playback stuck or
exit playback.

Solution:
Add eos events to distinguish between resolution change event.

Verify:
u212

Change-Id: Iec972284d7a0f3ad6cfac6375efa16e1b5c7b87e
Signed-off-by: Peng Yixin <yixin.peng@amlogic.com>
4 years agoav1: fix the film grain double write block problem. [1/1]
shihong.zheng [Mon, 30 Mar 2020 03:29:27 +0000 (11:29 +0800)]
av1: fix the film grain double write block problem. [1/1]

PD#SWPL-18751

Problem:
film grain stream will be block when decode second frame.

Solution:
avoid using a reg which inuse.
gerrit id: 103421
commit id: d59479f2b

Verify:
ab311

Change-Id: I5b2eadd9cbd72980b3123091a029cb5787f4a2ba
Signed-off-by: shihong.zheng <shihong.zheng@amlogic.com>
4 years agoav1: fix multi frame in one packet. [1/1]
shihong.zheng [Fri, 27 Mar 2020 02:28:49 +0000 (10:28 +0800)]
av1: fix multi frame in one packet. [1/1]

PD#SWPL-18751

Problem:
av1 frame mode mosaic. multi frames in
one packet.

Solution:
continue decode next frame for the remaining
data in the packet.

Verify:
ab311

Change-Id: I6311d8aa8ea7ac724d96c1b64aca82f1605a9d1c
Signed-off-by: shihong.zheng <shihong.zheng@amlogic.com>
4 years agovav1: fix film grain 10bit video decode timeout. [1/1]
shihong.zheng [Thu, 26 Mar 2020 02:58:31 +0000 (10:58 +0800)]
vav1: fix film grain 10bit video decode timeout. [1/1]

PD#SWPL-18751

Problem:
film grain 10bit mosaic and some frames decode timeout.

Solution:
wait film grain status read done.
gerrit id: 103068
commit id: 8ec5c842

Verify:
ab311

Change-Id: I018f8c972863364840504976e4b473475e54d929
Signed-off-by: shihong.zheng <shihong.zheng@amlogic.com>
4 years agompeg12: close debug print log. [1/1]
shihong.zheng [Mon, 23 Mar 2020 11:57:00 +0000 (19:57 +0800)]
mpeg12: close debug print log. [1/1]

PD#SWPL-22905

Problem:
mpeg12 too many debug print log.

Solution:
change print level for debug log.

Verify:
X301

Change-Id: Ic3f53c47f2f810081ce6da241e2ef516357cc8aa
Signed-off-by: shihong.zheng <shihong.zheng@amlogic.com>
4 years agovdec: remove vdec from connected_vdec_list before release it [1/1]
apollo.ling [Wed, 25 Mar 2020 08:09:54 +0000 (16:09 +0800)]
vdec: remove vdec from connected_vdec_list before release it [1/1]

PD#TV-16434

Problem:
When timeout happens both in vdec_disconnect and platform_device_unregister,
we release the vdec, but the vdec still in connected_vdec_list

Solution:
remove vdec from connected_vdec_list before release it

Verify:
X301

Change-Id: I6d732213a4929b2ba718d92bfb64a3e3d154551b
Signed-off-by: apollo.ling <apollo.ling@amlogic.com>
4 years agoav1: porting av1 dv and fg code. [1/1]
shihong.zheng [Sat, 21 Mar 2020 07:41:05 +0000 (15:41 +0800)]
av1: porting av1 dv and fg code. [1/1]

PD#SWPL-18751

Problem:
tm2 revb av1 bringup.

Solution:
porting from Rain's code, gerrit id: 95109, Patch Set 15.
1. support dolby meta data, enable MCRCC_ENABLE, use allocated mv buffer;
2. set vf->fgs_valid, can dump film grain table.

Verify:
tm2 revb ab311

Change-Id: I9d722df135bdc81fd9ee464f05200c3ea60a9ef8
Signed-off-by: shihong.zheng <shihong.zheng@amlogic.com>
4 years agovh265: add ip mode for low-latency [1/1]
Hui Zhang [Sat, 15 Feb 2020 05:40:46 +0000 (13:40 +0800)]
vh265: add ip mode for low-latency [1/1]

PD#SWPL-22820

Problem:
decoder latency is too big for ip only application

Solution:
add ip mode in 265 decoder for low-latency improvement.
if reorder_num = 0 in stream. decoder will handle in
ip mode.
disable_ip_mode is control node to disable ip_mode.
disable_ip_mode is 0 by default

Verify:
AC214

Change-Id: Ie8326b90d6b0f77c12410602f5705aacee03f4e1
Signed-off-by: Hui Zhang <hui.zhang@amlogic.com>
4 years agovav1: add stream offset for pts lookup [1/1]
Hui Zhang [Tue, 24 Mar 2020 05:37:50 +0000 (13:37 +0800)]
vav1: add stream offset for pts lookup [1/1]

PD#SWPL-18751

Problem:
duration is not correct and AV not sync

Solution:
add stream offset for pts lookup

Verify:
AB311

Signed-off-by: Hui Zhang <hui.zhang@amlogic.com>
Change-Id: I71f3274b6d855744135588af7754c6721f5bf24b

4 years agomedia_module: fixed playback stuck issue [1/1]
Yixin Peng [Tue, 10 Mar 2020 02:05:33 +0000 (10:05 +0800)]
media_module: fixed playback stuck issue [1/1]

PD#SWPL-21645

Problem:
When input data insufficient and decoder does not
work properly, timeout was not in effect.

Solution:
Modify the logic to make the timer work properly.

Verify:
U212

Change-Id: I49a4c3571e7611bd5c953c2d5349786a3e4582bd
Signed-off-by: Yixin Peng <yixin.peng@amlogic.com>
4 years agoadd more buf for av1 decoder
Hui Zhang [Sun, 22 Mar 2020 12:20:57 +0000 (20:20 +0800)]
add more buf for av1 decoder

Signed-off-by: Hui Zhang <hui.zhang@amlogic.com>
Change-Id: I959ebc9b489981f7b340c988b04dd04e21a4b571

4 years agovmh264: fixed h264 ar changed issue. [1/2]
Hui Zhang [Thu, 19 Mar 2020 05:50:31 +0000 (13:50 +0800)]
vmh264: fixed h264 ar changed issue. [1/2]

PD#SWPL-22711

Problem:
h264 ratio be changed wrongly by driver

Solution:
use a tmp variable for h264_ar in dec_status()

Verify:
u212

Change-Id: I2c37ca127936c63ffd3857609f533e51a6aa8eff
Signed-off-by: Hui Zhang <hui.zhang@amlogic.com>
4 years agodecoder: add tm2 revb bringup code. [2/3]
shihong.zheng [Thu, 12 Mar 2020 07:48:25 +0000 (15:48 +0800)]
decoder: add tm2 revb bringup code. [2/3]

PD#SWPL-18751

Problem:
tm2 revb decoder bringup.

Solution:
1. add new dmc reg define for tm2 revb.
2. add AV1 decoder driver code.

Verify:
tm2 revb ptm

Change-Id: I08f760049de2b926f14721ea53f8578d7b28b178
Signed-off-by: shihong.zheng <shihong.zheng@amlogic.com>
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