AV1 support
This commit is contained in:
@@ -99,11 +99,6 @@ void AvDeleter::operator()(AVCodecContext * x)
|
||||
avcodec_free_context(&x);
|
||||
}
|
||||
|
||||
void AvDeleter::operator()(AVFilterGraph * x)
|
||||
{
|
||||
avfilter_graph_free(&x);
|
||||
}
|
||||
|
||||
void AvDeleter::operator()(AVPacket * x)
|
||||
{
|
||||
av_packet_free(&x);
|
||||
|
||||
@@ -24,7 +24,6 @@
|
||||
#include <vulkan/vulkan_core.h>
|
||||
|
||||
struct AVBufferRef;
|
||||
struct AVFilterGraph;
|
||||
struct AVFrame;
|
||||
struct AVCodecContext;
|
||||
struct AVPacket;
|
||||
@@ -52,15 +51,12 @@ struct AvDeleter
|
||||
void
|
||||
operator()(AVCodecContext *);
|
||||
void
|
||||
operator()(AVFilterGraph *);
|
||||
void
|
||||
operator()(AVPacket *);
|
||||
};
|
||||
|
||||
using av_buffer_ptr = std::unique_ptr<AVBufferRef, AvDeleter>;
|
||||
using av_frame_ptr = std::unique_ptr<AVFrame, AvDeleter>;
|
||||
using av_codec_context_ptr = std::unique_ptr<AVCodecContext, AvDeleter>;
|
||||
using av_filter_graph_ptr = std::unique_ptr<AVFilterGraph, AvDeleter>;
|
||||
using av_packet_ptr = std::unique_ptr<AVPacket, AvDeleter>;
|
||||
|
||||
av_frame_ptr
|
||||
|
||||
@@ -52,6 +52,8 @@ encoder(VideoEncoderFFMPEG::Codec codec)
|
||||
return "h264_vaapi";
|
||||
case VideoEncoderFFMPEG::Codec::h265:
|
||||
return "hevc_vaapi";
|
||||
case VideoEncoderFFMPEG::Codec::av1:
|
||||
return "av1_vaapi";
|
||||
}
|
||||
throw std::runtime_error("invalid codec " + std::to_string(int(codec)));
|
||||
}
|
||||
@@ -192,6 +194,9 @@ video_encoder_va::video_encoder_va(wivrn_vk_bundle & vk, xrt::drivers::wivrn::en
|
||||
case Codec::h265:
|
||||
encoder_ctx->profile = FF_PROFILE_HEVC_MAIN;
|
||||
break;
|
||||
case Codec::av1:
|
||||
encoder_ctx->profile = FF_PROFILE_AV1_MAIN;
|
||||
break;
|
||||
}
|
||||
for (auto option: settings.options)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user