Reconfigure quality for av1 and hevc vaapi
This commit is contained in:
parent
8e66363352
commit
1260598e9e
14
src/main.cpp
14
src/main.cpp
@ -393,13 +393,13 @@ static AVCodecContext *create_video_codec_context(AVPixelFormat pix_fmt,
|
|||||||
codec_context->global_quality = 180;
|
codec_context->global_quality = 180;
|
||||||
break;
|
break;
|
||||||
case VideoQuality::HIGH:
|
case VideoQuality::HIGH:
|
||||||
codec_context->global_quality = 120;
|
codec_context->global_quality = 140;
|
||||||
break;
|
break;
|
||||||
case VideoQuality::VERY_HIGH:
|
case VideoQuality::VERY_HIGH:
|
||||||
codec_context->global_quality = 100;
|
codec_context->global_quality = 120;
|
||||||
break;
|
break;
|
||||||
case VideoQuality::ULTRA:
|
case VideoQuality::ULTRA:
|
||||||
codec_context->global_quality = 70;
|
codec_context->global_quality = 100;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -720,16 +720,16 @@ static void open_video(AVCodecContext *codec_context, VideoQuality video_quality
|
|||||||
} else {
|
} else {
|
||||||
switch(video_quality) {
|
switch(video_quality) {
|
||||||
case VideoQuality::MEDIUM:
|
case VideoQuality::MEDIUM:
|
||||||
av_dict_set_int(&options, "qp", 40, 0);
|
av_dict_set_int(&options, "qp", 36, 0);
|
||||||
break;
|
break;
|
||||||
case VideoQuality::HIGH:
|
case VideoQuality::HIGH:
|
||||||
av_dict_set_int(&options, "qp", 35, 0);
|
av_dict_set_int(&options, "qp", 32, 0);
|
||||||
break;
|
break;
|
||||||
case VideoQuality::VERY_HIGH:
|
case VideoQuality::VERY_HIGH:
|
||||||
av_dict_set_int(&options, "qp", 30, 0);
|
av_dict_set_int(&options, "qp", 28, 0);
|
||||||
break;
|
break;
|
||||||
case VideoQuality::ULTRA:
|
case VideoQuality::ULTRA:
|
||||||
av_dict_set_int(&options, "qp", 24, 0);
|
av_dict_set_int(&options, "qp", 22, 0);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user