Skip to content
Snippets Groups Projects
  1. Nov 28, 2023
    • Michał Krawczyk's avatar
      V4L2Decoder: do not check for DRC for secure codec · 26fc5733
      Michał Krawczyk authored
      It's not possible to access the frame data if the secure codec is used.
      
      An attempt to map() such data will result in an error, and attempt to
      wait for the DRC will cause a nullptr dereference.
      
      This patch adds a workaround, which skips the DRC verification if the
      secure codec is used.
      
      Bug: 280853786
      Bug: 274864105
      Test: GtsExoPlayerTestCases
      Change-Id: I5b9d990c87b8afef2817f6bb9b9d8afb42017ca9
      (cherry picked from commit 8fce6a632586b49aa23b14235363dca0f1fe0a7c)
      26fc5733
    • Zyta Szpak's avatar
      Reland: "V4L2Decoder: Check if waiting for DRC needed"" · 40700d27
      Zyta Szpak authored
      This reverts commit c69b69e501cc928a7bcb1867f26ae9423744c709.
      
      Reason for revert: this original commit revealed another bug
      that got fixed in Chrome and verified by security tests. It
      can now be safely relanded.
      
      Bug: 280853786
      Bug: 274864105
      Test: android.media.cts.DecoderTest#testEOSBehaviorVP9
      Change-Id: I6de423c5b8e6b9d11208d71d279b8ae31cf73f2d
      (cherry picked from commit ea9b7f077241a75f461f73e292298a6797e72276)
      40700d27
    • Zyta Szpak's avatar
      V4L2Decoder: Terminate drain if host is not streaming · 56ebfa4c
      Zyta Szpak authored
      While testing ARM devices a corner case was discovered
      that before the first resolution change event is dequeued
      Chrome output queues and host driver CAPTURE queues are
      not streaming but ARCVM has no knowledge of it. Drain
      never finishes because output EOS is expected.
      Marking that the resolution change was dequeued allows
      to recognize this state and act accordingly when handling
      drain.
      
      Bug: 280853786
      Bug: 232395110
      Test: android.mediav2.cts.CodecDecoderTest#testOnlyEos[15(video/avc)]
      Change-Id: I27d0f73a26d31f32a7e4cb473e685278b07f72a3
      (cherry picked from commit 05f380eb88f25cb6d598b01ca80a18860de527c7)
      56ebfa4c
  2. Oct 02, 2023
    • Michał Krawczyk's avatar
      V4L2ComponentName: Fix codec name assertions · b4ac6f10
      Michał Krawczyk authored
      The V4L2ComponentName::isValid() is often used as an assertion in other
      functions. In some of them, the codec name could be passed as
      std::string, and in some others the const char *.
      The type discrepancy was causing a build errors when the LOG_NDEBUG was
      defined.
      
      The simplest fix is to align the codec name type to be std::string
      everywhere.
      
      Test: m
      Change-Id: Ib4f6c7f0273ee57d889cfe2e60f0926c349a5871
      (cherry picked from commit 42d307dad3e564089a25436aecbf28d8e6206e91)
      b4ac6f10
  3. Sep 19, 2023
  4. Jul 28, 2023
    • Zyta Szpak's avatar
      V4L2DecodeInterface: Align maxInputSize with client request · c87fc769
      Zyta Szpak authored
      This CL takes into consideration client request for the
      max-input-size. Usually this request was smaller and
      component recommended a hardcoded value for
      area < 1920*1088 but it proved to be not enough for
      some specific case. First the parameter is read and
      stored, then we compare this value with the one
      calculated as before and we finally set the biggest one.
      In this way another hardcoding of arbitrary size
      for area between 1920*1080 and 1920*1088 is avoided.
      
      Bug: 280733224
      Test: CtsMediaEncoderTestCases
      Change-Id: I9486a6d81f9dcdd66ade8bfd10e5b4545ffcaf44
      c87fc769
  5. Jul 19, 2023
    • Garfield Tan's avatar
      Move v4l2_codec HAL from the manifest to a vintf fragment · f3004a13
      Garfield Tan authored
      The code owner then owns the manifest the vintf fragment.
      
      Remove IConfigurable because it isn't declared in the compatibility
      matrix. It isn't registered to hwservice_manager either in the
      implementation.
      
      Bug: 291157411
      Test: ARC++ boots.
      Change-Id: I1616bf2ae90327e87bf13cc379e85927333eb0ed
      f3004a13
  6. Jun 23, 2023
  7. May 25, 2023
  8. May 17, 2023
  9. May 10, 2023
    • Bartłomiej Grzesik's avatar
      V4L2DecodeInterface: Increase output delay for VPx · fcbfa847
      Bartłomiej Grzesik authored
      The decoder might held a few frames as a reference for decoding. Since
      Android T the Codec2 is more prone to timeout the component if one is not
      producing frames. This might especially occur when those frames are held
      for reference and playback/decoding is paused. With increased output delay
      we inform Codec2 not to timeout the component, if number of frames in
      components is less then the number of maximum reference frames that
      could be held by decoder.
      
      This CL increases C2_PARAMKEY_OUTPUT_DELAY to maximum number of frames
      that VPx specs specifies.
      
      Bug: 277456388
      Test: YouTube VP9 video remains paused after pause
      Change-Id: I2ba1aa3ef806c0d48888964577287d4c4afc4052
      fcbfa847
  10. May 08, 2023
    • Bartłomiej Grzesik's avatar
      V4L2Decoder: Drop frame that is already being processed · b4481929
      Bartłomiej Grzesik authored
      During MediaSyncTest the C2BufferQueueBlockPool can supply the same
      frame twice, due to inconsistency of cached GraphicBuffer assigned to
      specific buffer queue slots.
      
      Prior this change If our decoder detects that the frame is already
      enqueued to decoder device, such frame is ignored and frame fetch is
      retried.
      
      Bug: 275020404
      Test: CtsMediaMiscTestCases android.media.misc.cts.MediaSyncTest
      Test: CtsMediaDecoderTestCases
      Change-Id: I3ed10476f8c4bf4ede68787a55d423b712716e48
      b4481929
  11. Apr 25, 2023
  12. Apr 21, 2023
  13. Apr 20, 2023
  14. Apr 17, 2023
  15. Apr 14, 2023
  16. Apr 12, 2023
    • Bartłomiej Grzesik's avatar
      VideoFramePool: extend lifetime of C2GraphicBlock · e51ec9cd
      Bartłomiej Grzesik authored
      This CL adds mapping from buffer id to C2GraphicBlock to extend its
      underlying allocation lifetime. It is to prevent preemptive removal of
      protected buffer shadowing.
      
      Bug: 274597070
      Bug: 277016520
      Test: Widevine playback in ExoPlayer demo app
      Change-Id: I92768dddd4e6b7abcbef0d0b39f3427019c6b675
      e51ec9cd
  17. Mar 30, 2023
    • Slawomir Rosek's avatar
      V4L2Decoder: indicate CBP support for H264 codec · bc3d64e6
      Slawomir Rosek authored
      
      Since V4L2 codec already supports Baseline and Main Profiles
      we can safely indicate support for Constrained Baseline Profile.
      Current implementaion of virtio-video driver does not support
      query for decoder profiles so this patch updates only default
      cabalilities at C2Codec layer.
      
      Bug: 238390060
      Test: CtsMediaV2TestCases
      
      Change-Id: Id6843b931774d8065d38397c787582d38ee7366c
      Signed-off-by: default avatarSlawomir Rosek <srosek@google.com>
      bc3d64e6
  18. Mar 23, 2023
  19. Mar 16, 2023
  20. Mar 14, 2023
    • Bartłomiej Grzesik's avatar
      V4L2DecodeInterface: don't report support color-aspect for unsupported formats · b7ef4d3e
      Bartłomiej Grzesik authored
      Prior this patch V4L2DecodeInterface reported support for decoding
      color-aspect from stream unconditionally. However at this moment v4l2_codec2
      support decoding this information only for unprotected H264 and both
      protected and unprotected HEVC. This CL fixes this.
      
      Bug: 271992107
      Test: CtsMediaV2TestCases android.mediav2.cts.DecoderColorAspectsTest
      Change-Id: I4ba626c7766cf3cdb21757207ecac69eef0852c5
      b7ef4d3e
  21. Mar 13, 2023
    • Tao Wu's avatar
      V4L2EncodeComponent: Better error handling when syncing buffer · 9d0a7667
      Tao Wu authored
      Thanks Yiwei pointed out the buggy code which doesn't do error handling
      and also we should only sync CPU writable buffer.
      
      Bug: 268317650
      Test: atest com.google.android.media.gts.RtcVideoCodecTest#testDynamicBitrateChangeVp8
      Change-Id: I3c1019fb0d56180ef8460625843cf8e98301ddce
      9d0a7667
  22. Mar 09, 2023
    • Bartłomiej Grzesik's avatar
      V4L2DecodeInterface: Switch to GRALLOC allocator · 210185e4
      Bartłomiej Grzesik authored
      This CL switches to output allocator to C2PlatformAllocatorStore::GRALLOC
      that enforces use of C2PooledBufferPool without need of allocating a
      separate allocator ID. For this reason V4L2AllocatorId::V4L2_BUFFERPOOL
      is no longer used and is removed in this change.
      
      Bug: 268301611
      Bug: 268305422
      Bug: 270329448
      Bug: 238710012
      Bug: 238390060
      Bug: 270331759
      Bug: 238709912
      Test: CtsMediaCodecTestCases
      Test: CtsMediaDecoderTestCases
      Test: CtsMediaV2TestCases
      Test: GtsExoPlayerTestCases com.google.android.exoplayer.gts.CommonEncryptionDrmTest#cencSchemeTypeV*
      Change-Id: Ife2fbb6ac4ff2dc25e006792f8dad2d8ec6f4ac4
      210185e4
    • Bartłomiej Grzesik's avatar
      plugin_store: Remove unused code · 347ef462
      Bartłomiej Grzesik authored
      This CL removes unused source code files, since classes inside of them
      are no longer used in the component.
      
      Removed classes are:
       * C2VdaBqBlockPool
       * C2VdaPooledBlockPool
       * H2BGraphicBufferProducer
      
      Bug: 268301611
      Bug: 268305422
      Bug: 270329448
      Bug: 238710012
      Bug: 238390060
      Bug: 270331759
      Bug: 238709912
      Test: CtsMediaCodecTestCases
      Test: CtsMediaDecoderTestCases
      Test: CtsMediaV2TestCases
      Test: GtsExoPlayerTestCases com.google.android.exoplayer.gts.CommonEncryptionDrmTest#cencSchemeTypeV*
      
      Change-Id: I0fc53c942ecb44bde246fca72234a176acb47122
      347ef462
    • Bartłomiej Grzesik's avatar
      VideoFramePool: Remove unused methods · d73cbf57
      Bartłomiej Grzesik authored
      This CL removes requestNewBufferSet and setNotifyBlockAvailableCb
      methods, that became unused after switch to C2BufferQueueBlockPool and
      C2PooledBlockPool.
      
      Bug: 268301611
      Bug: 268305422
      Bug: 270329448
      Bug: 238710012
      Bug: 238390060
      Bug: 270331759
      Bug: 238709912
      Test: CtsMediaCodecTestCases
      Test: CtsMediaDecoderTestCases
      Test: CtsMediaV2TestCases
      Test: GtsExoPlayerTestCases com.google.android.exoplayer.gts.CommonEncryptionDrmTest#cencSchemeTypeV*
      Change-Id: I6085cb7d5a7118d2b81d1f6d9d533b98fc978fa1
      d73cbf57
    • Bartłomiej Grzesik's avatar
      V4L2DecodeInterface: Switch to C2PooledBlockPool · db98c8b0
      Bartłomiej Grzesik authored
      With implementation of limitation of number of fetched buffers inside
      VideoFramePool, there is no need to use C2VdaPooledBlockPool, hence
      switching to C2PooledBlockPool.
      
      Bug: 268301611
      Bug: 268305422
      Bug: 270329448
      Bug: 238710012
      Bug: 238390060
      Bug: 270331759
      Bug: 238709912
      Test: CtsMediaCodecTestCases
      Test: CtsMediaDecoderTestCases
      Test: CtsMediaV2TestCases
      Test: GtsExoPlayerTestCases com.google.android.exoplayer.gts.CommonEncryptionDrmTest#cencSchemeTypeV*
      
      Change-Id: Iaac647c0ddbeba1e820bb2daf63e94894eb2b424
      db98c8b0
    • Bartłomiej Grzesik's avatar
      V4L2DecodeInterface: Switch to C2BufferQueueBlockPool · c53b55c4
      Bartłomiej Grzesik authored
      Due to move to Codec 2.0 VNDK 1.2 and implementation of asynchronous
      graphic buffer fetching, there is no need to use C2VdaBqBlockPool.
      Limitation of number of fetched buffers is done by C2SurfaceSyncMemory
      and VideoFramePool. For this reason switching to C2BufferQueueBlockPool.
      
      This moves unblocks a dozen of tests failures on Android T.
      
      Bug: 268301611
      Bug: 268305422
      Bug: 270329448
      Bug: 238710012
      Bug: 238390060
      Bug: 270331759
      Bug: 238709912
      Test: CtsMediaCodecTestCases
      Test: CtsMediaDecoderTestCases
      Test: CtsMediaV2TestCases
      Test: GtsExoPlayerTestCases com.google.android.exoplayer.gts.CommonEncryptionDrmTest#cencSchemeTypeV*
      Change-Id: Ia36a290146860f68c611da4746cd0375225adc99
      c53b55c4
    • Bartłomiej Grzesik's avatar
      VideoFramePool: limit the number of provided buffers · b9a66ded
      Bartłomiej Grzesik authored
      This CL moves limitation logic from C2VdaPooledBufferPool to
      VideoFramePool. This will allow removal of C2VdaPooledBufferPool.
      
      Bug: 268301611
      Bug: 268305422
      Bug: 270329448
      Bug: 238710012
      Bug: 238390060
      Bug: 270331759
      Bug: 238709912
      Test: CtsMediaCodecTestCases
      Test: CtsMediaDecoderTestCases
      Test: CtsMediaV2TestCases
      Test: GtsExoPlayerTestCases com.google.android.exoplayer.gts.CommonEncryptionDrmTest#cencSchemeTypeV*
      Change-Id: I78abfdbcda6f9b3de2a6d5bcfd705a7028490f9b
      b9a66ded
    • Bartłomiej Grzesik's avatar
      VideoFramePool: implement asynchronous frame fetching · cb4034b1
      Bartłomiej Grzesik authored
      This CL adds asynchronous frame fetching to VideoFramePool that relies
      on new API introduced in Codec 2.0. When a buffer is not available the
      new version of fetchGraphicBlock returns a C2_BLOCKING together fence
      that will be signaled once the call should be retried.
      
      Bug: 268301611
      Bug: 268305422
      Bug: 270329448
      Bug: 238710012
      Bug: 238390060
      Bug: 270331759
      Bug: 238709912
      Test: CtsMediaCodecTestCases
      Test: CtsMediaDecoderTestCases
      Test: CtsMediaV2TestCases
      Test: GtsExoPlayerTestCases com.google.android.exoplayer.gts.CommonEncryptionDrmTest#cencSchemeTypeV*
      Change-Id: Id470113e2037ec2c69ed1ccbf2fe15a4facf80ce
      cb4034b1
  23. Mar 07, 2023
    • Bartłomiej Grzesik's avatar
      service: Uprev Codec 2.0 VNDK to 1.2 · d1454490
      Bartłomiej Grzesik authored
      This CL uprevs Codec 2.0 VNDK version 1.2 to take advantage of
      asynchronous graphic buffer fetching from buffer queue in following
      patches.
      
      Bug: 268301611
      Bug: 268305422
      Bug: 270329448
      Bug: 238710012
      Bug: 238390060
      Bug: 270331759
      Bug: 238709912
      Test: CtsMediaCodecTestCases
      Test: CtsMediaDecoderTestCases
      Test: CtsMediaV2TestCases
      Test: GtsExoPlayerTestCases com.google.android.exoplayer.gts.CommonEncryptionDrmTest#cencSchemeTypeV*
      Change-Id: Icad6d78c3f36d365749af787f2b3bab3edc54d3e
      d1454490
Loading