1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

Merge remote-tracking branch 'qatar/master'

* qatar/master:
  libx264: do not set pic quality if no frame is output
  libx264: add preset, tune, profile and fastfirstpass private options

Conflicts:
	libavcodec/libx264.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2011-08-08 23:35:22 +02:00
commit 9a5f61ac62

View File

@ -305,8 +305,10 @@ static av_cold int X264_init(AVCodecContext *avctx)
check_default_settings(avctx);
if (x4->preset || x4->tune) {
if (x264_param_default_preset(&x4->params, x4->preset, x4->tune) < 0)
return -1;
if (x264_param_default_preset(&x4->params, x4->preset, x4->tune) < 0) {
av_log(avctx, AV_LOG_ERROR, "Error setting preset/tune %s/%s.\n", x4->preset, x4->tune);
return AVERROR(EINVAL);
}
}
x4->params.pf_log = X264_log;
@ -363,8 +365,10 @@ static av_cold int X264_init(AVCodecContext *avctx)
x264_param_apply_fastfirstpass(&x4->params);
if (x4->profile)
if (x264_param_apply_profile(&x4->params, x4->profile) < 0)
return -1;
if (x264_param_apply_profile(&x4->params, x4->profile) < 0) {
av_log(avctx, AV_LOG_ERROR, "Error setting profile %s.\n", x4->profile);
return AVERROR(EINVAL);
}
x4->params.i_width = avctx->width;
x4->params.i_height = avctx->height;
@ -435,7 +439,12 @@ static const AVOption options[] = {
{ NULL },
};
static const AVClass class = { "libx264", av_default_item_name, options, LIBAVUTIL_VERSION_INT };
static const AVClass class = {
.class_name = "libx264",
.item_name = av_default_item_name,
.option = options,
.version = LIBAVUTIL_VERSION_INT,
};
AVCodec ff_libx264_encoder = {
.name = "libx264",