refactor(libvideo2x): convert the video processor into a class (#1246)

Signed-off-by: k4yt3x <i@k4yt3x.com>
This commit is contained in:
K4YT3X
2024-12-03 05:22:07 +00:00
committed by GitHub
parent a379c7481e
commit d4d1e58f8d
16 changed files with 612 additions and 665 deletions

View File

@@ -5,15 +5,18 @@ extern "C" {
#include <libavformat/avformat.h>
}
#define CALC_FFMPEG_VERSION(a, b, c) (a << 16 | b << 8 | c)
AVRational get_video_frame_rate(AVFormatContext *ifmt_ctx, int in_vstream_idx);
int64_t get_video_frame_count(AVFormatContext *ifmt_ctx, int in_vstream_idx);
AVPixelFormat
get_encoder_default_pix_fmt(const AVCodec *encoder, AVPixelFormat target_pix_fmt);
AVPixelFormat get_encoder_default_pix_fmt(const AVCodec *encoder, AVPixelFormat target_pix_fmt);
float get_frame_diff(AVFrame *frame1, AVFrame *frame2);
void av_bufferref_deleter(AVBufferRef *bufferref);
void av_frame_deleter(AVFrame *frame);
void av_packet_deleter(AVPacket *packet);
#endif // AVUTILS_H