Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Port commits from android 14 #206

Open
wants to merge 14 commits into
base: master
Choose a base branch
from

Conversation

lsun30
Copy link
Contributor

@lsun30 lsun30 commented Dec 6, 2024

Port commits from android 14

@sysopenci
Copy link

Improper Commit Message
Valid Commit Message
Improper Jira Status,
jira status not in ['In Progress','Implemented']

@sysopenci sysopenci added Pending PR Review Pending PR Review Engineering Build Not Started Engineering Build Not Started labels Dec 6, 2024
nanazhan and others added 14 commits December 10, 2024 03:37
1. Send consumer usage from framework, allocate system/video memory according to
consumer usage.
2. If cpu read often, use minigbm allocate linear NV12 buffer, and C2 send this
"system buffer" to OneVPL, OneVPL internally allocate NV12 buffer for decoding using
vaapi and copy this internal buffer to linear surface internally

Tracked-On: OAM-124103
Signed-off-by: Nana Zhang <[email protected]>

(cherry picked from commit 7968852)
Tracked-On: OAM-128364
Signed-off-by: Lina Sun <[email protected]>
Tracked-On: OAM-124578
Signed-off-by: Nana Zhang <[email protected]>

(cherry picked from commit a071ad9)
Tracked-On: OAM-128364
Signed-off-by: Lina Sun <[email protected]>
run ats -a x86_6 -m GtsExoPlayerTestCases -t
  com.google.android.exoplayer.gts.CommonEncryptionDrmTest#cencSchemeTypeV184

The root cause is that the resolution changed processing flow was triggered
when decoding the last input bitstream with the same timestamp but different frame index.
At this point, the input must be processed as an independent frame.

Tracked-On: OAM-118988
Signed-off-by: Wan, Hao <[email protected]>

(cherry picked from commit 769bcd1)
Tracked-On: OAM-128364
Signed-off-by: Lina Sun <[email protected]>
This reverts commit 3542c39.

As driver doesn't support decode 10bit bitsteam to 8 bit frames
directly. Previous solution of changing frame info to 8-bit does
not work. Revert the commit and use VPP to convert 10 bit frames
to 8 bit.

Tracked-On: OAM-122766
Signed-off-by: Lina Sun <[email protected]>

(cherry picked from commit 9451408)
Tracked-On: OAM-128364
Signed-off-by: Lina Sun <[email protected]>
For 10 bit bitstream decoder, if decode format is not specified,
VPP convert 10 bit frames to 8 bit frames as output.

Tracked-On: OAM-122766
Signed-off-by: Lina Sun <[email protected]>

(cherry picked from commit 656fff2)
Tracked-On: OAM-128364
Signed-off-by: Lina Sun <[email protected]>
std::make_shared will throw the std::bad_alloc exception rather than return nullptr.
Here just remove the logically dead code for the coverity issue.

Tracked-On: OAM-123225
Signed-off-by: Wan, Hao <[email protected]>

(cherry picked from commit a2321db)
Tracked-On: OAM-128364
Signed-off-by: Lina Sun <[email protected]>
CID/Type:
187157 Explicit null dereferenced
656172 Dereference after null check
602228 Dereference before null check

Tracked-On: OAM-126078
Signed-off-by: Wan, Hao <[email protected]>

(cherry picked from commit 1c6ccea)
Tracked-On: OAM-128364
Signed-off-by: Lina Sun <[email protected]>
When `MFX_BUFFER_QUEUE` is enabled, `mediaskd_c2` will use a buffer queue
implemented in `mediasdk_c2`(maybe framework doesn't support before).
Now, we will use the buffer queue in Android media framework. Therefore,
this part of the code is deprecated.

Signed-off-by: Nana Zhang <[email protected]>
Tracked-On: OAM-124733

(cherry picked from commit 5d67a88)
Tracked-On: OAM-128364
Signed-off-by: Lina Sun <[email protected]>
CID 398855: 'Constant' variable guards dead code

Refer to the implementation of ImportBuffer in minigbm:
hardware/intel/external/minigbm-intel/cros_gralloc/gralloc1/cros_gralloc1_module.cc
int32_t CrosGralloc1::importBuffer(const buffer_handle_t rawHandle, buffer_handle_t *outBuffer)

Tracked-On: OAM-126428
Signed-off-by: Wan, Hao <[email protected]>

(cherry picked from commit e87dd39)
Tracked-On: OAM-128364
Signed-off-by: Lina Sun <[email protected]>
Will add dumping code in another way, input & output buffer dump
for encoder & decoder will all be able to be configured by
set property.

Tracked-On: OAM-124732
Signed-off-by: Lina Sun <[email protected]>

(cherry picked from commit d150b3b)
Tracked-On: OAM-128364
Signed-off-by: Lina Sun <[email protected]>
Dump can be enabled by set property, detailed steps can be found
in mfx_c2_encoder_component.cpp/mfx_c2_decoder_component.cpp,
near InitDump().

Tracked-On: OAM-124732
Signed-off-by: Lina Sun <[email protected]>

(cherry picked from commit cebb891)
Tracked-On: OAM-128364
Signed-off-by: Lina Sun <[email protected]>
In widevine L3 stream play test, the timestamps between Load and Decode
have gaps.

Tracked-On: OAM-124689
Signed-off-by: Nana Zhang <[email protected]>

(cherry picked from commit 5cb9ea7)
Tracked-On: OAM-128364
Signed-off-by: Lina Sun <[email protected]>
Fix AV1 encode issue of "Encoder configure failed" and test be
always waiting and can not run to end when running ffmpeg.

"Encoder configure failed" is because in mfx_set_RateControlMethod
function AV1 encoder case in not handled.

Test always wait and can't run to end is because GopRefDist is not
set when initializing AV1 encoder, default value of 8 from vpl is
used, which caused mediasdk_c2 can't send work done notification
to framework codec, so framework codec can't queue more works after
queuing initial 4 works.

Besides, use PROFILE_AV1_0 & LEVEL_AV1_5_3 as default AV1 encoder
profile & level instead of PROFILE_AV1_0 & LEVEL_AV1_7_3, as the
latter can not work.

Tracked-On: OAM-124081
Signed-off-by: Lina Sun <[email protected]>

(cherry picked from commit d48d495)
Tracked-On: OAM-128364
Signed-off-by: Lina Sun <[email protected]>
In hybrid GPU case, video decoder could be iGPU and the coded images
would be consumed by dGPU. Unfortunately, it's likely that we can hardly
find a tiling format supported by both of them. To achieve best
compatibility and make our life better, simply use linear buffers for
decoded images.

By setting CPU_READ and CPU_WRITE flags, we force OneVPL to allocate
internal buffers and blit decoded content to external buffers. In this
way we can work around hardware limitation that DG2 cannot decode to
linear buffers.

We will detect the GPU group type and decide whether to use linear
buffers or not.

Tracked-On: OAM-126399
Signed-off-by: Weifeng Liu <[email protected]>

(cherry picked from commit bfcd81e)
Tracked-On: OAM-128364
Signed-off-by: Lina Sun <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Engineering Build Not Started Engineering Build Not Started Pending Developer Approval Pending Developer Approval Pending PR Review Pending PR Review Valid commit message
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants