Skip to content

Exposing functions for creating and copying oapv_imgb objects #143

@dkozinski

Description

@dkozinski

There is a need to add/expose functions to the public API of the liboapv library that facilitate the use of oapv_imgb_t objects.
Specifically, these are functions for creating and copying oapv_imgb_t objects.

oapv_imgb_t *oapv_imgb_create(int w, int h, int cs);
void oapv_imgb_cpy(oapv_imgb_t *dst, oapv_imgb_t *src);

This will simplify the use of the opav API in client applications or projects using liboapv, such as ffmpeg.

After the creation of PR 20133 in the ffmpeg project repository ( https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/20133 ), which contains an implementation of the liboapvdec.c wrapper for opav decoder, the argument was raised that the liboapv implementation is large, comparable to the native implementation. "The size of the wrapper is nearly as large as our native decoder."

This is largely due to the fact that a large part of the liboapvdec.c implementation consists of functions related to creating and copying the oapv_imgb_t object.

FFmpeg opav decoder wrapper (liboapvdec.c) contains implementations of the following functions: apv_imgb_create(..), apv_imgb_cpy(..), apv_imgb_cpy_shift_left(), apv_imgb_cpy_shift_right_8b(), apv_imgb_cpy_shift_left_8b(), apv_imgb_cpy_plane(), apv_imgb_getref(), apv_imgb_addref()

Moving them to the liboapv library would significantly reduce the amount of wrapper code in ffmpeg.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions