On Mon, Nov 9, 2015 at 7:24 AM, Anton Khirnov <[email protected]> wrote: > Quoting Hendrik Leppkes (2015-11-08 16:45:25) >> On Sun, Nov 8, 2015 at 3:31 PM, Anton Khirnov <[email protected]> wrote: >> > --- >> > libavcodec/qsvenc.c | 117 >> > ++++++++++++++++++++++++++++++++++++++++++++-------- >> > libavcodec/qsvenc.h | 9 +++- >> > 2 files changed, 108 insertions(+), 18 deletions(-) >> > >> > diff --git a/libavcodec/qsvenc.c b/libavcodec/qsvenc.c >> > index 7e5c11e..4a44b53 100644 >> > --- a/libavcodec/qsvenc.c >> > +++ b/libavcodec/qsvenc.c >> > @@ -266,10 +266,81 @@ static void dump_video_param(AVCodecContext *avctx, >> > QSVEncContext *q, >> > } >> > } >> > >> > -static int init_video_param(AVCodecContext *avctx, QSVEncContext *q) >> > +static int select_rc_mode(AVCodecContext *avctx, QSVEncContext *q) >> > { >> > - const char *ratecontrol_desc; >> > + const char *rc_desc; >> > + mfxU16 rc_mode; >> > + >> > + int want_la = q->la_depth >= 0; >> > + int want_qscale = !!(avctx->flags & AV_CODEC_FLAG_QSCALE); >> > + int want_vcm = q->vcm; >> > + >> > + if (want_la && !QSV_HAVE_LA) { >> > + av_log(avctx, AV_LOG_ERROR, >> > + "Lookahead ratecontrol mode requested, but is not >> > supported by this SDK version\n"); >> > + return AVERROR(ENOSYS); >> > + } >> > + if (want_vcm && !QSV_HAVE_VCM) { >> > + av_log(avctx, AV_LOG_ERROR, >> > + "VCM ratecontrol mode requested, but is not supported by >> > this SDK version\n"); >> > + return AVERROR(ENOSYS); >> > + } >> >> If you want to do these checks properly, you should also check the >> runtime library version. > > I'm not sure it's worth the extra work. It will just fail later anyway. >
Sure, but without telling you why it failed. _______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
