GitHub/LineageOS/G12/android_hardware_amlogic_kernel-modules_media.git
3 years agoh264: stream mode vpts lookup fail [1/1]
Peng Yixin [Thu, 12 Nov 2020 06:20:56 +0000 (14:20 +0800)]
h264: stream mode vpts lookup fail [1/1]

PD#SWPL-35520

Problem:
Because the stream will checkin one vpts every three frames, and some
of the frames size is small, it will cause lookup pts is successful
but it doesn't match, resulting playback unsmooth.

Solution:
When lookup fail is detected many times and the frame size is
small, pts is computed using duration to solve the problem.

Verify:
SC2

Change-Id: Ib9319fc46e28006ccca173c87faf88b88288ba66
Signed-off-by: Peng Yixin <yixin.peng@amlogic.com>
3 years agovdec: check the pointer before using it [1/1]
apollo.ling [Thu, 24 Dec 2020 12:15:19 +0000 (20:15 +0800)]
vdec: check the pointer before using it [1/1]

PD#SWPL-38329

Problem:
play special stream,DUT reboot when stream replay

Solution:
Check the pointer before using it

Verify:
ah212

Change-Id: I53a1e2643f00513cae307aa61ed90f32c71bba65
Signed-off-by: apollo.ling <apollo.ling@amlogic.com>
3 years agompeg2: pip user data pushing crash [1/1]
miaohong chen [Thu, 17 Dec 2020 05:53:13 +0000 (13:53 +0800)]
mpeg2: pip user data pushing crash [1/1]

PD#SWPL-39533

Problem:
wrong user data over size causes crash.

Solution:
limit user data pushing size

Verify:
AH212

Change-Id: I581429122d39803cbe1b00280575f94b7a71812c
Signed-off-by: miaohong chen <miaohong.chen@amlogic.com>
3 years agomedia_modules: remove tuner and demod attach [2/4]
nengwen.chen [Mon, 21 Dec 2020 10:27:14 +0000 (18:27 +0800)]
media_modules: remove tuner and demod attach [2/4]

PD#SWPL-39474

Problem:
remove tuner and demod attach.

Solution:
1.remove tuner and demod attach.
2.remove tuner and demod dts property.
3.dvb_extern_register_frontend()/dvb_extern_unregister_frontend().

Verify:
Verified by ac214, ac232, ah212.

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

3 years agovdec: Temporarily save the value of the register [1/1]
yuanfa.zhuang [Tue, 22 Dec 2020 09:33:43 +0000 (17:33 +0800)]
vdec: Temporarily save the value of the register [1/1]

PD#SWPL-38043

Problem:
AV_SCRATCH_F register is tampered with by mpeg2
during multi-channel playback, resulting in playback show mosaic

Solution:
Increase the variable to save the value,
read the value directly next time

Verify:
S905X4-AH212

Signed-off-by: yuanfa.zhuang <yuanfa.zhuang@amlogic.com>
Change-Id: If36a83b1965d51045af2cd399934c87740e79616

3 years agovav1: remove header bufsize in ucode work buffer. [1/1]
shihong.zheng [Tue, 22 Dec 2020 07:07:35 +0000 (15:07 +0800)]
vav1: remove header bufsize in ucode work buffer. [1/1]

PD#SWPL-39162

Problem:
fix av1 alloc ucode work buffer failed when create
many instances.

Solution:
reduce used bufsize in workspace. the header
buf is alloc dynamic, so do not need add size
here.

Verify:
ah212

Change-Id: I5b35fcc8a06aaea96a066d610d3991f32cdb3a83
Signed-off-by: shihong.zheng <shihong.zheng@amlogic.com>
3 years agomedia_module: DVB pip playback stuck or show mosaic issue [1/1]
Peng Yixin [Mon, 21 Dec 2020 11:27:40 +0000 (19:27 +0800)]
media_module: DVB pip playback stuck or show mosaic issue [1/1]

PD#SWPL-39258

Problem:
The MDEC_PIC_DC_CTRL register was modified at the same time,one
channel is decoding, and other channel do initialization operation.

Solution:
This problem was solved by moving the MDEC_PIC_DC_CTRL register
operation of probe to the run function to resolve this problem.

Verify:
SC2

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

3 years agov4l2: resolve a busy loop [1/1]
Song Zhao [Tue, 22 Dec 2020 00:54:00 +0000 (16:54 -0800)]
v4l2: resolve a busy loop [1/1]

PD#SWPL-38455

Problem:
When decoder ES chunk is full, aml_vdec_worker can get next source
buffer but can't not decoder it with vdec_if_decode(). But it will
trigger v4l2_m2m_job_finish() and do another try immediately. This
is a busy loop.

Solution:
Sleep for 50ms when ES chun is full.

Verify:
T5D + TRC

Change-Id: Ide6163242075981c769d6381ecf7edebe7837b4f
Signed-off-by: Song Zhao <song.zhao@amlogic.com>
3 years agoamstream: fix crashed after video port init failed. [1/1]
shihong.zheng [Tue, 8 Dec 2020 02:56:51 +0000 (10:56 +0800)]
amstream: fix crashed after video port init failed. [1/1]

PD#SWPL-38536

Problem:
crash after video port init failed.

Solution:
fix bug when port init failed.

Verify:
ah212

Change-Id: Icc2d40a4899bf7d8a780a50178df782cec3a2da0
Signed-off-by: shihong.zheng <shihong.zheng@amlogic.com>
3 years agodecoder: Alloc memory optimization [1/1]
miaohong chen [Mon, 14 Dec 2020 05:24:09 +0000 (13:24 +0800)]
decoder: Alloc memory optimization [1/1]

PD#SWPL-39007

Problem:
It is not neccessary to using kmalloc.

Solution:
Replace kmalloc with vzalloc.

Verify:
u212

Change-Id: I6e9dc6497f2827feb00af25ef7bd0d4bd23590a1
Signed-off-by: miaohong chen <miaohong.chen@amlogic.com>
3 years agovvc1: unstable pts support [1/3]
Zhao Yi [Thu, 10 Dec 2020 06:37:20 +0000 (14:37 +0800)]
vvc1: unstable pts support [1/3]

PD#TV-27965

Problem:
pts is unstbale

Solution:
if unstable flag is set to 1,
 get a pts value by frame duration.

Verify:
androidP

Change-Id: I7a0de6aaa1071874f8323f3df561286c596b451d
Signed-off-by: Zhao Yi <zhao.yi@amlogic.com>
3 years agotsdemux: use hw_demux spinlock to sync audio and subtitle reset. [2/2]
Chuanzhi Wang [Tue, 15 Dec 2020 06:11:12 +0000 (14:11 +0800)]
tsdemux: use hw_demux spinlock to sync audio and subtitle reset. [2/2]

PD#SWPL-38748

Problem:
Video freeze when switch audio track.

Solution:
Use the hw demux spinlock to sync audio reset.

Verify:
S905X2 U215

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

3 years agovh265: fix h265 playback freeze issue in frame mode with kodi [1/1]
Hui Zhang [Thu, 3 Dec 2020 08:36:49 +0000 (16:36 +0800)]
vh265: fix h265 playback freeze issue in frame mode with kodi [1/1]

PD#SWPL-37390

Problem:
with Kodi, this stream will send I frame with eos nal in head of
chunk. decode  will idscard all frame data once meet eos nal.
it will cause I frame missed

Solution:
in frame mode, decoder will check shiftbytes and  decode size when
eos nal meet. if eos nal in the beginning of the chunks. don't skip
the left data, go on decoding

Verify:
AC214

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

3 years agommpeg4: fix special resolution display issue [1/1]
Hui Zhang [Wed, 16 Dec 2020 09:02:09 +0000 (17:02 +0800)]
mmpeg4: fix special resolution display issue  [1/1]

PD#SWPL-38564

Problem:
the stream is 720x1280, display is adnormal

Solution:
when width < height, change canvas config for
correct display

Verify:
AH212

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

3 years agov4l: add output dump feature [1/1]
Song Zhao [Fri, 26 Jun 2020 21:30:17 +0000 (14:30 -0700)]
v4l: add output dump feature [1/1]

PD#SWPL-28515

Problem:
Some App like Cobalt has random garbage, need stream dump to analyze

Solution:
Add dump feature

Verify:
U212

Change-Id: Ifa00f582f4add2ae43f5636dde4bda6a97bfccf6
Signed-off-by: Song Zhao <song.zhao@amlogic.com>
3 years agovp9: remove some print information. [1/1]
gan.zhang [Tue, 15 Dec 2020 08:02:52 +0000 (16:02 +0800)]
vp9: remove some print information. [1/1]

PD#SWPL-38771

Problem:
Too much unimportant information in serial.

Solution:
Remove some print in default output print.

Verify:
AH212

Change-Id: I4791df13e04fab64cbbc092da8c3e996f659e40c
Signed-off-by: gan.zhang <gan.zhang@amlogic.com>
3 years agodecoder: add low_latency mode in v4l2. [1/1]
gan.zhang [Thu, 10 Dec 2020 12:13:19 +0000 (20:13 +0800)]
decoder: add low_latency mode in v4l2. [1/1]

PD#SWPL-38312

Problem:
add param in decoder to control low latency mode for multi-inst

Solution:
add parms low_latency_mode for low latency mode.

Verify:
AH212

Change-Id: I9a97d77d3cc585a566246e024d4fcad0fe0c5b92
Signed-off-by: gan.zhang <gan.zhang@amlogic.com>
3 years agov4l2: fix a decoder release after oom [1/1]
Song Zhao [Mon, 14 Dec 2020 19:31:27 +0000 (11:31 -0800)]
v4l2: fix a decoder release after oom [1/1]

PD#SWPL-39061

Problem:
When oom happens, decoder is leaked.

Solution:
correct error handling

Verify:
T318

Change-Id: I7d0575be2a58aad0bb3589362b45f56fda24e501
Signed-off-by: Song Zhao <song.zhao@amlogic.com>
3 years agomvc/vc1: mvc/vc1 support in No-parser mode. [1/1]
miaohong chen [Thu, 3 Dec 2020 09:59:20 +0000 (17:59 +0800)]
mvc/vc1: mvc/vc1 support in No-parser mode. [1/1]

PD#SWPL-37951

Problem:
vc1/mvc does not support no-parser mode.

Solution:
Support no-parser mode in mvc/vc1

Verify:
AH212

Change-Id: I37b1705a7f840b9805b66f758da21967ceb03552
Signed-off-by: miaohong chen <miaohong.chen@amlogic.com>
3 years agoav1: support V4L2 HDR static setting [1/1]
gan.zhang [Fri, 4 Dec 2020 07:22:36 +0000 (15:22 +0800)]
av1: support V4L2 HDR static setting [1/1]

PD#SWPL-38314

Problem:
Luminance doesn't match display
Application can not set static information to decoder.

Solution:
Luminance match display (*10000)
Interface layer set static information.

Verify:
AH212

Change-Id: Ifcd90a4c88a7fba7c007e54d47155e2edf370584
Signed-off-by: gan.zhang <gan.zhang@amlogic.com>
3 years agomedia: count buffer size for allocate coherent memory. [2/2]
Nanxin Qin [Mon, 2 Nov 2020 08:35:27 +0000 (16:35 +0800)]
media: count buffer size for allocate coherent memory. [2/2]

PD#SWPL-36112

Problem:
CtsMediaTestCases process crash when codec_mm_reserved

Solution:
count buffer size for allocate coherent memory

Verify:
ah212

Change-Id: Ic74cda41faf9d8d6fb50aa6ed4911dfce744a283
Signed-off-by: Nanxin Qin <nanxin.qin@amlogic.com>
3 years agovdec: remove unnecessory register operation in mpeg12 [1/1]
apollo.ling [Sat, 5 Dec 2020 09:30:16 +0000 (17:30 +0800)]
vdec: remove unnecessory register operation in mpeg12 [1/1]

PD#SWPL-37810

Problem:
Open PIP, switch channels on the EPG interface, OTT restarts automatically

Solution:
Remove unnecessrory register openation in mpeg12

Verify:
ah212

Change-Id: I99aaf6978d7ee496df2c221dbc6acdf670f9abd0
Signed-off-by: apollo.ling <apollo.ling@amlogic.com>
3 years agompeg4: Add VOP header to the mpeg4 native source frame end [1/1]
peng huang [Thu, 3 Dec 2020 13:26:27 +0000 (21:26 +0800)]
mpeg4: Add VOP header to the mpeg4 native source frame end  [1/1]

PD#SWPL-27799

Problem:
Some sources without vop header will cause chunk to be
unable to judge the end of frame

Solution:
Add VOP header to the mpeg4 native source frame end

Verify:
TL1

Change-Id: Ieb5b3fd581eb6ead855f086e8873d24f2c84975f
Signed-off-by: peng huang <peng.huang@amlogic.com>
3 years agovdec: add interlace second field secure flag [1/1]
apollo.ling [Wed, 2 Dec 2020 09:34:37 +0000 (17:34 +0800)]
vdec: add interlace second field secure flag [1/1]

PD#SWPL-38222

Problem:
nagra video was green screen

Solution:
add interlace second field secure flag

Verify:
ah212

Change-Id: I43fa2d624a751570db23a25da2d65e42354dcc72
Signed-off-by: apollo.ling <apollo.ling@amlogic.com>
3 years agovmh264: Progressive stream is forced to interlace causing jitter. [1/1]
miaohong chen [Wed, 25 Nov 2020 08:28:53 +0000 (16:28 +0800)]
vmh264: Progressive stream is forced to interlace causing jitter. [1/1]

PD#SWPL-35861

Problem:
In order to be compatible with a fake progressive stream,
this normal progressive stream was affected.

Solution:
Restrict the conditions that are compatible
with the abnormal stream.

Verify:
u212

Change-Id: I7e602196738012520af8028d5fe023cfa569322b
Signed-off-by: miaohong chen <miaohong.chen@amlogic.com>
3 years agohevc: remove first packet offset for hevc. [1/1]
shihong.zheng [Tue, 24 Nov 2020 09:11:27 +0000 (17:11 +0800)]
hevc: remove first packet offset for hevc. [1/1]

PD#SWPL-37489

Problem:
hevc picture stream offset is not based on
streambuf start. it get from shiftbyte count.
so it's wrong to add first wp.

Solution:
remove first packet offset for hevc.

Verify:
ah212

Change-Id: I51e4fa9a1f8e41fcddfa02531ead11124a9cfccf
Signed-off-by: shihong.zheng <shihong.zheng@amlogic.com>
3 years agomedia_module: mpeg2 discard dirty data [1/1]
Peng Yixin [Thu, 26 Nov 2020 12:41:57 +0000 (20:41 +0800)]
media_module: mpeg2 discard dirty data [1/1]

PD#SWPL-37142

Problem:
Due to a lot of dirty data sent by demux, the decoder
could not decode and the data was overflowed, cause
out of sync.

Solution:
Adding code to discard dirty data solves this problem

Verify:
SC2

Change-Id: I53c53441afe5768c74239ae8ef0fc7df7f343db0
Signed-off-by: Peng Yixin <yixin.peng@amlogic.com>
3 years agomedia: suppress amstream_do_ioctl error messages [1/1]
apollo.ling [Thu, 19 Nov 2020 06:36:49 +0000 (14:36 +0800)]
media: suppress amstream_do_ioctl error messages [1/1]

PD#SWPL-36931

Problem:
open PIP,serial port has error printing

Solution:
suppress amstream_do_ioctl error messages by increase print level

Verify:
ah212

Change-Id: I55c773ad674491d94daebaad4980ba7c9728a188
Signed-off-by: apollo.ling <apollo.ling@amlogic.com>
3 years agoh265: fix multi-tile stream decoding error. [2/2]
gan.zhang [Thu, 26 Nov 2020 07:28:02 +0000 (15:28 +0800)]
h265: fix multi-tile stream decoding error. [2/2]

PD#SWPL-36627

Problem:
multi-tile stream decoding error.

Solution:
For chips after TM2 that are not T5 chips, open the
macro LPF_TILEXY_EXPAND, and other chips do not open this macro.

ucode gerrit id:133775
ucode change id:I6b968
ucode commit id:8f1641

PS:This commit contains two ucode commit (133193 and 13375)

Verify:
AM301 and U212

Change-Id: I8d2628ab14b6aa45c9d74bb51f0d0cc72bbf7df8
Signed-off-by: gan.zhang <gan.zhang@amlogic.com>
3 years agovh265: add decode fence for h265. [1/1]
Nanxin Qin [Wed, 28 Oct 2020 03:22:41 +0000 (11:22 +0800)]
vh265: add decode fence for h265. [1/1]

PD#SWPL-35247

Problem:
h265 decoding support decode fence function

Solution:
add decode fence for h265.

Verify:
u221

Change-Id: Icb8b2d54d4cba8fca91301458590d13d4c175443
Signed-off-by: Nanxin Qin <nanxin.qin@amlogic.com>
3 years agomedia: fix the display problem with some non-standard dv streams. [1/2]
gan.zhang [Mon, 23 Nov 2020 12:25:32 +0000 (20:25 +0800)]
media: fix the display problem with some non-standard dv streams. [1/2]

PD#SWPL-36900

Problem:
For non-standardized dv streams, dv effect is displayed because meta
data is parsed.

Solution:
For non-standardized dv streams, discard_dv_data flag is passed to
the dv module.

Verify:
AH212

Change-Id: Ibb6ace0825a98ceb0e948542489f672f94018d46
Signed-off-by: gan.zhang <gan.zhang@amlogic.com>
3 years agoh265: some special case video freeze in playback [1/1]
Hui Zhang [Wed, 11 Nov 2020 01:40:43 +0000 (09:40 +0800)]
h265: some special case video freeze in playback  [1/1]

PD#SWPL-36642

Problem:
some  h265 stream has more reference, and offset is big,
video playback freeze easily, no buffer vailable to decode

Solution:
change condition to use sps_max_dec_buf to cal max_buf_num

Verify:
S905X3

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

3 years agoRevert: fix the display problem with some non-standard dv streams. [1/2]
Gan Zhang [Mon, 23 Nov 2020 06:34:51 +0000 (22:34 -0800)]
Revert: fix the display problem with some non-standard dv streams. [1/2]

PD#SWPL-36900

Problem:
For non-standardized dv streams, dv effect is displayed because meta
data is parsed.

Solution:
For non-standardized dv streams, discard_dv_data flag is passed to
the dv module.
This reverts commit cbd6d015ab93f3e6c87b7d4e8a0ce0f15dd7ee8b.
Revert the reason:Since kernel submission has not been merged,
compiling on Q will cause problems.

Verify:
AH212

Change-Id: I4b026cd8c8b8862135326af7e77683dc127f7bbd
Signed-off-by: gan.zhang <gan.zhang@amlogic.com>
3 years agomedia: fix the display problem with some non-standard dv streams. [1/2]
gan.zhang [Wed, 18 Nov 2020 05:24:40 +0000 (13:24 +0800)]
media: fix the display problem with some non-standard dv streams. [1/2]

PD#SWPL-36900

Problem:
For non-standardized dv streams, dv effect is displayed because meta
data is parsed.

Solution:
For non-standardized dv streams, discard_dv_data flag is passed to
the dv module.

Verify:
AH212

Change-Id: Ie83541cda50d4420f9ff6addb314afe146211173
Signed-off-by: gan.zhang <gan.zhang@amlogic.com>
3 years agomedia_module: avs stuck issue [1/1]
Peng Yixin [Mon, 23 Nov 2020 03:39:12 +0000 (11:39 +0800)]
media_module: avs stuck issue [1/1]

PD#SWPL-37392

Problem:
Due to tiny error in the stream,
the decoder considered the error
and did not output cause playback stuck.

Solution:
Optimize microcode and open display
mosaics flag to solve this problem.
ucode gerrit id: 132816
ucode change id: Ia5282
ucode commit id: 87d645

Verify:
T920L

Change-Id: I00c5f1e412a81d2aa1b5c07a3a57390a36399562
Signed-off-by: Peng Yixin <yixin.peng@amlogic.com>
3 years agoh264/mpeg2/mpeg4: parse profile ande level [1/1]
miaohong chen [Fri, 20 Nov 2020 06:16:44 +0000 (14:16 +0800)]
h264/mpeg2/mpeg4: parse profile ande level [1/1]

PD#SWPL-36663

Problem:
There is no profile and level which parsed

Solution:
parse profile and level

ucode gerrit:130812
ucode commit id:25534c

Verify:
S905X2

Change-Id: Ia369b647aadf623a4bb022198f8500d846932a72
Signed-off-by: miaohong chen <miaohong.chen@amlogic.com>
4 years agodecoder: no parser stream mode interface improve . [1/1]
shihong.zheng [Tue, 17 Nov 2020 08:15:47 +0000 (16:15 +0800)]
decoder: no parser stream mode interface improve . [1/1]

PD#SWPL-37019

Problem:
demux first packet data is not start from
stream buf start addr;
tsplayer do not need 2nd filed offset.

Solution:
1.correct decode start wp rp at first packet;
2.set 2nd field offset invalid for tsplayer pts lookup.

Verify:
ah212

Change-Id: Ib9abc1066252da76d5951144af29eb83947c81ba
Signed-off-by: shihong.zheng <shihong.zheng@amlogic.com>
4 years agoh265: some nts clip lost colorspace on gxl [1/1]
Hui Zhang [Fri, 20 Nov 2020 00:52:27 +0000 (08:52 +0800)]
h265: some nts clip lost colorspace on gxl [1/1]

PD#SWPL-7176

Problem:
with some h265 clips. decoder will lost color space
on gxl

Solution:
change WEIGHTED_MC_WORKAROUND algorithm for fix
ucode gerrit id: 132354
ucode change id: I55825
ucode commit id: d967dd

Verify:
P212

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

4 years agodecode: notify backend secure flag. [1/1]
shihong.zheng [Tue, 4 Aug 2020 08:59:02 +0000 (16:59 +0800)]
decode: notify backend secure flag. [1/1]

PD#SWPL-31671

Problem:
decode provided the secure flag to backend.

Solution:
fill the req state in vfm notify callback.

Verify:
ab301

Change-Id: I2804f606145445b295ae225ba85dc4cff698cac2
Signed-off-by: shihong.zheng <shihong.zheng@amlogic.com>
4 years agomediasync: Add syncmode settings and get. [1/1]
yunmin.chen [Wed, 18 Nov 2020 07:40:18 +0000 (15:40 +0800)]
mediasync:  Add syncmode settings and get. [1/1]

PD#SWPL-35009

Problem:
Failed to set and get syncmode.

Solution:
Add SET_SYNCMODE and GET_SYNCMODE to mediasync_ioctl.

Verify:
ah212

Change-Id: I57cb452fe91cff81f97479dd1ade6d6e6025938d
Signed-off-by: yunmin.chen <yunmin.chen@amlogic.com>
4 years agoamvdec_h265: unstable pts for multi-instance [3/3]
Zhao Yi [Thu, 24 Sep 2020 13:43:37 +0000 (21:43 +0800)]
amvdec_h265: unstable pts for multi-instance [3/3]

PD#SWPL-32372

Problem:
multi-instance h265 decoder didn't get param unstable-pts
 from vdec->sys_info

Solution:
Get unstable-pts from vdec->sys_info

Verify:
AndroidQ

Signed-off-by: Zhao Yi <zhao.yi@amlogic.com>
Change-Id: I7edd73a66901d195ea0141b2d2c134860ee9b28a

4 years agomavs: fixed avs file playback failure problem [1/1]
Peng Yixin [Thu, 1 Oct 2020 03:27:40 +0000 (11:27 +0800)]
mavs: fixed avs file playback failure problem [1/1]

PD#SWPL-29847

Problem:
using devm_kzalloc funciton cann't allocate
memory(There is no physical continuous memory
of this size), causing playback fail.

Solution:
Use vzalloc to allocate memory to solve this
problem.

Verify:
AH212

Change-Id: If5bb8bf358d8c65bb27699a591477d50f8d1fee5
Signed-off-by: Peng Yixin <yixin.peng@amlogic.com>
4 years agoh265: black screen a few seconds when start playback [1/1]
Peng Yixin [Fri, 30 Oct 2020 11:40:32 +0000 (19:40 +0800)]
h265: black screen a few seconds when start playback [1/1]

PD#SWPL-34475

Problem:
HEVC_STREAM_RD_PTR is not updated because
there is a lot of dirty data in front of
the CSD data, resulting in a long black screen

Solution:
When starting playback, all dirty data will
be discarded.

Verify:
AH212

Change-Id: Id653526617e2b362af0baf170f687498f4576453
Signed-off-by: Peng Yixin <yixin.peng@amlogic.com>
4 years agomedia: fix dec_slt bug. [2/2]
gan.zhang [Wed, 11 Nov 2020 12:22:33 +0000 (20:22 +0800)]
media: fix dec_slt bug. [2/2]

PD#OPS-1197

Problem:
When the first frame is wrong, the test result in dec_slt is pass

Solution:
1.When a comparison crc error occurs, usr_cmp_result is set to -1.
2.Reduces the trigger of dump yuv.

Verify:
AB311

Change-Id: I5b89ad353e08017b182510345e2541de99a92223
Signed-off-by: gan.zhang <gan.zhang@amlogic.com>
4 years agoh265: add variable judgment [1/1]
haobin.zhu [Fri, 30 Oct 2020 07:38:00 +0000 (15:38 +0800)]
h265: add variable judgment [1/1]

PD#SWPL-35442

Problem:
play special stream,switch channel,DUT reboot

Solution:
add variable judgment

Verify:
S905X4

Change-Id: Ib45d82429a6ef526e26fd227f4624a6968db3955
Signed-off-by: haobin.zhu <haobin.zhu@amlogic.com>
4 years agoh265: fix long term ref bug. [1/1]
Rain Zhang [Fri, 6 Nov 2020 01:50:26 +0000 (17:50 -0800)]
h265: fix long term ref bug. [1/1]

PD#SWPL-35859

Problem:
Because the poc calculation of the reference frame is wrong,
and the reference error will cause mosaic.

Solution:
When the reference frame is calculated, a long-term rps is added to
ensure that the reference list is calculated correctly.

Verify:
AC214

Change-Id: I3a2d2e18cac87541db5d0d6a7d15e9ea44193c9c
Signed-off-by: Rain Zhang <rain.zhang@amlogic.com>
4 years agovdec: av1 add sidebind interface for decoder [2/2]
jintao xu [Thu, 5 Nov 2020 04:06:25 +0000 (12:06 +0800)]
vdec: av1 add sidebind interface for decoder [2/2]

PD#SWPL-34152

Problem:
decoder receive sidebind type id and set to vf

Solution:
add this new feature

Verify:
AH-212

Change-Id: I093f5ae7ac5dce506947d7e92158700f7b774581
Signed-off-by: jintao xu <jintao.xu@amlogic.com>
4 years agov4l2: fix h264 playback stuck issue. [1/1]
Song Zhao [Tue, 3 Nov 2020 16:57:55 +0000 (08:57 -0800)]
v4l2: fix h264 playback stuck issue. [1/1]

PD#SWPL-36161

Problem:
Play online video source, seek after the video
screen is stuck, sound normal

Solution:
clear reference buffer status at the reset time
that make sure dpb status is clean.

Verify:
u212

Change-Id: I19c984fc1ab894c45759bf4e2f913b287c44e36d
Signed-off-by: Nanxin Qin <nanxin.qin@amlogic.com>
4 years agoh264: T5 small window playback abnormally [1/1]
Peng Yixin [Tue, 3 Nov 2020 11:37:47 +0000 (19:37 +0800)]
h264: T5 small window playback abnormally [1/1]

PD#SWPL-36213

Problem:
Because 4K 264 used dw0, there is no YUV output buffer,
result this problem.

Solution:
T5 set default double write 3 to resolve this issue

Verify:
T5

Change-Id: I6e8b8de4fc5a1c9089ce0ff270443d014d522df7
Signed-off-by: Peng Yixin <yixin.peng@amlogic.com>
4 years agoh265: T5 picture quality is not good [1/1]
Peng Yixin [Mon, 26 Oct 2020 11:13:06 +0000 (19:13 +0800)]
h265: T5 picture quality is not good [1/1]

PD#SWPL-35148

Problem:
If the resolution is not greater than 960*540,
use decontour algorithm, compression of the
resolution of the picture will result in poor
display effect.

Solution:
Setting double_write_mode 0x1000, the
decoding is now output as follows:
X >1920*1080, afbc+dw1/4
960*540<=x< 1920*1080, afbc+dw1/2
x<=960*540, dw1

Verify:
T5

Change-Id: I521dc21e4aa4826447174e958edb5e385ee5f17a
Signed-off-by: Peng Yixin <yixin.peng@amlogic.com>
4 years agomavs: fixed avs file playback stuck issue [1/1]
Peng Yixin [Fri, 30 Oct 2020 10:11:52 +0000 (18:11 +0800)]
mavs: fixed avs file playback stuck issue [1/1]

PD#SWPL-25580

Problem:
vf was not init again at reset,
avs file playback stuck.

Solution:
Reinitializing vf buffer solves this problem.

Verify:
AB311

Change-Id: I3ea47598542dd035616937624cff9034f48317b0
Signed-off-by: Peng Yixin <yixin.peng@amlogic.com>
4 years agoh264: T5 4k file playback unsmooth [1/1]
Peng Yixin [Tue, 27 Oct 2020 05:20:10 +0000 (13:20 +0800)]
h264: T5 4k file playback unsmooth [1/1]

PD#SWPL-35582

Problem:
h264 4k file playback unsmooth.

Solution:
1.Some code for Allegro super small resolution
will spend a lot of time, and this code does
not need on 4k resolution. Therefore, when
the resolution is greater than 1920*1080,
this code will not be execute to speed up
the decoding efficiency.
2. 4k mmu is turned on by default on T5
ucode gerrit id: 129343
ucode commit id: 0c9e8c
ucode change id: Ie8b1d

Verify:
T5

Change-Id: I6146968e3d43a57e4dea86d6649371784c96e0a1
Signed-off-by: Peng Yixin <yixin.peng@amlogic.com>
4 years agovp9: Pass transfer type to vpp for HDR videos. [1/1]
gan.zhang [Wed, 16 Sep 2020 05:35:37 +0000 (13:35 +0800)]
vp9: Pass transfer type to vpp for HDR videos. [1/1]

PD#SWPL-33354

Problem:
The HDR status should be returned has "HDR10-GAMMA_HLG" for HLG contents.

Solution:
Pass transfer type HLG/ST2084 to vpp for HDR videos.

Verify:
AB301

Change-Id: I49f963b714098a25cbc478c6f8a76010929a6178
Signed-off-by: gan.zhang <gan.zhang@amlogic.com>
4 years agov4l: optimize the process of the resolution change. [1/1]
Nanxin Qin [Thu, 22 Oct 2020 06:23:55 +0000 (14:23 +0800)]
v4l: optimize the process of the resolution change. [1/1]

PD#SWPL-34992

Problem:
[RDK][Placto] H264 decoding error

Solution:
optimize the process of the resolution change.

Verify:
ab301

Change-Id: I1b70deb86e51169cc1d19f0ffb121d8053cc2957
Signed-off-by: Nanxin Qin <nanxin.qin@amlogic.com>
4 years agomediasync: remove the printk in media sync [1/1]
Lifeng Cao [Tue, 27 Oct 2020 09:47:12 +0000 (17:47 +0800)]
mediasync: remove the printk in media sync [1/1]

PD#SWPL-35599

Problem:
mediasync has too many print in kernel

Solution:
remove the printk in media sync

Verify:
ah212

Change-Id: I633d31c5df3f7a2b464ce1bb49e381216b0b8498
Signed-off-by: Lifeng Cao <lifeng.cao@amlogic.com>
4 years agov4l: adapter uvm driver avoid build failed. [1/1]
Nanxin Qin [Tue, 27 Oct 2020 03:11:51 +0000 (11:11 +0800)]
v4l: adapter uvm driver avoid build failed. [1/1]

PD#SWPL-34686

Problem:
adapter uvm driver avoid build failed.

Solution:
dapter uvm driver avoid build failed.

Verify:
ac214

Signed-off-by: Nanxin Qin <nanxin.qin@amlogic.com>
Change-Id: I27ed49cbdc4122897c52ab6123965c7a60fb2d88

4 years agovdec: ADD Secure/nonSecure flags for avs,vc1,h263 single mode [1/1]
apollo.ling [Fri, 23 Oct 2020 02:12:57 +0000 (10:12 +0800)]
vdec: ADD Secure/nonSecure flags for avs,vc1,h263 single mode [1/1]

PD#SWPL-35498

Problem:
Play some avs bitstream, it print abnormal decontour info all the time

Solution:
ADD Secure/nonSecure flags for avs,vc1,h263 single mode

Verify:
u212

Change-Id: Ic4cba115a10931467b445a39c27a0624ff9c8c71
Signed-off-by: apollo.ling <apollo.ling@amlogic.com>
4 years agovdec: in vdec release add timeout for waiting thread_fn [1/1]
apollo.ling [Thu, 17 Sep 2020 03:01:49 +0000 (11:01 +0800)]
vdec: in vdec release add timeout for waiting thread_fn [1/1]

PD#SWPL-32996

Problem:
In suspending scenario the vdec release is blocked by waiting thread_fn

Solution:
In vdec release function add timeout for waiting thread_fn

Verify:
u212

Change-Id: I3ee4a8cc4b06e922a144f3c84f6c5517dadaa24c
Signed-off-by: apollo.ling <apollo.ling@amlogic.com>
4 years agovdec: fix h264 and h265 jitter problem [1/1]
gan.zhang [Thu, 22 Oct 2020 06:03:02 +0000 (14:03 +0800)]
vdec: fix h264 and h265 jitter problem [1/1]

PD#SWPL-33158

Problem:
During the start of the playback, due to the inconsistent variable type
between poc and loop_playback_poc_threshold, it enters the logic of loop
playback and sets some frames that are not decoded as output, which
causes the number of frames to be less than the number of decoded frames

Solution:
Set the relevant variables of poc to int type.

Verify:
AK301

Change-Id: Ib3a030b373e98c64ac238211b33529816f7eedcd
Signed-off-by: gan.zhang <gan.zhang@amlogic.com>
4 years agomedia: Pass the hdr10p data to the vpp. [2/2]
gan.zhang [Fri, 2 Oct 2020 09:51:50 +0000 (17:51 +0800)]
media: Pass the hdr10p data to the vpp. [2/2]

PD#SWPL-33535

Problem:
No hdr10p data was passed to the vpp via vf.

Solution:
hdr10p data is passed to the vpp via vf.

Verify:
U212

Change-Id: Ic2ef7592f59c6cf8878b8f7414966476da7d0c71
Signed-off-by: gan.zhang <gan.zhang@amlogic.com>
4 years agovp9: fix a kernel panic [1/1]
Song Zhao [Sat, 3 Oct 2020 06:25:08 +0000 (23:25 -0700)]
vp9: fix a kernel panic [1/1]

PD#SWPL-32737

Problem:
In V4l2 decoding case, there is kernel panic in vp9_recycle_mmu_work()

Solution:
Check for null pointer.

Verify:
U212 + RDK + Cobalt cert

Change-Id: I48525cc0d4686e3b2edc5b3d5c8dd25f1f41825e
Signed-off-by: Song Zhao <song.zhao@amlogic.com>
4 years agoamstream: fix vmx hls playback mosaic. [1/1]
shihong.zheng [Wed, 21 Oct 2020 07:56:25 +0000 (15:56 +0800)]
amstream: fix vmx hls playback mosaic. [1/1]

PD#RSP-1143

Problem:
streambuf size changed in tvp mode.

Solution:
return when use external streambuf.

Verify:
S905X4

Change-Id: If7d2c20822559d54a3a30943be96727875f82383
Signed-off-by: shihong.zheng <shihong.zheng@amlogic.com>
4 years agoavs: multi-instance add profile [1/1]
Peng Yixin [Thu, 15 Oct 2020 07:45:04 +0000 (15:45 +0800)]
avs: multi-instance add profile [1/1]

PD#SWPL-25623

Problem:
avs multi-instance no register profile.

Solution:
avs multi-instance add register profile function.

Verify:
U215

Change-Id: I31dcb441cb9832fbf5680f36104f69404afbb823
Signed-off-by: Peng Yixin <yixin.peng@amlogic.com>
4 years agoamstream: fixed dtv and esplayer play fail. [1/1]
gan.zhang [Mon, 19 Oct 2020 11:52:06 +0000 (19:52 +0800)]
amstream: fixed dtv and esplayer play fail. [1/1]

PD#SWPL-35372
PD#SWPL-35326

Problem:
The port is not released due to an error in the judgment variable.

Solution:
clear ports status when inst exit.

Verify:
AB311

Change-Id: I837ee6b2719a1dfc232f96ccb296c02d0dad2c43
Signed-off-by: gan.zhang <gan.zhang@amlogic.com>
4 years agoMerge "amstream: fixed issue that can not playback. [1/1]" into amlogic-4.9-dev-q
Hui Zhang [Fri, 16 Oct 2020 09:32:55 +0000 (02:32 -0700)]
Merge "amstream: fixed issue that can not playback. [1/1]" into amlogic-4.9-dev-q

4 years agoamstream: fixed issue that can not playback. [1/1]
Nanxin Qin [Fri, 16 Oct 2020 07:20:15 +0000 (15:20 +0800)]
amstream: fixed issue that can not playback. [1/1]

PD#SWPL-33180

Problem:
the boot shows get posts but did not release
cause all resource can not playback.

Solution:
clear ports status when inst exit.

Verify:
u212

Change-Id: I7246f29273649786159336773951a8714c8a8e70
Signed-off-by: Nanxin Qin <nanxin.qin@amlogic.com>
4 years agovmh264: fix field picture display abnormal at start. [1/1]
miaohong chen [Fri, 16 Oct 2020 07:50:16 +0000 (15:50 +0800)]
vmh264: fix field picture display abnormal at start. [1/1]

PD#SWPL-15094

Problem:
h264 display abnormal when start play or seek.

Solution:
first frame combined with I top field and p bottom field,
set list0 size 1 when decode p field.

Verify:
t962x2

Change-Id: I5b64de94414887e4360d33077cb827ab8a1a2834
Signed-off-by: miaohong chen <miaohong.chen@amlogic.com>
4 years agoamstream: fix crash when update ext stbuf metainfo. [1/1]
shihong.zheng [Thu, 10 Sep 2020 09:18:51 +0000 (17:18 +0800)]
amstream: fix crash when update ext stbuf metainfo. [1/1]

PD#SWPL-33180

Problem:
1. fix crash when update ext stbuf metainfo.
2. delay put fd cause playback stuck.

Solution:
1. add some null check for metainfo update.
2. If it is the single instance that the pipeline of DTV used,
   then have to check that the resources which is work on the
   tunnel are being released.

Verify:
ah212

Change-Id: Iaa68a6c2b4fcd0b8dbea30603c2d6e4e3463160e
Signed-off-by: shihong.zheng <shihong.zheng@amlogic.com>
4 years agov4l: set DV aux data into vframe [1/1]
Song Zhao [Thu, 8 Oct 2020 23:53:23 +0000 (16:53 -0700)]
v4l: set DV aux data into vframe [1/1]

PD#SWPL-27950

Problem:
Aux data is not copied to vframe.

Solution:
Limit update_vframe_src_fmt() to v4l use case only.

Verify:
U212 + gstreamer

Change-Id: I35e99caff5d0c02ea38253e0b614233bfe05f784
Signed-off-by: Song Zhao <song.zhao@amlogic.com>
4 years agoh265: add vf debug informations. [1/1]
gan.zhang [Wed, 16 Sep 2020 06:34:32 +0000 (14:34 +0800)]
h265: add vf debug informations. [1/1]

PD#SWPL-25416

Problem:
There is no debug informations for vf.

Solution:
add vf debug informations.

Verify:
AB301

Change-Id: I0954578e590637e736c4d337b473b732b46e50e6
Signed-off-by: gan.zhang <gan.zhang@amlogic.com>
4 years agomedia_module: h265 fixed wrong sps cause playback stuck issue [1/1]
Peng yixin [Thu, 10 Sep 2020 06:38:08 +0000 (14:38 +0800)]
media_module: h265 fixed wrong sps cause playback stuck issue [1/1]

PD#SWPL-30901

Problem:
Because the SPS information in the video file is incorrect,
cause playback stuck.

Solution:
When this happens, all buffers will released to resolve the problem.

Verify:
U215

Change-Id: I080c7bfd4e57642a7edae64e3b69d4eee356254c
Signed-off-by: Peng yixin <yixin.peng@amlogic.com>
4 years agomedia_module: h265 fixed same frame being written to DPB multiple times [1/1]
Peng Yixin [Mon, 7 Sep 2020 09:23:26 +0000 (17:23 +0800)]
media_module: h265 fixed same frame being written to DPB multiple times [1/1]

PD#SWPL-30901

Problem:
In stream mode, multiple frames are decoded in a decoding process,
but at last there is insufficient data. As a result, other frames
are stored in DPB except last frame. However, the next run will be
decode again and stored in DPB, which results in the same frame being
stored in DPB for many times and cause playback stuck.

Solution:
In this case, release all the frames stored in the DPB in this
decoding process to resolve this problem.

Verify:
U215

Change-Id: I1f1360467a5bfb364cde03268857922ca05b8d75
Signed-off-by: Peng Yixin <yixin.peng@amlogic.com>
4 years agoav1: fix some stream playback appears mosaics. [2/2]
gan.zhang [Mon, 12 Oct 2020 02:04:40 +0000 (10:04 +0800)]
av1: fix some stream playback appears mosaics. [2/2]

PD#SWPL-34649

Problem:
For av1 formats, the top reference data is 20 times of other formats, so
new DDR store/load function added for AV1. For some special case, tile
is narrow and the decoding speed is relatively fast, this will result in
the data is still in write pipeline, not write to DDR yet. This caused
decoding wrong.

Solution:
Adding checking of write response before loading inside microcode, wait
for write pipeline finish before read.

ucode gerrit id:127347
ucode commit id:3a3627
ucode change id:If8fc5

Verify:
AB311

Change-Id: I04d73a1c6819655851d53a3deddf56158b8157fb
Signed-off-by: gan.zhang <gan.zhang@amlogic.com>
4 years agoh265: aux data exceeding size results in crash. [1/1]
gan.zhang [Fri, 2 Oct 2020 07:05:20 +0000 (15:05 +0800)]
h265: aux data exceeding size results in crash. [1/1]

PD#SWPL-34380

Problem:
When parsed to eos, the aux_size of the last frame
of data is set in set_aux_data to an incorrect size.

Solution:
1.When parsed to eos, if decoding_pic is NULL,
dolby_get_meta is not called.
2.Add a size limit in the dump_aux_data function
to prevent access overbounds from causing crashes.

https://scgit.amlogic.com/#/c/119228/
The above submission only ensures no crash by limiting the aux_data size

Verify:
AH212

Change-Id: I99c369f91e3f9357d692e0abe8bf13562f172cf4
Signed-off-by: gan.zhang <gan.zhang@amlogic.com>
4 years agoh264: fix h264 freeze after config decode buf failed. [1/1]
shihong.zheng [Thu, 8 Oct 2020 08:19:56 +0000 (16:19 +0800)]
h264: fix h264 freeze after config decode buf failed. [1/1]

PD#SWPL-34606

Problem:
h264 freeze after config decode buf failed

Solution:
set init flag 0 after set param failed.

Verify:
t963

Change-Id: I6f965dc76f341ca38d105d4e25116725e76abee7
Signed-off-by: shihong.zheng <shihong.zheng@amlogic.com>
4 years agomediasync: Fix mediasync compile error for buildroot [1/1]
Lifeng Cao [Fri, 9 Oct 2020 02:32:39 +0000 (10:32 +0800)]
mediasync: Fix mediasync compile error for buildroot [1/1]

PD#SWPL-25622

Problem:
Fix mediasync compile error for buildroot

Solution:
change inclue <>  to ""

Verify:
SC2

Change-Id: If20d321ce8f11728594ecbea03f1d3c6f911f54b
Signed-off-by: Lifeng Cao <lifeng.cao@amlogic.com>
4 years agomediasync: add mediasync clock driver [3/5]
Lifeng Cao [Thu, 18 Jun 2020 09:53:42 +0000 (17:53 +0800)]
mediasync: add mediasync clock driver [3/5]

PD#SWPL-25622

Problem:
AV sync need a driver in media modules

Solution:
add mediasync clock driver

Verify:
SC2

Change-Id: Id0b1190bd1c2bbbce306362ecdb9466296ec0584
Signed-off-by: Lifeng Cao <lifeng.cao@amlogic.com>
4 years agovp9: add vp9 decoder tests in dec_slt. [2/2]
gan.zhang [Sun, 27 Sep 2020 01:30:11 +0000 (09:30 +0800)]
vp9: add vp9 decoder tests in dec_slt. [2/2]

PD#OPS-1192

Problem:
In the dec_slt test, since max_pic_h and max_pic_w were not
configured via config at the upper level, the decoding driver
allocated memory according to the maximum resolution supported
by the chip, this will cause the codec_mm to be insufficient
and lead the test to fail.

Solution:
max_pic_h and max_pic_w are configured via the upper sys_info.

Verify:
AC214

Change-Id: Ib2006c51ecef3d98ebd6cce89610f636c60c60ed
Signed-off-by: gan.zhang <gan.zhang@amlogic.com>
4 years agovmh264: fix mosaic when decode error frame. [1/1]
shihong.zheng [Fri, 2 Oct 2020 08:44:57 +0000 (16:44 +0800)]
vmh264: fix mosaic when decode error frame. [1/1]

PD#SWPL-34290

Problem:
fix h264 show error frames.

Solution:
fix h264 error frames recycle failed.

Verify:
t963

Change-Id: Ifff87f781da7cf83727c2c9408f6edcaa37bd8ab
Signed-off-by: shihong.zheng <shihong.zheng@amlogic.com>
4 years agovmh264: h264 stream crash when enable debug [1/1]
miaohong chen [Tue, 29 Sep 2020 02:17:51 +0000 (10:17 +0800)]
vmh264: h264 stream crash when enable debug [1/1]

PD#SWPL-34375

Problem:
Null pointer access lead to crash

Solution:
Add Null pointer detect

Verify:
U212

Change-Id: I9d54d7640dd435b1a47823c26e878441ad05e31a
Signed-off-by: miaohong chen <miaohong.chen@amlogic.com>
4 years agoh265: fix a crash in set_aux_data. [1/1]
Gan Zhang [Thu, 30 Jul 2020 02:41:52 +0000 (10:41 +0800)]
h265: fix a crash in set_aux_data. [1/1]

PD#SWPL-32695

Problem:
aux data Size exceeds the allocated buff size.

Solution:
When the size exceeds the allocated size, set aux size to 0.

Verify:
U215

Change-Id: Ic15a60b95f8061c93a2ee7c96e23466e42a4d110
Signed-off-by: Gan Zhang <gan.zhang@amlogic.com>
4 years agodecoder: Make correct waiting flag for workqueue [1/1]
apollo.ling [Tue, 22 Sep 2020 06:49:29 +0000 (14:49 +0800)]
decoder: Make correct waiting flag for workqueue [1/1]

PD#SWPL-33743

Problem:
CtsMediaTestCases 4 item fail, which reason is delay.
The delay is introduced by SWPL26671

Solution:
Make correct waiting flag of workqueue

Verify:
u212

Change-Id: Iac1b8887d748b86d535cbb3fb3ca1392025544e7
Signed-off-by: apollo.ling <apollo.ling@amlogic.com>
4 years agovdec: ADD Secure/nonSecure flags to video frame [2/2]
zichao.zhang [Fri, 25 Sep 2020 07:18:34 +0000 (15:18 +0800)]
vdec: ADD Secure/nonSecure flags to video frame [2/2]

PD#SWPL-25232

Problem:
This is a new feature.

Solution:
ADD Secure/nonSecure flags to video frame

Verify:
U212

Change-Id: I528ee9f0796ee73c8044abc2c5c16de6ab94d1de
Signed-off-by: zichao.zhang <zichao.zhang@amlogic.com>
4 years agovdec: avoid to use NULL pointer [1/1]
apollo.ling [Sun, 27 Sep 2020 07:05:38 +0000 (15:05 +0800)]
vdec: avoid to use NULL pointer [1/1]

PD#SWPL-34229

Problem:
DTV H264 cut off, null pointer crashes

Solution:
Check the pointer before using it

Verify:
T962X3-AB301

Change-Id: I49075e3f3d2018f70e19f356e577a80fd70cdb2f
Signed-off-by: apollo.ling <apollo.ling@amlogic.com>
4 years agoh265: fixed VCPU DMC VIOLATION issue [2/2]
Peng Yixin [Mon, 14 Sep 2020 09:23:44 +0000 (17:23 +0800)]
h265: fixed VCPU DMC VIOLATION issue [2/2]

PD#SWPL-30901

Problem:
the VPS_BUFFER address stored in LMEM
memory was modified to 0, cause this problem.

Solution:
Instead of using LMEM memory to store
this address, use the DOS_SCRATCH20 register.
ucode gerrit id: 124313
ucode commit id: 16e7cb
ucode change id: Icf747

Verify:
U215

Change-Id: I5dfb6d527c6f46a977ba6a1cfd151a8c1c94c26a
Signed-off-by: Peng Yixin <yixin.peng@amlogic.com>
4 years agov4l: clear vb2 buffer flags for next use. [1/1]
Nanxin Qin [Wed, 19 Aug 2020 03:05:48 +0000 (11:05 +0800)]
v4l: clear vb2 buffer flags for next use. [1/1]

PD#SWPL-31953

Problem:
V4L2 Buffer flag is not cleared when streamoff.

Solution:
clear vb2 buffer flags for next use when cmd streamoff.

Verify:
w400

Change-Id: Ib4bc1fb3c9f8ed21ce740af9ddffd984fd9e5da9
Signed-off-by: Nanxin Qin <nanxin.qin@amlogic.com>
4 years agoh265: add init stream offset [1/1]
miaohong chen [Fri, 18 Sep 2020 02:37:26 +0000 (10:37 +0800)]
h265: add init stream offset  [1/1]

PD#SWPL-33557

Problem:
The stream offset is not initialized each time the start broadcast,
which causes it to accumulate, so that the correct pts
cannot be obtained, which may cause out of synchronization.

Solution:
init stream offset when start every time.

Verify:
u212

Change-Id: Iba8df5525cfcf6b8b42ef4fc4c464ae681202272
Signed-off-by: miaohong chen <miaohong.chen@amlogic.com>
4 years agomedia: add aux data crc in h264 and h265 stream. [1/1]
Gan Zhang [Fri, 26 Jun 2020 08:04:58 +0000 (16:04 +0800)]
media: add aux data crc in h264 and h265 stream. [1/1]

PD#SWPL-25416

Problem:
no aux data crc info.

Solution:
add aux data crc in h264 and h265 stream.

Verify:
AC214

Change-Id: Ie9675b154cc45c144d4d11bb4afe7f859cc75aed
Signed-off-by: Gan Zhang <gan.zhang@amlogic.com>
4 years agovmh264: add the feature of fence for h264 decoder. [2/2]
Nanxin Qin [Tue, 15 Sep 2020 13:16:01 +0000 (21:16 +0800)]
vmh264: add the feature of fence for h264 decoder. [2/2]

PD#SWPL-32845

Problem:
need decode fence  on cloud game docking

Solution:
1. add the feature of fence for h264 decoder.
2. just used ip only stream source.

Verify:
u212

Change-Id: I80ed4f19d5f05c491e9599574cdb153c2a87b06d
Signed-off-by: Nanxin Qin <nanxin.qin@amlogic.com>
4 years agovdec: remove vp9 waiting work [1/1]
apollo.ling [Wed, 16 Sep 2020 08:03:26 +0000 (16:03 +0800)]
vdec: remove vp9 waiting work [1/1]

PD#SWPL-32897

Problem:
There is one failed case for CTSGSI test

Solution:
Remove vp9 waiting work to finished when next run

Verify:
u215

Change-Id: I2df8be6bd0fd912f8277b3cd6b6fcd0487b6dad4
Signed-off-by: apollo.ling <apollo.ling@amlogic.com>
4 years agovdec: avoid free block when block is in free list [1/1]
apollo.ling [Fri, 18 Sep 2020 07:40:15 +0000 (15:40 +0800)]
vdec: avoid free block when block is in free list [1/1]

PD#SWPL-33580

Problem:
When mem block is in free list, the mem block is freed

Solution:
Avoid free mem block when block is in free list

Verify:
u212

Change-Id: I7884c78c2fbd7db826eda94419569b5873c5d14e
Signed-off-by: apollo.ling <apollo.ling@amlogic.com>
4 years agomavs: fixed stream mode lookup pts fail issue [2/2]
Peng yixin [Thu, 10 Sep 2020 08:49:22 +0000 (16:49 +0800)]
mavs: fixed stream mode lookup pts fail issue [2/2]

PD#SWPL-25623

Problem:
Because the variable buffer_size is used incorrectly in
the ucode, cause the stream offeset is incorrect.

Solution:
Modify the error logic about incorrect use buffer_size
variable to fix this problem.
ucode gerrit id: 123739
ucode commit id: cdda98
ucode change id: Icc58a

Verify:
AB311

Change-Id: I98dd67ac0dbbe12a40c5e737ea856a3d429cf62b
Signed-off-by: Peng yixin <yixin.peng@amlogic.com>
4 years agomedia_module: fix a crash in cts r [1/1]
Hui Zhang [Fri, 18 Sep 2020 01:51:59 +0000 (09:51 +0800)]
media_module: fix a crash in cts r [1/1]

PD#SWPL-33266

Problem:
when a invalid vf being detected in vf_put, there are a lot
of printk cause system crash

Solution:
1) add valid checkn for dummy vf in vf_put
2) add debug level for invalid vf printk

Verify:
AC214

Change-Id: I910136a290b95c4c1ca24ad52fb2e5be6e8b6d0b
Signed-off-by: Hui Zhang <hui.zhang@amlogic.com>
4 years agotsync: move tsync related start/stop from v-stream to tsync [2/3]
Zhizhong Zhang [Wed, 16 Sep 2020 11:19:31 +0000 (19:19 +0800)]
tsync: move tsync related start/stop from v-stream to tsync [2/3]

PD#SWPL-32957

Problem:
zap to audio only channel,no audio output

Solution:
move tsync related start/stop from v-stream to tsync

Verify:
AH212 patch-build

Change-Id: Ia2f741aac7ea91319fd0592da8d9485eb14423df
Signed-off-by: Zhizhong Zhang <zhizhong.zhang@amlogic.com>
4 years agovdec: calculate average in multi frame rate [1/1]
apollo.ling [Tue, 15 Sep 2020 13:41:43 +0000 (21:41 +0800)]
vdec: calculate average in multi frame rate [1/1]

PD#SWPL-33406

Problem:
need support Match Frame Rate function on disney

Solution:
Calculate average in multi frame rate

Verify:
ac214

Change-Id: Iab15872dc0c981c17fcb867840c8f58b7994fbdb
Signed-off-by: apollo.ling <apollo.ling@amlogic.com>
4 years agodmx: fix for recorder_stream [1/1]
Zhiqiang Han [Wed, 9 Sep 2020 10:52:44 +0000 (18:52 +0800)]
dmx: fix for recorder_stream [1/1]

PD#SWPL-32605

Problem:
subtitles & teletext cannot displayed when timeshift

Solution:
change record stream to video stream

Verify:
Change-Id: I9d6f2574f757149a7f7618b1d36c69556461f2db

4 years agovmh264: fix DCAC dma memory pollution issue [1/1]
Hui Zhang [Fri, 28 Aug 2020 07:59:11 +0000 (15:59 +0800)]
vmh264: fix DCAC dma memory pollution issue [1/1]

PD#SWPL-32462

Problem:
memory pullotion by DCAC dma

Solution:
add DCAC dma address range check to void oversize

ucode gerrit id: 122592
ucode commit id: b99eca
ucode change id: I038ee

Verify:
u212

Change-Id: I038ee5769324539ae55876b9572f6ed795f164f7
Signed-off-by: Hui Zhang <hui.zhang@amlogic.com>
4 years agomedia_module: h264 sleep during soft interruptions issue [1/1]
Peng Yixin [Mon, 7 Sep 2020 06:07:12 +0000 (14:07 +0800)]
media_module: h264 sleep during soft interruptions issue [1/1]

PD#SWPL-32808

Problem:
The sleep function was called in the soft
interruptions(Decoder decoding timeout), which
caused the problem.

Solution:
This problem is solved by placing the sleep
function in the workqueue from the soft
interruptions.

Verify:
U215

Change-Id: I3e199a8639ed9411560a000f39f2344cb6b4dd8a
Signed-off-by: Peng Yixin <yixin.peng@amlogic.com>
4 years agovmh264: fixed vf being output repeatly issue. [2/2]
Hui Zhang [Fri, 28 Aug 2020 11:36:07 +0000 (19:36 +0800)]
vmh264: fixed vf being output repeatly issue. [2/2]

PD#SWPL-31351

Problem:
sometimes frame was output twice, because there is race
condition between vf_put and get_smallest_poc. so it
need lock to protect critical code

Solution:
add lock to protect critiacl code

Verify:
AC214

Change-Id: I6c7aed70f3a9e3f4d72ff53f5256b117a62c7399
Signed-off-by: Hui Zhang <hui.zhang@amlogic.com>
4 years agov4l2: refine dmabuf recycle on output port [1/1]
Song Zhao [Wed, 9 Sep 2020 06:56:44 +0000 (23:56 -0700)]
v4l2: refine dmabuf recycle on output port [1/1]

PD#SWPL-32040

Problem:
When output port is working at DMABUF mode, at resolution change point,
there is a chance recycle_dmabuf can not be triggered at right timing.
As a result, all the freed buffers are still in vdec input, but
applicaiton can not dqueue any from M2M.

Solution:
Add callback in vdec intput, so when a chunk is released the callback is
triggered to return the buffer to M2M.

Verify:
U212 + DSTV

Change-Id: I64d6f0b2d1d7000323e6e2f674ae328846cb89a7
Signed-off-by: Song Zhao <song.zhao@amlogic.com>