GitHub/LineageOS/G12/android_hardware_amlogic_kernel-modules_media.git
4 years agovp9: support V4L2 HDR static setting [1/1]
Song Zhao [Thu, 3 Sep 2020 18:35:30 +0000 (11:35 -0700)]
vp9: support V4L2 HDR static setting [1/1]

PD#SWPL-32750

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:
U212 + HDMITX output

Change-Id: Ia07732d7af34e3f6930ef4c2b4d08c120132ad80
Signed-off-by: Song Zhao <song.zhao@amlogic.com>
4 years agoavs: multi-instance mosaic and decode timeout issue [2/2]
Peng yixin [Wed, 19 Aug 2020 05:20:16 +0000 (13:20 +0800)]
avs: multi-instance mosaic and decode timeout issue [2/2]

PD#SWPL-25623

Problem:
1.Ucode send interrupt twice in the decoding process,
which leads to the abnormal decoding process.
2.There was an error frame when the stream returned, and
the memory address required for CC was not reconfigured,
resulting in mosaics and timeout.
ucode gerrit id: 121825
ucode commit id: 1f5ff6
ucode change id: I4812c

Solution:
1.Send interrupts correctly to the decoder.
2.When there is an error in the code stream,
the memory address requiredfor CC is reconfigured

Verify:
AB311

Change-Id: I2f06e56282995aaba3f3cb53c12c3924d7bff23a
Signed-off-by: Peng yixin <yixin.peng@amlogic.com>
4 years agovdec: avoid decoder run and work executing at the same time [1/1]
apollo.ling [Fri, 22 May 2020 07:18:29 +0000 (15:18 +0800)]
vdec: avoid decoder run and work executing at the same time [1/1]

PD#SWPL-26671

Problem:
decoder run and work executing at same time will causes race conditions

Solution:
avoid decoder run and work executing at the same time

Verify:
u212

Change-Id: I9e16c7cebc6fb7d0bc36f749d7bc430c515e6c6a
Signed-off-by: apollo.ling <apollo.ling@amlogic.com>
4 years agomedia_module: fixed H264_CO_MB_WR_ADDR DMC VIOLATION issue [2/2]
Peng yixin [Wed, 2 Sep 2020 07:35:57 +0000 (15:35 +0800)]
media_module: fixed H264_CO_MB_WR_ADDR DMC VIOLATION issue [2/2]

PD#SWPL-32433

Problem:
The value of H264_CO_MB_WR_ADDR register will be saved in vr07 register
in ucode before internal reset. After internal reset, the value of
vr07 will be restored to H264_CO_MB_WR_ADDR. But in the process of
reset, vr07 will be assigned again, which causes the wrong address to
be written when restoring H264_CO_MB_WR_ADDR register.

Solution:
Instead of using vr07 during internal reset, replace it
with an unused register to resolve this problem.
ucode gerrit id: 123089
ucode commit id: 3501a8d
ucode change id: Ia931ebb

Verify:
AB311

Change-Id: Ia82a30eb83370bec419b99ddb64f9ed967b89d85
Signed-off-by: Peng yixin <yixin.peng@amlogic.com>
4 years agomedia_module: fixed avs bus lock issue [1/1]
Peng yixin [Thu, 3 Sep 2020 02:19:54 +0000 (10:19 +0800)]
media_module: fixed avs bus lock issue [1/1]

PD#SWPL-32609

Problem:
Sometimes the avs decoder driver remove,
the hardware did not stop completely, causing bus
lock issue.

Solution:
Resolve this problem by reset the
decoder hardware to stop it when avs driver remove.

Verify:
AB311

Change-Id: I79a83068e6cd83134e2430aee4c0a8f32a440436
Signed-off-by: Peng yixin <yixin.peng@amlogic.com>
4 years agoamstream: force use ptsserv when have parser. [1/1]
shihong.zheng [Mon, 31 Aug 2020 13:26:08 +0000 (21:26 +0800)]
amstream: force use ptsserv when have parser. [1/1]

PD#SWPL-32519

Problem:
error in synchronization between Audio and video

Solution:
force use ptsserv when have parser.

Verify:
u215

Change-Id: I4dda61a459684e602a4ecd76fd6c8791c05ba6d4
Signed-off-by: shihong.zheng <shihong.zheng@amlogic.com>
4 years agostream_input: need to enable tsync. [1/2]
chen.chen1 [Fri, 28 Aug 2020 10:00:32 +0000 (18:00 +0800)]
stream_input: need to enable tsync. [1/2]

PD#SWPL-32438

Problem:
A/V out of sync, because tsync_pcr is not enabled

Solution:
call func tsync_pcr_start and tsync_pcr_stop

Verify:
verified on S905X4-AH212

Change-Id: I2a567cd1080c31c40e8330a3776edb7777d40222
Signed-off-by: Chen Chen <chen.chen1@amlogic.com>
4 years agodecoder: add TR135 video parameter counter. [1/3]
wenlong.yuan [Fri, 21 Aug 2020 07:13:12 +0000 (15:13 +0800)]
decoder: add TR135 video parameter counter. [1/3]

PD#SWPL-31491

Problem:
need add detail video parameter counter for iptv and ott.

Solution:
add the video parameters for multi decoder,use vdec.c func
vdec_fill_vdec_frame to add video info and use amstream.c
ioctl index AMSTREAM_IOC_GET_MVDECINFO to get the video info.

Verify:
905X2-U212

Change-Id: I0572e0df4d561c47b870b4cec1371b0dad8755cb
Signed-off-by: wenlong.yuan <wenlong.yuan@amlogic.com>
4 years agodecode: fixed issue of vmap fail when playback 8k. [2/2]
Nanxin Qin [Thu, 6 Feb 2020 10:41:55 +0000 (18:41 +0800)]
decode: fixed issue of vmap fail when playback 8k. [2/2]

PD#SWPL-30672

Problem:
the vmap fail cause crash that reason is not enough addr map.

Solution:
split a big block mem to many piece area then mapping.

Verify:
u212

Change-Id: I2ba11789f66c3bfd1bf636243b5e7a0a2df2e1da
Signed-off-by: Nanxin Qin <nanxin.qin@amlogic.com>
4 years agoh265: fix no aux data in stream mode. [2/2]
Gan Zhang [Tue, 25 Aug 2020 11:16:05 +0000 (19:16 +0800)]
h265: fix no aux data in stream mode. [2/2]

PD#SWPL-31988

Problem:
when search buffer empty, don't set aux data size.
the screen will display a green screen.

Solution:
set aux data size when search buffer empty.

ucode gerrit id: 122133
ucode commit id: bb4df7
ucode change id: I2f370

Verify:
AB301

Change-Id: I412257df939e5b5944b502f2ff849ea9e7800191
Signed-off-by: Gan Zhang <gan.zhang@amlogic.com>
4 years agoh265: Support long term reference picture set in h265 format. [2/2]
Gan Zhang [Wed, 6 May 2020 06:24:04 +0000 (14:24 +0800)]
h265: Support long term reference picture set in h265 format. [2/2]

PD#SWPL-25233

Problem:
h265 format playback appears mosaic.

Solution:
Add long term reference picture set in drivers and ucode.
ucode gerrit id:108332
ucode commit id:2b404e
ucode change id:I0baac

PS:Video_ucode.bin corresponds to the wrong information
because there is no rebase for the ucode commit.

Verify:
W400

Change-Id: I9925744ca14029cd4f41e4892504ebc26b4c9ab9
Signed-off-by: Gan Zhang <gan.zhang@amlogic.com>
4 years agoamstream: add pts checkin for no parser mode. [2/2]
shihong.zheng [Wed, 15 Jul 2020 06:04:42 +0000 (14:04 +0800)]
amstream: add pts checkin for no parser mode. [2/2]

PD#SWPL-25652

Problem:
1. pts checkin with error offset in no parser mode.
2. decode driver output offset for no pts server mode.

Solution:
1. add stream offset, and update the checkin interface;
2. lookup pts when set use pts server enable;
3. when not use pts server, the pts_us64 in vf is offset.

Verify:
AH219

Change-Id: Ie5ea52decb4bad162f3526f03e714244a0481c3d
Signed-off-by: shihong.zheng <shihong.zheng@amlogic.com>
4 years agodecoder: pass dummy vf to notify eos. [1/1]
shihong.zheng [Fri, 14 Aug 2020 06:47:00 +0000 (14:47 +0800)]
decoder: pass dummy vf to notify eos. [1/1]

PD#SWPL-31618

Problem:
decoder pass a dummy vf with eos flag to
backend.

Solution:
pass a dummy vf with eos flag when eos recieved.

Verify:
S905Y2

Change-Id: I775678ee94eeb6db3d304f3e44bf0a3f5def70de
Signed-off-by: shihong.zheng <shihong.zheng@amlogic.com>
4 years agomedia_module: Hevc core cannot schedule issue [1/1]
Peng Yixin [Fri, 21 Aug 2020 02:03:07 +0000 (10:03 +0800)]
media_module: Hevc core cannot schedule issue [1/1]

PD#SWPL-32068

Problem:
When the decoder released incorrectly,
the corresponding scheduling bit was not
cleared, after that, cause video can not
playback.

Solution:
This problem is solved by clean the
corresponding scheduling token bit.

Verify:
T962X3

Change-Id: Ie1dd610f679ec6beba5a352a320778a5ad003a87
Signed-off-by: Peng Yixin <yixin.peng@amlogic.com>
4 years agovav1: fix vav1 freeze when fps changed. [1/1]
shihong.zheng [Tue, 18 Aug 2020 11:19:20 +0000 (19:19 +0800)]
vav1: fix vav1 freeze when fps changed. [1/1]

PD#SWPL-31264

Problem:
vav1 freeze when fps change.

Solution:
reset pts save and recalc duration when
last out pts larger than in pts.

Verify:
ah212

Change-Id: Ibe267df597dc8a4b5798c88d5520bd5b9a68109e
Signed-off-by: shihong.zheng <shihong.zheng@amlogic.com>
4 years agomedia_module: avs multi-instance ___might_sleep issue [1/1]
Peng Yixin [Fri, 24 Jul 2020 02:50:49 +0000 (10:50 +0800)]
media_module: avs multi-instance ___might_sleep issue [1/1]

PD#SWPL-31906

Problem:
There are problems with sleep in isr..

Solution:
Move all the sleep functions to isr_fn to solve this problem.

Verify:
u212

Change-Id: Ibff6bd4dcf52b1bdf81c7c5fcdfec95a987ec5f9
Signed-off-by: Peng Yixin <yixin.peng@amlogic.com>
4 years agomedia_module: avs multi-instance dmc violation [1/2]
Peng Yixin [Tue, 21 Jul 2020 12:02:39 +0000 (20:02 +0800)]
media_module: avs multi-instance dmc violation [1/2]

PD#SWPL-31906

Problem:
avs multi-instance playback, dmc violation cause system crash.
CC and canvas config used the same register(AV_SCRATCH_N) cause crash.

Solution:
canvas config use AV_SCRATCH_M to resolve this issue.
ucode gerrit id: 118323
ucode change id: Iea8e9d
ucode commit id: e47078e

Verify:
u212

Change-Id: Ic9354fd81b2840a2f6416fd9d8a14593e4af42fa
Signed-off-by: Peng Yixin <yixin.peng@amlogic.com>
4 years agovh265: disable auto switch to duration mode [1/1]
Hui Zhang [Tue, 18 Aug 2020 05:25:49 +0000 (13:25 +0800)]
vh265: disable auto switch to duration mode [1/1]

PD#SWPL-30099

Problem:
this auto switch is not work well. beccause in some error
case. it will output wrong pts , cause display block

Solution:
remove this auto switch for pts duration mode

Verify:
U215

Change-Id: I80c428e7869318ba6507c86ba104d8fe5a997690
Signed-off-by: Hui Zhang <hui.zhang@amlogic.com>
4 years agompeg12: fix vfifo data empty bug. [1/1]
shihong.zheng [Wed, 19 Aug 2020 11:31:06 +0000 (19:31 +0800)]
mpeg12: fix vfifo data empty bug. [1/1]

PD#SWPL-31902

Problem:
fix mpeg12 vfifo data empty status bug.

Solution:
consume current chunk and do not get more chunk
for this run.

Verify:
ah212

Change-Id: I7c0eb7c7283937a4179246d5bce7ca8ad1d72893
Signed-off-by: shihong.zheng <shihong.zheng@amlogic.com>
4 years agodmx: unexpected dvr feed restoring [1/1]
Zhiqiang Han [Tue, 18 Aug 2020 05:38:57 +0000 (13:38 +0800)]
dmx: unexpected dvr feed restoring [1/1]

PD#SWPL-31675

Problem:
need more checks for the raw channels.
which are not managed by the dvb's feed

Solution:
make more checks on the raw channels

Verify:
Patchbuild

Change-Id: I0036d94fb6b58a8a108d79bcd46b50d00e656739
Signed-off-by: Zhiqiang Han <zhiqiang.han@amlogic.com>
4 years agodecoder: revert SWPL-31491 tr135. [1/3]
wenlong.yuan [Thu, 20 Aug 2020 12:24:37 +0000 (20:24 +0800)]
decoder: revert SWPL-31491 tr135. [1/3]

PD#SWPL-31491

Problem:
need add detail video parameter counter for iptv and ott.

Solution:
add the video parameters for multi decoder,use vdec.c func
vdec_fill_vdec_frame to add video info and use amstream.c
ioctl index AMSTREAM_IOC_GET_MVDECINFO to get the video info.

Verify:
905X2-U212

Change-Id: I9a9dc413ce7553510af6c9573fb600eb4da02c8f
Signed-off-by: wenlong.yuan <wenlong.yuan@amlogic.com>
4 years agodecoder: add TR135 video parameter counter. [1/3]
wenlong.yuan [Fri, 14 Aug 2020 09:42:21 +0000 (17:42 +0800)]
decoder: add TR135 video parameter counter. [1/3]

PD#SWPL-31491

Problem:
need add detail video parameter counter for iptv and ott.

Solution:
add the video parameters for multi decoder,use vdec.c func
vdec_fill_vdec_frame to add video info and use amstream.c
ioctl index AMSTREAM_IOC_GET_MVDECINFO to get the video info.

Verify:
905X2-U212

Change-Id: I91f95861f6558db0b06476c41db2f131004e250b
Signed-off-by: wenlong.yuan <wenlong.yuan@amlogic.com>
4 years agovdec: mmjpeg call reset_process_time in wrong point [1/1]
apollo.ling [Tue, 18 Aug 2020 12:07:42 +0000 (20:07 +0800)]
vdec: mmjpeg call reset_process_time in wrong point [1/1]

PD#SWPL-31855

Problem:
The fullformat get stuck in M-JPEG-ADPCM U-Law-8524 Kbps-640x480.AVI

Solution:
Correct the wrong position of calling reset_process_time

Verify:
u212

Change-Id: I6c463915a0bb871eef188c4b7812046f87dbdd02
Signed-off-by: apollo.ling <apollo.ling@amlogic.com>
4 years agovdec: fix h264 interlace jitter problem [1/1]
Peng Yixin [Wed, 12 Aug 2020 08:07:31 +0000 (16:07 +0800)]
vdec: fix h264 interlace jitter problem [1/1]

PD#SWPL-28668

Problem:
Loop playback DVB stream program,the
video not smooth.

Solution:
When stream back return then force POC
to be flushed from DPB under some
conditions.

Verify:
u215

Change-Id: Ifdb257d02b34d6afc4960a235c014a42218b6633
Signed-off-by: Peng Yixin <yixin.peng@amlogic.com>
4 years agomedia_module: h265 dvb playback unsmooth and mosaic [1/1]
Peng Yixin [Mon, 17 Aug 2020 06:39:24 +0000 (14:39 +0800)]
media_module: h265 dvb playback unsmooth and mosaic [1/1]

PD#SWPL-31281

Problem:
Because the mmu box is mistakenly released,
cause mmu memory has no cache mechanism, so
memory allocation spend a lot of time(ave 7ms),
leading to playback unsmooth.And DVB playback,
decoding speed is not enough to lead stream
buffer overflow, then show mosaic picture.

Solution:
The current mechanism is not to release mmu
idx to resolve this issue.

Verify:
AB311-B

Change-Id: I6eaf0eb7ffd659b96907a352cf4d548070569001
Signed-off-by: Peng Yixin <yixin.peng@amlogic.com>
4 years agovp9: fix mediav2 cts fail. [1/1]
Gan Zhang [Thu, 30 Jul 2020 16:13:04 +0000 (00:13 +0800)]
vp9: fix mediav2 cts fail. [1/1]

PD#SWPL-31685

Problem:
1.When the decoder decodes the input chunk that only contains the header,
the pts message output by the decoder will error.
2.When there are multiple frames in a packet, there will be no buffer
decoding in the driver, resulting in frame loss.

Solution:
1.Save the pts information for the input chunk at each run time,
when a jump occurs in the decoded output, use the saved pts information.
2.When there are multiple frames in a packet, the run condition is
changed based on how many frames are in the packet, and when
there is a decoding buffer, the decoding is continued.

Verify:
U212

Change-Id: I8b84b9dc1b1f0debd8c026e2eb0ee3136ac2666d
Signed-off-by: Gan Zhang <gan.zhang@amlogic.com>
4 years agompeg12: fix frame mode interlace data insufficient. [1/1]
shihong.zheng [Tue, 11 Aug 2020 04:28:36 +0000 (12:28 +0800)]
mpeg12: fix frame mode interlace data insufficient. [1/1]

PD#SWPL-30096

Problem:
decode timeout repeatly when use android raw extractor.
cts failed. interlace mpeg12 two slices in two packets.

Solution:
add data request status send more chunk for decode when
data insufficient.

ucode gerrit id: 120436
ucode commit id: 713286
ucode change id: I517c3

Verify:
ah212

Change-Id: Ieeb93c93290ab8b6fcf31b30ea63dddcf01cf47b
Signed-off-by: shihong.zheng <shihong.zheng@amlogic.com>
4 years agov4l2: do not reset pool fields on streamoff output port [1/1]
Song Zhao [Wed, 12 Aug 2020 06:22:29 +0000 (23:22 -0700)]
v4l2: do not reset pool fields on streamoff output port [1/1]

PD#SWPL-30433

Problem:
a) Streamoff output port will reset cap_pool.in, it will cause decoding
error like "v4l_get_free_buf_idx fail"
b) Sometimes
application will not call dqueue of capture buffer to trigger
aml_recycle_dma_buffers().

Solution:
ONLY reset cap_pool filed on streamoff capture port.
Recycle DMA secure buffer after receiving vframe from VFM.

Verify:
U212 + RDK + DSTV seek

Change-Id: Ic9e72591398c5c68cbad970282f4530a4a91c22f
Signed-off-by: Song Zhao <song.zhao@amlogic.com>
4 years agoh265: fix aux data drop when EOS found. [1/1]
shihong.zheng [Wed, 12 Aug 2020 10:51:30 +0000 (18:51 +0800)]
h265: fix aux data drop when EOS found. [1/1]

PD#SWPL-30763

Problem:
aux data drop when EOS NAL found in dv frame mode.

Solution:
set aux data size when NAL EOS found and get
dv meta data in EOS NAL search done.
ucode gerrit id: 120524
ucode change id: I76c2bce
ucode commit id: d8f1e41

Verify:
ah212

Change-Id: Ifb3b08516b9e04ce57d196930469dfe2a8d8cedb
Signed-off-by: shihong.zheng <shihong.zheng@amlogic.com>
4 years agodemux: fix DES algo not work on s905x3/SM1. [1/1]
Yahui Han [Wed, 5 Aug 2020 09:24:17 +0000 (17:24 +0800)]
demux: fix DES algo not work on s905x3/SM1. [1/1]

PD#SWPL-31149

Problem:
DES scrambled stream cannot play on s905x3/SM1.

Solution:
adjust hw register config to support DES.

Verify:
AC214

Signed-off-by: Yahui Han <yahui.han@amlogic.com>
Change-Id: Ia81d1f4513b07c94b7c181df587afbe23713766c

4 years agomedia_module: fix mpred memory pullution issue [1/1]
Hui Zhang [Thu, 6 Aug 2020 11:16:21 +0000 (19:16 +0800)]
media_module: fix mpred memory pullution issue [1/1]

PD#SWPL-30902

Problem:
there is mpred hw memory pollution when poor signal burning

Solution:
add hw address protect in mpred ctrl

Verify:
U215

Change-Id: Ia254a7ba92875f63f3086d8337de99b196333638
Signed-off-by: Hui Zhang <hui.zhang@amlogic.com>
4 years agoav1: fix av1 av sync nts problem. [1/1]
shihong.zheng [Mon, 10 Aug 2020 04:16:52 +0000 (12:16 +0800)]
av1: fix av1 av sync nts problem. [1/1]

PD#SWPL-31133

Problem:
nts av sync test failed. av1 decoder
drop first pts which value is 0.

Solution:
change the pts save condition. fix
first pts drop bug.

Verify:
ah212

Change-Id: I7eeafd38ab8215d55f0d5efe7de0a027f42ea1a2
Signed-off-by: shihong.zheng <shihong.zheng@amlogic.com>
4 years agovdec: hevc reset core modificatios [1/2]
apollo.ling [Mon, 27 Jul 2020 09:26:19 +0000 (17:26 +0800)]
vdec: hevc reset core modificatios [1/2]

PD#SWPL-28883

Problem:
system will restart when playback specific DVB stream program

Solution:
Modify some hevc reset core registers

Verify:
u215

Change-Id: Idd7a503b4914c7fc28cdc577e7584613a68ef1f6
Signed-off-by: apollo.ling <apollo.ling@amlogic.com>
4 years agovdec: reduce and adjust amvdec canvas num. [2/2]
shihong.zheng [Mon, 20 Jul 2020 07:04:48 +0000 (15:04 +0800)]
vdec: reduce and adjust amvdec canvas num. [2/2]

PD#SWPL-29996

Problem:
canvas saving in video decoder.

Solution:
reduce and adjust the range of amvdec canvas index.

Verify:
S905X2

Change-Id: I82b251191fda4fa729e225b2973a85b8230916e6
Signed-off-by: shihong.zheng <shihong.zheng@amlogic.com>
4 years agoh265: fix dv flush black pic. [1/1]
shihong.zheng [Fri, 7 Aug 2020 07:23:10 +0000 (15:23 +0800)]
h265: fix dv flush black pic. [1/1]

PD#SWPL-30435

Problem:
hevc dv flash black pic. dv switch
to sdr. aux data size is cleared.

Solution:
do not repeat set aux data size
when search buffer empty.
ucode gerrit: 120190
ucode commit id: dd1d41b
ucode change id: I7c9ebaf

Verify:
ah212

Change-Id: I150bf5c319db4a137638b61b48424abd930edb1f
Signed-off-by: shihong.zheng <shihong.zheng@amlogic.com>
4 years agovdec: fix h265 interlace jitter problem [1/1]
apollo.ling [Wed, 29 Jul 2020 02:48:28 +0000 (10:48 +0800)]
vdec: fix h265 interlace jitter problem [1/1]

PD#SWPL-30555

Problem:
playback specific DVB stream program,the video not smooth

Solution:
When stream back return then force POC to be flushed from DPB under some
conditions

Verify:
u215

Change-Id: I0ff2d1bacb3963dad19785345a4ef21ff00794d7
Signed-off-by: apollo.ling <apollo.ling@amlogic.com>
4 years agoprint: kernel printk optimize [1/1]
Zhiqiang Han [Mon, 3 Aug 2020 03:30:39 +0000 (11:30 +0800)]
print: kernel printk optimize [1/1]

PD#SWPL-30651

Problem:
kernel printk optimize:
too many dvb printk durning boot

Solution:
disable print by default,
use module's debug parameter.

Verify:
Patchbuild

Change-Id: Id753372a0ef75f19074bdfd88a3938b52d73209b
Signed-off-by: Zhiqiang Han <zhiqiang.han@amlogic.com>
4 years agovmh264: Solve the bug of incomplete screen output. [1/1]
miaohong chen [Thu, 30 Jul 2020 07:19:19 +0000 (15:19 +0800)]
vmh264: Solve the bug of incomplete screen output. [1/1]

PD#SWPL-30704

Problem:
Height 1088 forced 1080, resulting in
missing display at the bottom of the screen.

Solution:
Only force 1088 to 1080 when cropping

Verify:
u212

Change-Id: Id8c16b5c692724459f21e48ea0b4c581e31cdfa3
Signed-off-by: miaohong chen <miaohong.chen@amlogic.com>
4 years agoh265: add print_lcu_error to control lcu related printings [1/1]
apollo.ling [Tue, 4 Aug 2020 02:45:06 +0000 (10:45 +0800)]
h265: add print_lcu_error to control lcu related printings [1/1]

PD#SWPL-30945

Problem:
183 consecutive repeated lcu Kernel prints per second,
which may make the system hang

Solution:
add print_lcu_error to control lcu related printings

Verify:
u215

Change-Id: I4bd8d301bfc72ffbcf9e5768b6688d7412928c29
Signed-off-by: apollo.ling <apollo.ling@amlogic.com>
4 years agomedia_modules: make h264 encoder compatible with older socs [1/1]
Rico Yang [Sun, 2 Aug 2020 17:12:16 +0000 (01:12 +0800)]
media_modules: make h264 encoder compatible with older socs [1/1]

PD#SWPL-25846

Problem:
h264 encoder not working on old socs pre-sc2

Solution:
make h264 encoder compatible with older socs

Verify:
verified on franklin

Change-Id: I1ddbea32748069be06ee344ec1dbf8987a5b350b
Signed-off-by: Rico Yang <wei.yang@amlogic.com>
4 years agov4l: supports playback of av1 with v4l codec. [1/1]
Nanxin Qin [Sun, 5 Apr 2020 04:34:04 +0000 (12:34 +0800)]
v4l: supports playback of av1 with v4l codec. [1/1]

PD#SWPL-23548

Problem:
add a new format AV1 for v4l codec.

Solution:
supports playback of av1 with v4l codec.

Verify:
verified with android Q on sc2.

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

4 years agovdec: fix parser permision rights confusion [1/1]
apollo.ling [Fri, 24 Jul 2020 11:45:00 +0000 (19:45 +0800)]
vdec: fix parser permision rights confusion [1/1]

PD#SWPL-29762

Problem:
When secure and non secure mode at the same time,persion rights conflicted

Solution:
correct the parser permision rights confusion.

Verify:
u215

Change-Id: I47987e793aa0af05dd07ec3a13de9f38c7444ac5
Signed-off-by: apollo.ling <apollo.ling@amlogic.com>
4 years agovmh264: fix dec reset during v4l2 playing. [1/1]
shihong.zheng [Mon, 3 Aug 2020 05:33:45 +0000 (13:33 +0800)]
vmh264: fix dec reset during v4l2 playing. [1/1]

PD#SWPL-29734

Problem:
fix h264 dec reset. h264 decode driver use
cap_pool.out to check buffer num, but it increase
both decoder and vpp get frame buffer.

Solution:
add new count var for dec. mapping a new seq index
for decoder buffer.

Verify:
u212

Change-Id: I9f1b30abbbaf5aeba8f281b4e2613fd3a610e0b3
Signed-off-by: shihong.zheng <shihong.zheng@amlogic.com>
4 years agoav1: fix some nts problem. [1/1]
shihong.zheng [Thu, 23 Jul 2020 09:45:37 +0000 (17:45 +0800)]
av1: fix some nts problem. [1/1]

PD#SWPL-30276

Problem:
av1 nts problem.

Solution:
get the saved pts for output frames.

Verify:
t962x2

Change-Id: Ia5c072cd0dc81bf8ef79b6739eaa54b737c539a3
Signed-off-by: shihong.zheng <shihong.zheng@amlogic.com>
4 years agoh265: Pass the dv_enhance_exist flag to the DV module [1/2]
Gan Zhang [Thu, 23 Jul 2020 07:49:37 +0000 (15:49 +0800)]
h265: Pass the dv_enhance_exist flag to the DV module [1/2]

PD#SWPL-29487

Problem:
In frame mode, the decoder does not parse EL Layer data.
We need to pass the dv_enhance_exist flag to the DV module.

Solution:
In frame mode, pass the dv_enhance_exist flag to the DV module.

Verify:
AH212

Change-Id: I338917c80ebba8bfcf283f856872bb355fd1d00b
Signed-off-by: Gan Zhang <gan.zhang@amlogic.com>
4 years agoMerge "media_modules: enable ge2d for sc2 hcode h264 [1/1]" into amlogic-4.9-dev-q
gerrit autosubmit [Thu, 30 Jul 2020 10:44:20 +0000 (03:44 -0700)]
Merge "media_modules: enable ge2d for sc2 hcode h264 [1/1]" into amlogic-4.9-dev-q

4 years agomedia_modules: enable ge2d for sc2 hcode h264 [1/1]
Rico Yang [Sun, 12 Jul 2020 16:04:16 +0000 (00:04 +0800)]
media_modules: enable ge2d for sc2 hcode h264 [1/1]

PD#SWPL-29388

Problem:
cts case android.media.cts.EncodeVirtualDisplayTest#testEncodeVirtualDisplay
failed because of color space mismatch

Solution:
use ge2d to convert color space before encoding

Verify:
verified on S905X4

Change-Id: I0488ca1f0d6bdbfa439268917cbd6c932b294f61
Signed-off-by: Rico Yang <wei.yang@amlogic.com>
4 years agoMerge "media_modules: fix vpu crash on soc-pre-sc2 [1/1]" into amlogic-4.9-dev-q
Zhi Zhou [Wed, 29 Jul 2020 00:57:36 +0000 (17:57 -0700)]
Merge "media_modules: fix vpu crash on soc-pre-sc2 [1/1]" into amlogic-4.9-dev-q

4 years agomedia_modules: fix vpu crash on soc-pre-sc2 [1/1]
Rico Yang [Tue, 28 Jul 2020 13:15:45 +0000 (21:15 +0800)]
media_modules: fix vpu crash on soc-pre-sc2 [1/1]

PD#SWPL-25846

Problem:
vpu probe crashed on socs pre sc2

Solution:
fix vpu crash on soc-pre-sc2

Verify:
verified on franklin android q

Change-Id: I1c3149a5552edd7d71c6002c57f136e315a05c58
Signed-off-by: Rico Yang <wei.yang@amlogic.com>
4 years agoMerge "vmh264: fix bug of abnormal cropping. [1/1]" into amlogic-4.9-dev-q
Hui Zhang [Tue, 28 Jul 2020 11:17:59 +0000 (04:17 -0700)]
Merge "vmh264: fix bug of abnormal cropping. [1/1]" into amlogic-4.9-dev-q

4 years agovmh264: fix bug of abnormal cropping. [1/1]
miaohong chen [Mon, 27 Jul 2020 08:52:31 +0000 (16:52 +0800)]
vmh264: fix bug of abnormal cropping. [1/1]

PD#SWPL-28943

Problem:
chroma_format_idc may not exist, causing misuse,
resulting in abnormal crop

Solution:
According to grammar rules,
when chroma_format_idc does not exist, set it to 1.

Verify:
u212

Change-Id: Iba5624a7d3b542b00b677d1c062dd23af6b0131d
Signed-off-by: miaohong chen <miaohong.chen@amlogic.com>
4 years agovdec: h265 alloc mmu_box when dw changed from 0x10 to 0x1 [1/1]
apollo.ling [Wed, 22 Jul 2020 02:47:08 +0000 (10:47 +0800)]
vdec: h265 alloc mmu_box when dw changed from 0x10 to 0x1 [1/1]

PD#SWPL-28883

Problem:
When h265 dw changed from 0x10 to 1, mmu_box is NULL,can not play video

Solution:
1. When h265 dw changes to 1, check and alloc mmu_box
2. add calling vm_unmap_aliases() every 64 times because vfree is not
   synchronize.

Verify:
ac214

Change-Id: I0c8920debf79a0af2fafaca07b5bc20e8467adab
Signed-off-by: apollo.ling <apollo.ling@amlogic.com>
4 years agomedia_modules: sc2 encoder bringup [1/1]
Rico Yang [Fri, 3 Jul 2020 13:45:33 +0000 (21:45 +0800)]
media_modules: sc2 encoder bringup [1/1]

PD#SWPL-25846

Problem:
sc2 bringup

Solution:
sc2 bringup

Verify:
verified on AH219

#Signed-off-by: Rico Yang <wei.yang@amlogic.com>
#Change-Id: Ie7f65deda5e580424f7e593115feb98181733581

media_modules: h265enc: set wave_clok_a to 667 and add interface
for setting clock speed [1/1]

PD#SWPL-25846

Problem:
wave420 run underclocked

Solution:
set wave_clock_a to 667M

Verify:
verified on AH219

#Signed-off-by: Rico Yang <wei.yang@amlogic.com>
#Change-Id: I6f1b6b067ca5196476cc674540e0ef079c52530f

Signed-off-by: Rico Yang <wei.yang@amlogic.com>
Change-Id: Ie7f65deda5e580424f7e593115feb98181733581

4 years agoamstream: fix null pointer crash in dv frame mode. [1/1]
shihong.zheng [Mon, 27 Jul 2020 06:45:45 +0000 (14:45 +0800)]
amstream: fix null pointer crash in dv frame mode. [1/1]

PD#SWPL-30431

Problem:
secure dolby vision frame mode crash.

Solution:
no slave vdec in dolby vision frame mode.
so needn't set slave vdec port_flag.

Verify:
ah212

Change-Id: Ib4010e8d243be0fba773b02b0f6984ea9f9dfb67
Signed-off-by: shihong.zheng <shihong.zheng@amlogic.com>
4 years agovh265: fix h265 dv frame mode overdecode error. [1/1]
shihong.zheng [Mon, 27 Jul 2020 06:04:26 +0000 (14:04 +0800)]
vh265: fix h265 dv frame mode overdecode error. [1/1]

PD#SWPL-30305

Problem:
dv frame mode overdecode when resolution change.

Solution:
do not check empty and shift status when dv mode
detected EOS

Verify:
ah212

Change-Id: Icbc04376f9aed259660f24e26b89ae04cfec250f
Signed-off-by: shihong.zheng <shihong.zheng@amlogic.com>
4 years agodmx: more fixes for RECORDER_PACKETS [1/1]
Zhiqiang Han [Tue, 30 Jun 2020 12:48:12 +0000 (20:48 +0800)]
dmx: more fixes for RECORDER_PACKETS [1/1]

PD#SWPL-28809

Problem:
In some cases,
video data path conflicts with rec path

Solution:
RECORDER_PACKETS rules:
at least one a/v channel should exist.

monitor the video channel,
manage the channel pkt types

Verify:
Change-Id: I6630b9abfecc6eaeea2068b707e8f0d34b4f3b87
Signed-off-by: Zhiqiang Han <zhiqiang.han@amlogic.com>
4 years agovmh264: fix video stuck bug [1/1]
miaohong chen [Thu, 23 Jul 2020 07:34:46 +0000 (15:34 +0800)]
vmh264: fix video stuck bug [1/1]

PD#SWPL-24277

Problem:
Multi-instance h264 stream roasting machine stuck.

Solution:
Reset the stuck decoder in timer interrupt.

Verify:
u212

Change-Id: Ic7da08918b010ddd065be85c19df981b481337e1
Signed-off-by: miaohong chen <miaohong.chen@amlogic.com>
4 years agovp9: fix cts test fail. [2/2]
Gan Zhang [Wed, 22 Jul 2020 03:22:39 +0000 (11:22 +0800)]
vp9: fix cts test fail. [2/2]

PD#SWPL-29348

Problem:
When stream has only one LCU in the x direction,
the decoding will fail.

Solution:
For a single lcu stream, it is necessary to wait for the
mpred fifo to be in the idle state before decoding.

ucode gerrit id: 118467
ucode commit id: a7ba2b
ucode change id: I20bd9

Verify:
TM2 and SC2

Change-Id: I4e2e5c620ae46574bf17fcf6df170ddc3771c532
Signed-off-by: Gan Zhang <gan.zhang@amlogic.com>
4 years agov4l: fixed the issue of vp9 can't playback on linux. [1/1]
Nanxin Qin [Thu, 23 Jul 2020 09:17:49 +0000 (17:17 +0800)]
v4l: fixed the issue of vp9 can't playback on linux. [1/1]

PD#SWPL-29656

Problem:
has wrong of the private head data of vp9 cause playback failed,
becuase usually the head process on the omx but if on the linux
the v4l codec driver need to handle it.

Solution:
restore the function of use supperframe split filter make sure
add head data process normal if work on linux.

Verify:
u212

Change-Id: Ie3cf4858c2c4160b9ca551e39faca5a5c127fe19
Signed-off-by: Nanxin Qin <nanxin.qin@amlogic.com>
4 years agovdec: set sc2 no single mode profile. [1/1]
shihong.zheng [Thu, 2 Jul 2020 05:28:25 +0000 (13:28 +0800)]
vdec: set sc2 no single mode profile. [1/1]

PD#SWPL-28657

Problem:
sc2 do not support single mode.
sc2 stream mode dv freeze at first frame.

Solution:
1. add no_single in vcodec profile.
2. update wp for el to get a right buf level.

Verify:
sc2

Change-Id: I53da1855b5245e919b0ca7379f557b975a34b0dd
Signed-off-by: shihong.zheng <shihong.zheng@amlogic.com>
(cherry picked from commit 3360b1a2411905d15e81de423c94986f2830dd1c)

4 years agovdec: fix sc2 hevcf clk ref count error. [1/1]
shihong.zheng [Fri, 17 Jul 2020 12:50:04 +0000 (20:50 +0800)]
vdec: fix sc2 hevcf clk ref count error. [1/1]

PD#SWPL-25656

Problem:
hevcf clk ref count error.

Solution:
fix sc2 hevc frone clock gate node name.

Verify:
AH219

Change-Id: I897b1ee4810e39fc2eebe095980c1ddea5250a27
Signed-off-by: shihong.zheng <shihong.zheng@amlogic.com>
(cherry picked from commit 5482101b4f327d9d27adf42cef6747e5f02a459e)

4 years agoav1: add buffers for q mainline. [1/1]
shihong.zheng [Sat, 4 Jul 2020 13:40:12 +0000 (21:40 +0800)]
av1: add buffers for q mainline. [1/1]

PD#SWPL-28916

Problem:
SWPL-28916 some av1 play freeze
SWPL-28911 duration error caused frames output too fast.

Solution:
android q need 2 more buffers for display.
set calc dur wide range limit.

Verify:
sc2

Change-Id: I34b4371c1271e1f49e720d1bd370965fa6a430bb
Signed-off-by: shihong.zheng <shihong.zheng@amlogic.com>
(cherry picked from commit 9885d98f727777e4f6f8966fd0690d7ae76d875c)

4 years agomedia_module: fix amvdec_ports.ko loading error [1/1]
Gan Zhang [Wed, 22 Jul 2020 12:17:37 +0000 (20:17 +0800)]
media_module: fix amvdec_ports.ko loading error [1/1]

PD#SWPL-29656

Problem:
fix amvdec_ports.ko loading error.

Solution:
export the function.

Verify:
local build

Change-Id: I1df171daa541f468e5cf23f9e6df4d97d0ebb7e2
Signed-off-by: Gan Zhang <gan.zhang@amlogic.com>
4 years agoMerge "vdec: support power manager for vdec. [1/1]" into amlogic-4.9-dev-q
Hui Zhang [Wed, 22 Jul 2020 06:17:00 +0000 (23:17 -0700)]
Merge "vdec: support power manager for vdec. [1/1]" into amlogic-4.9-dev-q

4 years agovdec: support power manager for vdec. [1/1]
Nanxin Qin [Thu, 25 Jun 2020 10:19:00 +0000 (18:19 +0800)]
vdec: support power manager for vdec. [1/1]

PD#SWPL-28425

Problem:
SC2 DOS power domain management

Solution:
1. unite interface for vdec power ctrl.
2. support config power ctrl mode from dts.
3. 5 modes can be used: a. legacy b.power-ctrl-api
   c.power-domain d.pd-sec-api e.pd-non-sec-api

Verify:
u212, ac214

Change-Id: I6554fe7abe0afc652e549452cd822ddf3630435b
Signed-off-by: Nanxin Qin <nanxin.qin@amlogic.com>
4 years agoMerge "media_module: clean no license source file [1/1]" into amlogic-4.9-dev-q
Hui Zhang [Wed, 22 Jul 2020 05:21:25 +0000 (22:21 -0700)]
Merge "media_module: clean no license source file [1/1]" into amlogic-4.9-dev-q

4 years agovmh264: fix bug of cropping. [1/1]
miaohong chen [Wed, 15 Jul 2020 12:48:37 +0000 (20:48 +0800)]
vmh264: fix bug of cropping. [1/1]

PD#SWPL-29563

Problem:
A register uses 32 bits to store
four crop offset syntax parameters,
resulting in the loss of high bits when passed to the driver.

Solution:
Use rpm memory to pass crop offset parameters.

ucode gerrit : 117325
ucode commit id: 18db008

Verify:
u212

Change-Id: I854ba3da073e63150fa1216ce775dff87399cff4
Signed-off-by: miaohong chen <miaohong.chen@amlogic.com>
4 years agovdec: h265 check and avoid NULL pointer [1/1]
apollo.ling [Wed, 8 Jul 2020 13:25:12 +0000 (21:25 +0800)]
vdec: h265 check and avoid NULL pointer [1/1]

PD#SWPL-29760

Problem:
In some cases h265 there is a NULL pointer used

Solution:
Check and avoid to use NULL pointer

Verify:
T962X3

Change-Id: Ic1f3b24c065cd23163ef5dd0caca7b8a7fb488b9
Signed-off-by: apollo.ling <apollo.ling@amlogic.com>
4 years agovmh264: stream mosaic [1/1]
miaohong chen [Tue, 14 Jul 2020 13:28:23 +0000 (21:28 +0800)]
vmh264: stream mosaic [1/1]

PD#SWPL-29711

Problem:
H264 stream mosaic

Solution:
The first gop of the code stream is a single slice,
and the latter part is a multi-slice.
Because the multi-slice detection mechanism is added before,
the single slice decision is triggered by mistake, resulting in mosaic.
Improve multi-slice detection mechanism.

Verify:
u212

Change-Id: I1e3491a1e0441eb50dcec8666c5ebffcd01ba1f7
Signed-off-by: miaohong chen <miaohong.chen@amlogic.com>
(cherry picked from commit 9a5cbbebe1cc6f2b7dff38121ba5a2c9397f6fbf)

4 years agoframerate_adapter: add framerate_adapter function. [1/1]
shilong.yang [Mon, 8 Jun 2020 12:43:32 +0000 (20:43 +0800)]
framerate_adapter: add framerate_adapter function. [1/1]

PD#SWPL-26471

Problem:
seed uevent to android systemcontral.

Solution:
add kobject_uevent_env function in the media_modules.

Verify:
franklin

Change-Id: Id9fbcb20fd964648b9d7966d0e2d2b6547a2814c
Signed-off-by: shilong.yang <shilong.yang@amlogic.com>
4 years agovdec: add calculation for duration [1/1]
apollo.ling [Tue, 9 Jun 2020 10:07:49 +0000 (18:07 +0800)]
vdec: add calculation for duration [1/1]

PD#SWPL-26472

Problem:
this is a new feature.

Solution:
Use the first 5 frame's pts to calculate the duration,
then compare to driver's duration,select the best one.

Verify:
ac214

Change-Id: I198fc7d761c08508c56bbe85fcd0ae8c71de37a0
Signed-off-by: apollo.ling <apollo.ling@amlogic.com>
4 years agomedia_module: clean no license source file [1/1]
Gan Zhang [Tue, 14 Jul 2020 06:17:33 +0000 (14:17 +0800)]
media_module: clean no license source file [1/1]

PD#SWPL-29656

Problem:
clean no license source file.

Solution:
Add license information to the source file.

Verify:
local build

Change-Id: Icb24944da1d185a3289ec172fcd83fc7d1b2cfca
Signed-off-by: Gan Zhang <gan.zhang@amlogic.com>
4 years agov4l: fixed the issue of cts. [1/1]
Nanxin Qin [Thu, 9 Jul 2020 16:39:44 +0000 (00:39 +0800)]
v4l: fixed the issue of cts. [1/1]

PD#SWPL-28575

Problem:
When capture buffer's status isn't stream on, there is no flush video pipeline.
The driver will not send EOS to the back end, this will cause jamming.

Solution:
When the upper layer sends the stop command, flush the video pipeline.

Verify:
U212

Change-Id: I0ae3f73e536bfcba85f8901c2cb7ce4d46b99e75
Signed-off-by: Nanxin Qin <nanxin.qin@amlogic.com>
4 years agodvb: add demux dev open count node [1/1]
Chengshun Wang [Mon, 13 Jul 2020 05:57:59 +0000 (13:57 +0800)]
dvb: add demux dev open count node [1/1]

PD#SWPL-29545

Problem:
when free filters have count not use,
but demux device can not open

Solution:
add node to calculate demux device open count

Verify:
U215

Change-Id: I98f780ee0618eb353533efda386f66c0c640839c
Signed-off-by: Chengshun Wang <chengshun.wang@amlogic.com>
4 years agov4l2: add interlaced field support in try_fmt [1/1]
Song Zhao [Mon, 6 Jul 2020 15:51:26 +0000 (08:51 -0700)]
v4l2: add interlaced field support in try_fmt [1/1]

PD#SWPL-29144

Problem:
try_fmt only return V4L2_FIELD_ANY. But gstreamer v4l2 plugin want to
check whether V4L2_FIELD_INTERLACED is supported or not.

Solution:
For H264/Mpeg2, add V4L2_FIELD_INTERLACED support.

Verify:
U212 + gst-launch

Change-Id: I8516840b2d8e13e6795a9749c36153c7e77dc9b4
Signed-off-by: Song Zhao <song.zhao@amlogic.com>
4 years agomedia: The H264 and H265 formats support DV in Frame mode [2/2]
Gan Zhang [Tue, 16 Jun 2020 03:25:08 +0000 (11:25 +0800)]
media: The H264 and H265 formats support DV in Frame mode [2/2]

PD#SWPL-25611

Problem:
support dv frame mode.

Solution:
add DOLBY_META_SUPPORT in ucode and
set aux data in frame mode.

ucode gerrit id: 115646
ucode commit id: da74861
ucode change id: I4c6e0e

Verify:
ac214

Change-Id: I29647903fdb185965ee228d82e9dc7106f94e883
Signed-off-by: Gan Zhang <gan.zhang@amlogic.com>
4 years agovdec: force vdec status to VDEC_STATUS_CONNECTED when disconnect timeout [1/1]
apollo.ling [Sat, 4 Jul 2020 10:19:50 +0000 (18:19 +0800)]
vdec: force vdec status to VDEC_STATUS_CONNECTED when disconnect timeout [1/1]

PD#SWPL-28414

Problem:
vdec_disconnect timeout,vdec can not be removed from connected list

Solution:
force vdec status to VDEC_STATUS_CONNECTED when disconnect timeout

Verify:
S905C1-AC232

Change-Id: I53053b794dc669923d0d4809dc909c7654614010
Signed-off-by: apollo.ling <apollo.ling@amlogic.com>
4 years agodvb: reset all hw demux register when reset the demux device.[1/1]
Yahui Han [Fri, 3 Jul 2020 07:12:33 +0000 (15:12 +0800)]
dvb: reset all hw demux register when reset the demux device.[1/1]

PD#SWPL-29104

Problem:
didn't reset dsc register when reset the demux device.

Solution:
reset all hw demux register when reset the demux device.

Verify:
u215.

Change-Id: Id1dccea2308382e339c22655350e4ff6258d94af
Signed-off-by: Yahui Han <yahui.han@amlogic.com>
4 years agovmh264: stream not smooth [1/1]
miaohong chen [Thu, 2 Jul 2020 06:00:57 +0000 (14:00 +0800)]
vmh264: stream not smooth [1/1]

PD#SWPL-28869

Problem:
H264 stream frequently not smooth

Solution:
cause:The number of inverted frames is inaccurate,
which results in the frame not being output in time
and the code stream is not smooth.
If the grammar has reverse frame number reoder_num_frames,
reoder_num_frames is preferred.

Verify:
u212

Change-Id: I1b176ae825db01caed44a2a49de0789a2af8d562
Signed-off-by: miaohong chen <miaohong.chen@amlogic.com>
4 years agov4l: optimize the format mjpeg for v4l codec. [1/2]
Peng Yixin [Sat, 4 Apr 2020 10:35:04 +0000 (18:35 +0800)]
v4l: optimize the format mjpeg for v4l codec. [1/2]

PD#SWPL-23747

Problem:
optimize the format mjpeg for v4l codec.

Solution:
1. supports parser the picture params from HW.
2. supports picture format YU12(I420)
3. ucode commit id:
   879f23b8b65c09241ff40b29ff0d2aa270a0fa12

Android P, Q share CLs.

Verify:
u212

Change-Id: I6c506e007f0c3a4bcda66f53fac943cee404cf18
Signed-off-by: Peng Yixin <yixin.peng@amlogic.com>
4 years agovdec: fix mpeg4 mosiac issue when multi-playback [1/1]
Hui Zhang [Wed, 27 May 2020 09:24:45 +0000 (17:24 +0800)]
vdec: fix mpeg4 mosiac issue when multi-playback [1/1]

PD#SWPL-26884

Problem:
mpeg4 steam show mosiac when mutli-mode
with some h264 stream

Solution:
add more vdec sub module reset

Verify:
U212

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

4 years agoh265: After seek DV streaming, Picture probabilistic color error. [1/2]
Gan Zhang [Thu, 25 Jun 2020 10:18:23 +0000 (18:18 +0800)]
h265: After seek DV streaming, Picture probabilistic color error. [1/2]

PD#SWPL-27754

Problem:
After seek, the decoded data is stored in aux buffer
because of some dirty data in front.

Solution:
After decoding the header, reset the prefix_aux_buf_pos.

ucode gerrit id: 114902
ucode commit id: 9c9743

Verify:
ab311-b

Change-Id: I6a181406d5f4bbbb1452068e14e619bfff339e58
Signed-off-by: Gan Zhang <gan.zhang@amlogic.com>
4 years agoMerge "media_module: h265 dvb playback crash and mosaic [1/1]" into amlogic-4.9-dev-q
Hui Zhang [Wed, 1 Jul 2020 06:06:48 +0000 (23:06 -0700)]
Merge "media_module: h265 dvb playback crash and mosaic [1/1]" into amlogic-4.9-dev-q

4 years agoh264_dec: config buf specs after resolution change [1/1]
Song Zhao [Fri, 26 Jun 2020 06:41:30 +0000 (23:41 -0700)]
h264_dec: config buf specs after resolution change [1/1]

PD#SWPL-28501

Problem:
In V4L2 mode, resolution change will trigger reset() and all the
canvas are released with h264_reconfig(). When it continues decoding
the data with new resolution, decoder will write to invalid canvas.

Solution:
In vh264_set_params() call config_buf_specs in V4L2 mode.

Verify:
U212
gst-play-1.0 http://www.bok.net/dash/tears_of_steel/cleartext/stream.mpd

Change-Id: Ia57678e91001d719b9477a62fcae7688455decfd
Signed-off-by: Song Zhao <song.zhao@amlogic.com>
4 years agodecoder: fix avs2 mjpeg problem for sc2. [1/1]
shihong.zheng [Wed, 1 Jul 2020 03:28:49 +0000 (11:28 +0800)]
decoder: fix avs2 mjpeg problem for sc2. [1/1]

PD#SWPL-25656

Problem:
avs2 decode timeout. mjpeg print
read reg stack.

Solution:
remove the sc2 simulation code changes.
do not read reset registers on sc2.
ucode gerrit id: 115354
ucode change id: Iaadee0

Verify:
sc2

Change-Id: I3b79a2bbe0cde8708f7b5164db1f61701c584c67
Signed-off-by: shihong.zheng <shihong.zheng@amlogic.com>
4 years agodvb: dvr: mosaic in pvr replay [1/1]
Zhiqiang Han [Fri, 19 Jun 2020 07:42:03 +0000 (15:42 +0800)]
dvb: dvr: mosaic in pvr replay [1/1]

PD#SWPL-28104

Problem:
incorrect reg reset at run time

Solution:
deal with the frequent source changing
set source only instread of reset all.

Verify:
Patchbuild

Change-Id: I8bb08a6e3dd067855248f0b79913ad13eb4830c9
Signed-off-by: Zhiqiang Han <zhiqiang.han@amlogic.com>
4 years agoasyncfifo: corrupted data found in recording [1/1]
Zhiqiang Han [Wed, 17 Jun 2020 06:08:37 +0000 (14:08 +0800)]
asyncfifo: corrupted data found in recording [1/1]

PD#SWPL-27889

Problem:
the starting of rec2 causes corrupted data in rec1.
incorrect reg setting on a running asyncfifo

Solution:
the start reg is a status, not the value set before.

Verify:
Patchbuild

Change-Id: I919e7286ef8c94c0a20b09c23080dc75bcdb0d13
Signed-off-by: Zhiqiang Han <zhiqiang.han@amlogic.com>
4 years agodmx: dbg: added debug info for channel pkt type [1/1]
Zhiqiang Han [Tue, 16 Jun 2020 08:18:34 +0000 (16:18 +0800)]
dmx: dbg: added debug info for channel pkt type [1/1]

PD#SWPL-27787

Problem:
more debug info on channle pkt type

Solution:
more debug info on channle pkt type

Verify:
Patchbuild

Change-Id: I7175dc3f7c52b1bd1a2ff480219b1028f2973474
Signed-off-by: Zhiqiang Han <zhiqiang.han@amlogic.com>
4 years agoMerge "dmx: section filter fail with BYPASS_PKT setting [3/3]" into amlogic-4.9-dev-q
Hui Zhang [Mon, 29 Jun 2020 10:09:59 +0000 (03:09 -0700)]
Merge "dmx: section filter fail with BYPASS_PKT setting [3/3]" into amlogic-4.9-dev-q

4 years agomedia_module: h265 dvb playback crash and mosaic [1/1]
Peng Yixin [Fri, 26 Jun 2020 08:31:32 +0000 (16:31 +0800)]
media_module: h265 dvb playback crash and mosaic [1/1]

PD#SWPL-27621

Problem:
1.other memory violation caused by decoder
2.playback show mosaic picture

Solution:
1.Optimize detection width and height information logic
to fixed memory violation caused by decoder.
2.First frame is detected whether has an over
decode error to reduce mosaic picture.
3.When the decode timeout current frame is marked
error.

Verify:
U215

Change-Id: I405ed24cf18af23eb194675e788bf702fd1a4fc1
Signed-off-by: Peng Yixin <yixin.peng@amlogic.com>
4 years agomedia_module: h265 stream mode discard dirty data [1/1]
Peng Yixin [Thu, 25 Jun 2020 03:10:25 +0000 (11:10 +0800)]
media_module: h265 stream mode discard dirty data [1/1]

PD#SWPL-27805

Problem:
The decoder did not discard the incorrect data,
cause playback stuck.

Solution:
When the video buffer data is enough but cannot
be decoded, the data is forcibly discarded to
prevent playback stuck.

Verify:
U215

Change-Id: Idf7bd694e1db5a99e2d628c880e47ffface24de3
Signed-off-by: Peng Yixin <yixin.peng@amlogic.com>
4 years agodmx: section filter fail with BYPASS_PKT setting [3/3]
Zhiqiang Han [Fri, 12 Jun 2020 07:23:35 +0000 (15:23 +0800)]
dmx: section filter fail with BYPASS_PKT setting [3/3]

PD#SWPL-27787

Problem:
section data is interrupted when BYPASS_PACKET exists

Solution:
Change the BYPASS_PACKET to VIDEO_PACKET & RECORDER_STREAM.

To support PLAY & REC on the same dmx, rules are introduces:
1. no A/V on dmx, rec-data should be set to VIDEO_PACKET,
   then block it from being parser processed with stream id filter.
2. A or V is running, use RECORDER_STREAM,
   do not use BYPASS_PACKET, which will break the normal play.
3. keep VIDEO_PACKET existed, to get the sec filter working.

Verify:
Patchbuild

Change-Id: I29e39093806159cbf77fa898bc610a983b3df371
Signed-off-by: Zhiqiang Han <zhiqiang.han@amlogic.com>
4 years agodemux: fix coverity issue [1/1]
Chuangcheng Peng [Tue, 23 Jun 2020 09:21:36 +0000 (17:21 +0800)]
demux: fix coverity issue [1/1]

PD#SWPL-27559

Problem:
 coverity issue

Solution:
 fix coverity issue.

Verify:
 verify at ab301

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

4 years agov4l: gst playback abnormal. [1/1]
Nanxin Qin [Tue, 23 Jun 2020 08:45:19 +0000 (16:45 +0800)]
v4l: gst playback abnormal. [1/1]

PD#SWPL-28377

Problem:
after update media_module to 0616 version, the gst over v4l2
playback is not working.

Solution:
the wrong of configuration of the output buffer mode that
caused allocate buffer failed.

Verify:
w200

Change-Id: I4adf8f082e7b67b495280894408b0363bdaeb190
Signed-off-by: Nanxin Qin <nanxin.qin@amlogic.com>
4 years agov4l2: fix a h264 decoder issue that exceed max dpb_size [1/1]
Song Zhao [Tue, 23 Jun 2020 17:26:28 +0000 (10:26 -0700)]
v4l2: fix a h264 decoder issue that exceed max dpb_size [1/1]

PD#SWPL-27697

Problem:
There is no buffer while decoder continue to decode.

Solution:
Add more check before run() is called. Patch from Nanxin.

Verify:
U212 + v4l2-vum-test

Change-Id: I64ec1a0d63ad367111bf6984b7d29bec04b65fa0
Signed-off-by: Song Zhao <song.zhao@amlogic.com>
4 years agomedia: Add checksum yuv info for decoder. [1/1]
Gan Zhang [Thu, 28 May 2020 15:50:01 +0000 (23:50 +0800)]
media: Add checksum yuv info for decoder. [1/1]

PD#SWPL-26431

Problem:
There is no checksum yuv info output.

Solution:
Print checksum info in frame check exit.

Verify:
local build

Change-Id: I1b20fb812cd2497be26ad7d1e1f124ea3c54c885
Signed-off-by: Gan zhang <gan.zhang@amlogic.com>
4 years agovmh264: fix the mosic when resolution changing [1/1]
miaohong chen [Fri, 19 Jun 2020 02:53:42 +0000 (10:53 +0800)]
vmh264: fix the mosic when resolution changing [1/1]

PD#SWPL-28253

Problem:
Mosaic appears from small resolution to large resolution.

Solution:
causes:After conversion, the small resolution frame buffers are not released,
and are used by the large resolution code stream.
Mark the small resolution frame buffer as ready to release.

Verify:
u212

Change-Id: Ic208167da54c05b7d962930c671f8e073fadd363
Signed-off-by: miaohong chen <miaohong.chen@amlogic.com>
4 years agovdec: initialize work before interrupt comming [1/1]
apollo.ling [Thu, 18 Jun 2020 12:15:22 +0000 (20:15 +0800)]
vdec: initialize work before interrupt comming [1/1]

PD#SWPL-27087

Problem:
The work is executed before it is initialized.

Solution:
initialize work before interrupt comming

Verify:
AC214

Change-Id: Ida18f12e390e518421b498f6373a3e30766d91f4
Signed-off-by: apollo.ling <apollo.ling@amlogic.com>
4 years agoh265: fix cts test h265 hangup issue [1/1]
Gan Zhang [Wed, 17 Jun 2020 11:14:28 +0000 (19:14 +0800)]
h265: fix cts test h265 hangup issue [1/1]

PD#SWPL-27314

Problem:
h265 decoder hangup, cause system reboot

Solution:
skip some error data to avoid decoder crash.

Verify:
P244

Change-Id: Iebd569c99866de626c6c4db214d22554224bef5d
Signed-off-by: Gan Zhang <gan.zhang@amlogic.com>
4 years agomedia_modules: sc2 media modules bringup. [1/1]
shihong.zheng [Tue, 16 Jun 2020 13:54:30 +0000 (21:54 +0800)]
media_modules: sc2 media modules bringup. [1/1]

PD#SWPL-26369

Problem:
sc2 media modules bringup.

Solution:
support sc2 decoder changes.
ucode change id: Ieb122b1
ucode commit id: ff35011e

Verify:
ptm/pxp

Change-Id: Ibda54d1710ef61841ae2a75c10912e796434dac2
Signed-off-by: shihong.zheng <shihong.zheng@amlogic.com>