summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHyunjun Ko <zzoon@igalia.com>2017-05-31 12:36:17 +0900
committerVíctor Manuel Jáquez Leal <vjaquez@igalia.com>2017-06-13 13:39:19 +0200
commit3dce250236c06e6a078ff04a840be2482c6f6d43 (patch)
tree2595346ad1c93292f7dc563b9159382afa7d7d59
parentbd0209228bfb47c25631cc25459ac226ecc174f4 (diff)
libs: encoder: h264: changes raw number of profile to macro name of its
Changes raw number of profile to macro name of its to improve readability. https://bugzilla.gnome.org/show_bug.cgi?id=757941
-rw-r--r--gst-libs/gst/vaapi/gstvaapiencoder_h264.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/gst-libs/gst/vaapi/gstvaapiencoder_h264.c b/gst-libs/gst/vaapi/gstvaapiencoder_h264.c
index fb3dab92..969f2fdd 100644
--- a/gst-libs/gst/vaapi/gstvaapiencoder_h264.c
+++ b/gst-libs/gst/vaapi/gstvaapiencoder_h264.c
@@ -1050,13 +1050,13 @@ ensure_profile_limits (GstVaapiEncoderH264 * encoder)
profile = GST_VAAPI_PROFILE_UNKNOWN;
/* Try Main profile coding tools */
- if (encoder->max_profile_idc < 100) {
+ if (encoder->max_profile_idc < GST_H264_PROFILE_HIGH) {
encoder->use_dct8x8 = FALSE;
profile = GST_VAAPI_PROFILE_H264_MAIN;
}
/* Try Constrained Baseline profile coding tools */
- if (encoder->max_profile_idc < 77) {
+ if (encoder->max_profile_idc < GST_H264_PROFILE_MAIN) {
encoder->num_bframes = 0;
encoder->use_cabac = FALSE;
profile = GST_VAAPI_PROFILE_H264_CONSTRAINED_BASELINE;
@@ -1151,14 +1151,15 @@ ensure_tuning_high_compression (GstVaapiEncoderH264 * encoder)
profile_idc = encoder->max_profile_idc;
/* Tuning options to enable Main profile */
- if (profile_idc >= 77 && profile_idc != 88) {
+ if (profile_idc >= GST_H264_PROFILE_MAIN
+ && profile_idc != GST_H264_PROFILE_EXTENDED) {
encoder->use_cabac = TRUE;
if (!encoder->num_bframes)
encoder->num_bframes = 1;
}
/* Tuning options to enable High profile */
- if (profile_idc >= 100) {
+ if (profile_idc >= GST_H264_PROFILE_HIGH) {
encoder->use_dct8x8 = TRUE;
}
return TRUE;