Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1bfabb36 authored by Lajos Molnar's avatar Lajos Molnar Committed by Android (Google) Code Review
Browse files

Merge "Codec2: C2Block2D rework"

parents bd60b955 fc4d67d6
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -106,6 +106,10 @@ cc_library_shared {
        "VideoFrameScheduler.cpp",
    ],

    header_libs: [
        "libstagefright_codec2_internal",
    ],

    shared_libs: [
        "libaudioutils",
        "libbinder",
+4 −2
Original line number Diff line number Diff line
@@ -23,6 +23,7 @@

#include <C2AllocatorGralloc.h>
#include <C2PlatformSupport.h>
#include <C2BlockInternal.h>

#include <android/hardware/cas/native/1.0/IDescrambler.h>
#include <binder/MemoryDealer.h>
@@ -819,7 +820,7 @@ public:
        std::shared_ptr<C2Allocator> allocator = mAllocator.lock();
        if (!allocator) {
            c2_status_t err = GetCodec2PlatformAllocatorStore()->fetchAllocator(
                    C2AllocatorStore::PLATFORM_START + 1,  // GRALLOC
                    C2PlatformAllocatorStore::GRALLOC,
                    &allocator);
            if (err != OK) {
                return UNKNOWN_ERROR;
@@ -835,7 +836,8 @@ public:
        if (err != OK) {
            return UNKNOWN_ERROR;
        }
        std::shared_ptr<C2GraphicBlock> block(new GraphicBlock(alloc));

        std::shared_ptr<C2GraphicBlock> block = _C2BlockFactory::CreateGraphicBlock(alloc);

        std::unique_ptr<C2Work> work(new C2Work);
        work->input.flags = (C2FrameData::flags_t)0;
+12 −0
Original line number Diff line number Diff line
@@ -534,6 +534,18 @@ constexpr typename c2_types<T, U, V...>::min_type c2_min(const T a, const U b, c
    });
}

/**
 *  \ingroup utils_internal
 */
template<typename T, typename U, typename V>
inline constexpr typename c2_types<T, V>::wide_type c2_clamp(const T a, const U b, const V c) {
    typedef typename c2_types<T, U, V>::wide_type wide_type;
    return ({
        wide_type a_(a), b_(b), c_(c);
        static_cast<typename c2_types<T, V>::wide_type>(b_ < a_ ? a_ : b_ > c_ ? c_ : b_);
    });
}

/// @}

#ifdef __ANDROID__
+239 −128

File changed.

Preview size limit exceeded, changes collapsed.

+211 −0

File changed.

Preview size limit exceeded, changes collapsed.

Loading