-
Notifications
You must be signed in to change notification settings - Fork 27
Description
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.