Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions libavcodec/vaapi_hevc.c
Original file line number Diff line number Diff line change
Expand Up @@ -613,6 +613,13 @@ VAProfile ff_vaapi_parse_hevc_rext_scc_profile(AVCodecContext *avctx)
av_log(avctx, AV_LOG_VERBOSE, "HEVC profile %s is found.\n", profile->name);
}

#if VA_CHECK_VERSION(0, 37, 0)
if (!strcmp(profile->name, "Main Intra"))
return VAProfileHEVCMain;
else if (!strcmp(profile->name, "Main 10 Intra"))
return VAProfileHEVCMain10;
#endif

#if VA_CHECK_VERSION(1, 2, 0)
if (!strcmp(profile->name, "Main 12") ||
!strcmp(profile->name, "Main 12 Intra"))
Expand Down
23 changes: 12 additions & 11 deletions libavfilter/qsvvpp.c
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,8 @@ static QSVFrame *submit_frame(QSVVPPContext *s, AVFilterLink *inlink, AVFrame *p
}

/* get the output surface */
static QSVFrame *query_frame(QSVVPPContext *s, AVFilterLink *outlink, const AVFrame *in)
static QSVFrame *query_frame(QSVVPPContext *s, AVFilterLink *outlink, const AVFrame *in,
const AVFrame *propref)
{
FilterLink *l = ff_filter_link(outlink);
AVFilterContext *ctx = outlink->src;
Expand Down Expand Up @@ -513,6 +514,15 @@ static QSVFrame *query_frame(QSVVPPContext *s, AVFilterLink *outlink, const AVFr
return NULL;
}

if (propref) {
ret = av_frame_copy_props(out_frame->frame, propref);
if (ret < 0) {
av_frame_free(&out_frame->frame);
av_log(ctx, AV_LOG_ERROR, "Failed to copy metadata fields from src to dst.\n");
return NULL;
}
}

if (l->frame_rate.num && l->frame_rate.den)
out_frame->frame->duration = av_rescale_q(1, av_inv_q(l->frame_rate), outlink->time_base);
else
Expand Down Expand Up @@ -985,7 +995,7 @@ int ff_qsvvpp_filter_frame(QSVVPPContext *s, AVFilterLink *inlink, AVFrame *picr
}

do {
out_frame = query_frame(s, outlink, in_frame->frame);
out_frame = query_frame(s, outlink, in_frame->frame, propref);
if (!out_frame) {
av_log(ctx, AV_LOG_ERROR, "Failed to query an output frame.\n");
return AVERROR(ENOMEM);
Expand All @@ -1009,15 +1019,6 @@ int ff_qsvvpp_filter_frame(QSVVPPContext *s, AVFilterLink *inlink, AVFrame *picr
break;
}

if (propref) {
ret1 = av_frame_copy_props(out_frame->frame, propref);
if (ret1 < 0) {
av_frame_free(&out_frame->frame);
av_log(ctx, AV_LOG_ERROR, "Failed to copy metadata fields from src to dst.\n");
return ret1;
}
}

out_frame->frame->pts = av_rescale_q(out_frame->surface.Data.TimeStamp,
default_tb, outlink->time_base);

Expand Down
Loading