Skip to content

Conversation

@dominator-prime
Copy link

…uplayer/NuPlayerDecoder.cpp:500:46: error:

frameworks/av/media/libmediaplayerservice/nuplayer/NuPlayerDecoder.cpp:500:46: error: format specifies type 'long long' but the argument has type 'nsecs_t' (aka 'long') [-Werror,-Wformat]
ALOGD("rsme - flus deltaTime: %lld", deltaTime);
~~~~ ^~~~~~~~~
%ld

123bghgh and others added 19 commits December 17, 2023 22:32
Call handleOutputFormatChange in onResume
to ensure the onChangeAudioFormat() been called.

The general principles works as:

1. It was a timing issue and only happened when doFlush came earlier
   than the "MediaCodec::CB_OUTPUT_FORMAT_CHANGED" msg.
2. The msg of "MediaCodec::CB_OUTPUT_FORMAT_CHANGED" was stored
   if the decoder was in paused state which was set by doFlush().
3. When exiting paused state, call handleOutputFormatChange with
   msg stored before. A time judgment is added to confirm the msg was
   just intercepted.

Change-Id: I6b316f3b89cec9b3de42d5b0ee77ec1684da0ac2
Signed-off-by: Jia Jia <jia.jia@zte.com.cn>
Signed-off-by: Hưng Phan <phandinhhungvp2001@gmail.com>
Validating the timestamps before writing to webm writer

Test: ./webm_writer_fuzzer

Bug: 190889324

Change-Id: I1cdf575a3f7115b8c0c816b0a48ac763aab24573
Signed-off-by: Hưng Phan <phandinhhungvp2001@gmail.com>
it could be lost many chances to
get to be blocked state using C2Fence
due to undequeued buffers in mMaxDequeueCount.
so, check NATIVE_WINDOW_MIN_UNDEQUEUED_BUFFERS and
set actual max dequeueable count to C2SurfaceSyncObj.

Change-Id: I45ddab944a0ebf1fcbe718d7508dfd5fe5831dda
Signed-off-by: Taehwan Kim <t_h.kim@samsung.com>
Signed-off-by: Hưng Phan <phandinhhungvp2001@gmail.com>
sometimes,
surface holds the number of buffers over
the number of undequeued buffers.
so, compare them and use bigger size as undequeueable number.

Change-Id: I9f80d77e4dd8f0dd2de25879346f809e42fd5dc2
Signed-off-by: Taehwan Kim <t_h.kim@samsung.com>
Signed-off-by: Hưng Phan <phandinhhungvp2001@gmail.com>
Test: atest audioeffect_analysis
Bug: 302036943
Change-Id: Id4d28e1de4ce6d5d70d7ebacc6d1f7662b43ac8a
Signed-off-by: Hưng Phan <phandinhhungvp2001@gmail.com>
With HAL buffer manager, in case the HAL caches buffers, the camera
device won't become idle until the cached buffers are returned by the
HAL. In that case, onCaptureSequenceCompleted won't be triggered.

Modify the implementation such that onCaptureSequenceCompleted won't be
delayed until onIdle.

Test: Camera CTS, vendor testing
Bug: 289323712
Change-Id: I4600170e392615d247b4453dd4fbcf90cc55752f
Signed-off-by: Hưng Phan <phandinhhungvp2001@gmail.com>
If NDK user only uses availability callback then no service connection
will be made. Thus, no availability callback will be posted to the user.

Also, the camera service used to unconditionally filter out the status
change, if the listener is vendor listener. So, VNDK user will never
receive the availability callback.

With this patch, availability callback routine explicitly makes
connection to the service, and the status change will be filtered from
the service properly using shouldSkipStatusUpdates().

Test: use availability callback only from jni sample, vendor sample
Change-Id: Ic1d5951e3ee3b24ffe19aa780c67a98db781545b
Signed-off-by: Hưng Phan <phandinhhungvp2001@gmail.com>
…Test#testSimpleDecode

SendOutputBuffers() was called from 3 entrances. Sometimes, output buffer was poped but
not send to callback, then sendOutputBuffers() is running in another thread,
and buffers in callback functions were not in the poped order.

Bug: 267912772
Change-Id: Id6f9e866e0150ff16a6aff3543fda342d6eab5fe
Signed-off-by: Ming Zhou <ming.zhou@nxp.com>
Signed-off-by: Hưng Phan <phandinhhungvp2001@gmail.com>
If observer died while allocating buffers, component remains
in loaded state. In cleanup, it checks for idle state to
free the allocated buffers which leads to memory leak.
Hence explicitly calling free buffers to avoid memory leak.

Change-Id: Ia8bd21f161473a18be30ec0fd7ad84b9e8fd83ee
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
Signed-off-by: Hưng Phan <phandinhhungvp2001@gmail.com>
An approximation of exp function is used in Compress,
but the argument can exceed +-1.0 when the input
signal or the target gain is drastically changed,
then the output of the function can becomes inaccurate.
Use expf() to get accurate output since its
performance is enough based on the benchmark.

Bug: 314374972
Test: Change targetgain when using loudnessenhancer
Change-Id: I47795345655b4ad8becb0ee18ef981eb40ff847f
Signed-off-by: Hưng Phan <phandinhhungvp2001@gmail.com>
Do not call IGBP::cancelBuffer() from C2BqPool based blocks after the
Pool is invalidated.

Bug: 304183768
Test: atest android.media.decoder.cts.AdaptivePlaybackTest
Change-Id: Ic03a42077c5e752722c3c7c654e03c4f6fedde4d
Signed-off-by: Hưng Phan <phandinhhungvp2001@gmail.com>
Wake up C2Fence waiters when the client process died. Also disable
futher block allocations from C2BufferQueueBlockPool.

Bug: 312707275
Bug: 309898317
Bug: 304183768

Change-Id: Ib0a6322d55db5600fcbc930de2ceec33339dfb56
Signed-off-by: Hưng Phan <phandinhhungvp2001@gmail.com>
Bug: 312707275
Bug: 309898317
Bug: 304183768
Change-Id: I5c6c2bbdd4859220a3f41f83998d88d0a7b9ddcb
Signed-off-by: Hưng Phan <phandinhhungvp2001@gmail.com>
This is an experimental project under development and testing. The build
is disabled by default. Most of the source code is copied from
C2SoftGav1Dec but decompression is configured to use dav1d instead of
gav1.

Bug: 277797541
Test: atest -v  CtsMediaPerformanceClassTestCases:android.mediapc.cts.VideoCodecRequirementsTest
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:8f3af1d872428d0d48aab85ab18795fa35d65043)
Merged-In: Iecd54940a47252f635cff29962261193b4c44a2e
Change-Id: Iecd54940a47252f635cff29962261193b4c44a2e

Signed-off-by: Hưng Phan <phandinhhungvp2001@gmail.com>
libyuv calls are now moved to functions in SimpleC2Component, so that
they can be called from other plugins as well in the future.

Also, with this libcodec2_soft_av1dec_dav1d.so doesn't depend on libyuv
directly and instead libcodec2_soft_common.so depends on libyuv.

This helps in handling cfi related failures that are seen when some
*.so declared cfi_assembly_support as true and some didn't and had a
depedency on libyuv.

Bug: 286058440
Bug: 286564165

Test: stagefright -s av1.webm
Merged-In: I230227149cffe45a8cc47fe1095685af1e95fc34
Change-Id: I230227149cffe45a8cc47fe1095685af1e95fc34
Signed-off-by: Hưng Phan <phandinhhungvp2001@gmail.com>
Bug: 286882111
Test: Enable file dump

Merged-In: Ic4d51b6bacec08d93507aee9e0313d46afd3c0fa
Change-Id: Ic4d51b6bacec08d93507aee9e0313d46afd3c0fa
Signed-off-by: Hưng Phan <phandinhhungvp2001@gmail.com>
Bug: 286852962
Test: atest android.mediav2.cts.CodecDecoderTest

Merged-In: Ifa5324e2b5f9e86bbb10dd1fe3cc60552e1236f0
Change-Id: Ifa5324e2b5f9e86bbb10dd1fe3cc60552e1236f0
Signed-off-by: Hưng Phan <phandinhhungvp2001@gmail.com>
Sometimes lock() of GraphicBuffer does not grants a valid mapping
pointer though the return value is NO_ERROR. Regards this case as an
error.

Bug: 303816969
Change-Id: I95d2a583dd8fdd117534f349d9f9e71323792bd7
Signed-off-by: Hưng Phan <phandinhhungvp2001@gmail.com>
…uplayer/NuPlayerDecoder.cpp:500:46: error:

frameworks/av/media/libmediaplayerservice/nuplayer/NuPlayerDecoder.cpp:500:46: error: format specifies type 'long long' but the argument has type 'nsecs_t' (aka 'long') [-Werror,-Wformat]
        ALOGD("rsme - flus deltaTime: %lld", deltaTime);
                                      ~~~~   ^~~~~~~~~
                                      %ld
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants