class InferenceEngine::I420Blob

Overview

Represents a blob that contains three planes (Y,U and V) in I420 color format. More…

#include <ie_compound_blob.h>

class I420Blob: public InferenceEngine::CompoundBlob
{
public:
    // typedefs

    typedef std::shared_ptr<I420Blob> Ptr;
    typedef std::shared_ptr<const I420Blob> CPtr;

    // construction

    I420Blob(const Blob::Ptr& y, const Blob::Ptr& u, const Blob::Ptr& v);
    I420Blob(Blob::Ptr&& y, Blob::Ptr&& u, Blob::Ptr&& v);

    // methods

    Blob::Ptr& y();
    const Blob::Ptr& y() const;
    Blob::Ptr& u();
    const Blob::Ptr& u() const;
    Blob::Ptr& v();
    const Blob::Ptr& v() const;
    virtual Blob::Ptr createROI(const ROI& roi) const;
};

Inherited Members

public:
    // typedefs

    typedef std::shared_ptr<Blob> Ptr;
    typedef std::shared_ptr<const Blob> CPtr;
    typedef std::shared_ptr<CompoundBlob> Ptr;
    typedef std::shared_ptr<const CompoundBlob> CPtr;

    // methods

    static Ptr CreateFromData(const DataPtr& data);

    template <
        typename T,
        typename std::enable_if<!std::is_pointer<T>::value&&!std::is_reference<T>::value, int>::type = 0,
        typename std::enable_if<std::is_base_of<Blob, T>::value, int>::type = 0
        >
    bool is();

    template <
        typename T,
        typename std::enable_if<!std::is_pointer<T>::value&&!std::is_reference<T>::value, int>::type = 0,
        typename std::enable_if<std::is_base_of<Blob, T>::value, int>::type = 0
        >
    bool is() const;

    template <
        typename T,
        typename std::enable_if<!std::is_pointer<T>::value&&!std::is_reference<T>::value, int>::type = 0,
        typename std::enable_if<std::is_base_of<Blob, T>::value, int>::type = 0
        >
    T \* as();

    template <
        typename T,
        typename std::enable_if<!std::is_pointer<T>::value&&!std::is_reference<T>::value, int>::type = 0,
        typename std::enable_if<std::is_base_of<Blob, T>::value, int>::type = 0
        >
    const T \* as() const;

    virtual const TensorDesc& getTensorDesc() const;
    virtual TensorDesc& getTensorDesc();
    virtual size_t size() const;
    virtual size_t byteSize() const;
    virtual size_t element_size() const = 0;
    virtual void allocate() = 0;
    virtual bool deallocate() = 0;
    void setShape(const SizeVector& dims);
    virtual Blob::Ptr createROI(const ROI& roi) const;

    virtual Blob::Ptr createROI(
        const std::vector<std::size_t>& begin,
        const std::vector<std::size_t>& end
        ) const;

    virtual size_t byteSize() const;
    virtual size_t element_size() const;
    virtual void allocate();
    virtual bool deallocate();
    virtual size_t size() const;
    virtual Blob::Ptr getBlob(size_t i) const;
    virtual Blob::Ptr createROI(const ROI& roi) const;

Detailed Documentation

Represents a blob that contains three planes (Y,U and V) in I420 color format.

Typedefs

typedef std::shared_ptr<I420Blob> Ptr

A smart pointer to the I420Blob object.

typedef std::shared_ptr<const I420Blob> CPtr

A smart pointer to the const I420Blob object.

Construction

I420Blob(const Blob::Ptr& y, const Blob::Ptr& u, const Blob::Ptr& v)

Constructs I420 blob from three planes Y, U and V.

Parameters:

y

Blob object that represents Y plane in I420 color format

u

Blob object that represents U plane in I420 color format

v

Blob object that represents V plane in I420 color format

I420Blob(Blob::Ptr&& y, Blob::Ptr&& u, Blob::Ptr&& v)

Constructs I420 blob from three planes Y, U and V.

Parameters:

y

Blob object that represents Y plane in I420 color format

u

Blob object that represents U plane in I420 color format

v

Blob object that represents V plane in I420 color format

Methods

Returns a reference to shared pointer to Y plane.

Please note that reference to Blob::Ptr is returned. I.e. the reference will be valid until the I420Blob object is destroyed.

Returns:

reference to shared pointer object of Y plane

const Blob::Ptr& y() const

Returns a constant reference to shared pointer to Y plane.

Please note that reference to Blob::Ptr is returned. I.e. the reference will be valid until the I420Blob object is destroyed.

Returns:

constant reference to shared pointer object of Y plane*

Returns a reference to shared pointer to U plane.

Please note that reference to Blob::Ptr is returned. I.e. the reference will be valid until the I420Blob object is destroyed.

Returns:

reference to shared pointer object of U plane

const Blob::Ptr& u() const

Returns a constant reference to shared pointer to U plane.

Please note that reference to Blob::Ptr is returned. I.e. the reference will be valid until the I420Blob object is destroyed.

Returns:

constant reference to shared pointer object of U plane

Returns a reference to shared pointer to V plane.

Please note that reference to Blob::Ptr is returned. I.e. the reference will be valid until the I420Blob object is destroyed.

Returns:

reference to shared pointer object of V plane

const Blob::Ptr& v() const

Returns a constant reference to shared pointer to V plane.

Please note that reference to Blob::Ptr is returned. I.e. the reference will be valid until the I420Blob object is destroyed.

Returns:

constant reference to shared pointer object of V plane

virtual Blob::Ptr createROI(const ROI& roi) const

Creates a blob describing given ROI object based on the current blob with memory sharing.

Note: default implementation throws “not implemented” exception.

Parameters:

roi

A ROI object inside of the current blob.

Returns:

A shared pointer to the newly created ROI blob.