GitHub/LineageOS/G12/android_hardware_amlogic_kernel-modules_media.git
4 years agovdec: use new v4lvideo path without di to support fence [2/3]
minliang.lu [Mon, 18 May 2020 08:49:39 +0000 (16:49 +0800)]
vdec: use new v4lvideo path without di to support fence [2/3]

PD#SWPL-26962

Problem:
New feature to support decoder output fence, the di
can't be contained in the video path.

Solution:
Use new v4lvideo path without di to support fence.

Verify:
newton

Change-Id: Ic38c84e5c31ff1ca4416f18bfe5453cab54a1feb
Signed-off-by: minliang.lu <minliang.lu@amlogic.com>
4 years agovp9: add decoder fence to save time of video pipeline. [2/2]
Nanxin Qin [Tue, 21 Apr 2020 07:04:09 +0000 (15:04 +0800)]
vp9: add decoder fence to save time of video pipeline. [2/2]

PD#SWPL-26955

Problem:
Reduce 1 frame delay in Sabrina's video pipeline

Solution:
add decoder fence to save time of video pipeline
this patch of optimized is on decode side.

Verify:
u212

Change-Id: I6c0ef14a76534e19968fa4a5c18eda30a79936e6
Signed-off-by: Nanxin Qin <nanxin.qin@amlogic.com>
4 years agovmh264: fixed the calc of visiable size. [1/1]
Nanxin Qin [Tue, 26 May 2020 14:06:27 +0000 (22:06 +0800)]
vmh264: fixed the calc of visiable size. [1/1]

PD#SH-4315

Problem:
returned wrong video size when using V4L2_SEL_TGT_COMPOSE inerface

Solution:
the visiable size calc need to considering the crop.

Verify:
u212

Change-Id: Iae4c22028f4fb981d6454f2cfd10f999679fef7a
Signed-off-by: Nanxin Qin <nanxin.qin@amlogic.com>
4 years agov4l: fixed some issues of the v4l codec. [1/1]
Nanxin Qin [Thu, 21 May 2020 03:18:07 +0000 (11:18 +0800)]
v4l: fixed some issues of the v4l codec. [1/1]

PD#SWPL-26430

Problem:
1. the first picture output 2 times.
2. exception calltrace was found when exit multi-inst playbacks

Solution:
1. the first frame of es must be removed after probe done.
2. clean vb2 buffers status when cmd stream stop.

Verify:
u212

Change-Id: Ic90a5a48e0e2f966e150dc76ba7902a8a9920f3e
Signed-off-by: Nanxin Qin <nanxin.qin@amlogic.com>
4 years agovdec: fixed the issue of the swap memory leak. [1/1]
Nanxin Qin [Tue, 26 May 2020 12:44:59 +0000 (20:44 +0800)]
vdec: fixed the issue of the swap memory leak. [1/1]

PD#SWPL-26496

Problem:
cobalt can't play clear stream after play DRM stream

Solution:
if the swap memory did not free, then the tvp pool
hold a mass of memory that caused to clear stream
playback fail as not enough memory to decoding.

Verify:
u212

Change-Id: I18fcbe228a72c2d445f47058aed4401365365aec
Signed-off-by: Nanxin Qin <nanxin.qin@amlogic.com>
4 years agovmh264: video playback stutter issue [1/1]
Hui Zhang [Wed, 6 May 2020 11:57:30 +0000 (19:57 +0800)]
vmh264: video playback stutter issue [1/1]

PD#SWPL-25348

Problem:
this stream has wrong duration info inside vui.
it cause video display not smooth

Solution:
add a limit when variable frame rate and duraion is
adnormal. force set duration to a normal

Verify:
U215

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

4 years agovdec: fixed some issues of playback on dv mode. [1/1]
Nanxin Qin [Fri, 22 May 2020 12:28:19 +0000 (20:28 +0800)]
vdec: fixed some issues of playback on dv mode. [1/1]

PD#SWPL-26639
PD#SWPL-26646

Problem:
1. fixed the issue of stbuf ops is null on dv mode.
2. the video is stuck in fixed position when play the DV video

Solution:
1. the stbuf ops must be set into second vdec inst.
2. ignore pts adjust when work on dv mode.

Verify:
ab311

Change-Id: I8a275415a3eb647ce2f587b1d3f5a4055cf5d158
Signed-off-by: Nanxin Qin <nanxin.qin@amlogic.com>
4 years agommpeg2: fix 0 address crash issue [1/1]
Hui Zhang [Mon, 25 May 2020 16:51:48 +0000 (00:51 +0800)]
mmpeg2: fix 0 address crash issue [1/1]

PD#SWPL-25585

Problem:
this issue is introduced by gerrit 110569
0 memory address been polluted by lmem hw.

Solution:
add the missed DMA address config in canvas
init

Verify:
ac214

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

4 years agodemux: set ciplus input source [1/1]
pengfei.liu [Thu, 23 Apr 2020 07:23:16 +0000 (15:23 +0800)]
demux: set ciplus input source [1/1]

PD#SWPL-23541

Problem:
For CAS project, AES descrambler can *NOT* worked
on dmx-1 and dmx-2

Solution:
On REE side, when set descrambler source, we also
need set ciplus input source. Secure OS descrambler
is responsible for set the ciplus output

Verify:
irdeto cas verify.

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

4 years agovdec: add lock to core_show function [1/1]
apollo.ling [Thu, 21 May 2020 07:26:40 +0000 (15:26 +0800)]
vdec: add lock to core_show function [1/1]

PD#SWPL-26415

Problem:
There is no lock in core_show function when access core->connected_vdec_list

Solution:
Add lock to the function.

Verify:
u212

Change-Id: I6cc9cf9126f9b3a52fbed492109e8c150702c1c9
Signed-off-by: apollo.ling <apollo.ling@amlogic.com>
4 years agovmh264: fix bug of stream not fluent [1/1]
miaohong chen [Thu, 21 May 2020 02:16:07 +0000 (10:16 +0800)]
vmh264: fix bug of stream not fluent [1/1]

PD#SWPL-26687

Problem:
Multi-instance h264 stream not fluent.

Solution:
The code stream has two sps but the id is 0.
As a result, the sps syntax is not updated,
and the original frame_mbs_only_flag is used,
resulting in an error.
update original frame_mbs_only_flag when reset.

Verify:
u212

Change-Id: I3d731b73d504d4bd9403382e088fcb31c64fd15f
Signed-off-by: miaohong chen <miaohong.chen@amlogic.com>
4 years agompeg2: support dvb mpeg2 clear stream with userdata in drm mode [1/1]
miaohong chen [Sat, 23 May 2020 10:33:17 +0000 (18:33 +0800)]
mpeg2: support  dvb mpeg2 clear stream with userdata in drm mode  [1/1]

PD#SWPL-25585

Problem:
dvb mpeg2 clear stream with userdata in drm mode
not support.

Solution:
allocate cc buffer with cma instead.

ucode gerrit:110575
ucode commit id:2d5eed

Verify:
ac214

Change-Id: I48d787da697420c972fd15f0af711d86f4ea4e9b
Signed-off-by: miaohong chen <miaohong.chen@amlogic.com>
4 years agostream_input: wrong pts value is displayed in sys file [3/4]
zihaoling [Thu, 23 Apr 2020 09:04:08 +0000 (17:04 +0800)]
stream_input: wrong pts value is displayed in sys file [3/4]

PD#SWPL-24755

Problem:
wrong video pts value is displayed in sys file

Solution:
1.amstream_ioctl_get add case
  AMSTREAM_GET_VPTS_U64/AMSTREAM_GET_APTS_U64
2.get the highest bit of videopts and checkin

Verify:
Ac211

Change-Id: I04e8beb823cd99e24a146ab676ad0aec11aae835
Signed-off-by: zihaoling <zihao.ling@amlogic.com>
4 years agomedia_module: fix memory 0 address pollution issue [1/1]
Hui Zhang [Fri, 22 May 2020 05:49:54 +0000 (13:49 +0800)]
media_module: fix memory 0 address pollution issue [1/1]

PD#SWPL-25905

Problem:
memory 0 address is overwrite by hevc back hw

Solution:
disable cm output when dw only

Verify:
ab311

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

4 years agoesparser: the drm source playback abnormal. [1/1]
Nanxin Qin [Thu, 21 May 2020 12:45:48 +0000 (20:45 +0800)]
esparser: the drm source playback abnormal. [1/1]

PD#SWPL-26251

Problem:
the drm source playback abnormal.

Solution:
the drm flag correct to set wirte func.

Verify:
u212

Change-Id: Idb25a1aede3899c6bf0cc821e5dc3392c78dc969
Signed-off-by: Nanxin Qin <nanxin.qin@amlogic.com>
4 years agostream_input: fixed some issues on stream_input. [1/1]
Nanxin Qin [Mon, 18 May 2020 14:20:37 +0000 (22:20 +0800)]
stream_input: fixed some issues on stream_input. [1/1]

PD#SWPL-26251
PD#SWPL-26296
PD#SWPL-26188

Problem:
1. Cobalt encrypted video does not play,stream is played
   for many times,press CTRL +C to crash.
2. could not decode with audio only stream
3. Play PVR video,do FF,then quit FF,DUT auto stop play.

Solution:
1. psparser do not release more times.
2. the field is_phybuf can't set to wirte func.
3. should check vid and aid when the ts write.
4. the pts start before should check pid is valid.

Verify:
u212

Change-Id: I8fc4e5b176e6cd6fb2b839a2925003b59d1ca865
Signed-off-by: Nanxin Qin <nanxin.qin@amlogic.com>
4 years agosecure: fix drop frame when nts test [1/1]
Jian Wang [Sat, 9 May 2020 13:05:47 +0000 (21:05 +0800)]
secure: fix drop frame when nts test [1/1]

PD#SWPL-24587

Problem:
1. when one package have more frame, some buf handle is 0
at start one package and lastest buf is valid, so when
get freed handle often get invalid duo to apk do not have
input buf enough and drop frame
2. next pts often is 0, duo to video check parten error

Solution:
1. get freed handle only retrun no-zero handle
2. if next pts is 0, use current pts add duration

Verify:
verify on TM2.

Change-Id: I4f9f0b30e66621bce76a66d093a2d5334583020f
Signed-off-by: Jian Wang <jian.wang@amlogic.com>
4 years agovh264: playback fail in single mode [1/1]
Hui Zhang [Mon, 18 May 2020 07:15:06 +0000 (15:15 +0800)]
vh264: playback fail in single mode [1/1]

PD#SWPL-25668

Problem:
the stream poc is always 0, cause display dis-order

Solution:
fin the min frame num to output when poc is always same
in single mode

ucode gerrit:109753
ucode commit id:8dbeb

Verify:
u212

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

4 years agoadec: audio codec for GXLX (S905C) bring up [1/1]
Rui Wang [Sat, 16 May 2020 07:50:02 +0000 (15:50 +0800)]
adec: audio codec for GXLX (S905C) bring up [1/1]

PD#SWPL-26186

Problem:
audio codec for GXLX (S905C) bring up

Solution:
audio codec for GXLX (S905C) bring up

Verify:
p270

Change-Id: Ibda057213b93e7bb5326d63f227f74dcd48034ef
Signed-off-by: Rui Wang <rui.wang@amlogic.com>
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>