diff options
author | Minghai Shang <minghai@google.com> | 2014-07-22 10:05:40 -0700 |
---|---|---|
committer | Minghai Shang <minghai@google.com> | 2014-07-22 11:11:55 -0700 |
commit | 24c9d6ad43e41edd7441bcf41c860d8cae9b88be (patch) | |
tree | 718c75f83e221fb2d38c2e0b3ba6c3e30b4dacb7 /vp9/vp9_cx_iface.c | |
parent | 97ccebac8f0052053a3832295f7a5f67c58c3773 (diff) | |
download | libvpx-24c9d6ad43e41edd7441bcf41c860d8cae9b88be.tar libvpx-24c9d6ad43e41edd7441bcf41c860d8cae9b88be.tar.gz libvpx-24c9d6ad43e41edd7441bcf41c860d8cae9b88be.tar.bz2 libvpx-24c9d6ad43e41edd7441bcf41c860d8cae9b88be.zip |
[spatial svc]Use #if instead of #ifdef on macro CONFIG_SPATIAL_SVC
Change-Id: Ifc94377a0d05d66e3d21b007893a985b66db6082
Diffstat (limited to 'vp9/vp9_cx_iface.c')
-rw-r--r-- | vp9/vp9_cx_iface.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/vp9/vp9_cx_iface.c b/vp9/vp9_cx_iface.c index 2522fd06d..b3dc0b11a 100644 --- a/vp9/vp9_cx_iface.c +++ b/vp9/vp9_cx_iface.c @@ -176,7 +176,7 @@ static vpx_codec_err_t validate_config(vpx_codec_alg_priv_t *ctx, RANGE_CHECK(cfg, ss_number_layers, 1, VPX_SS_MAX_LAYERS); -#ifdef CONFIG_SPATIAL_SVC +#if CONFIG_SPATIAL_SVC if (cfg->ss_number_layers > 1) { unsigned int i, alt_ref_sum = 0; for (i = 0; i < cfg->ss_number_layers; ++i) { @@ -403,7 +403,7 @@ static vpx_codec_err_t set_encoder_config( int i; for (i = 0; i < VPX_SS_MAX_LAYERS; ++i) { oxcf->ss_target_bitrate[i] = 1000 * cfg->ss_target_bitrate[i]; -#ifdef CONFIG_SPATIAL_SVC +#if CONFIG_SPATIAL_SVC oxcf->ss_play_alternate[i] = cfg->ss_enable_auto_alt_ref[i]; #endif } @@ -888,14 +888,14 @@ static vpx_codec_err_t encoder_encode(vpx_codec_alg_priv_t *ctx, vpx_codec_cx_pkt_t pkt; VP9_COMP *const cpi = (VP9_COMP *)ctx->cpi; -#ifdef CONFIG_SPATIAL_SVC +#if CONFIG_SPATIAL_SVC if (cpi->use_svc && cpi->svc.number_temporal_layers == 1) cpi->svc.layer_context[cpi->svc.spatial_layer_id].layer_size += size; #endif // Pack invisible frames with the next visible frame if (cpi->common.show_frame == 0 -#ifdef CONFIG_SPATIAL_SVC +#if CONFIG_SPATIAL_SVC || (cpi->use_svc && cpi->svc.number_temporal_layers == 1 && cpi->svc.spatial_layer_id < cpi->svc.number_spatial_layers - 1) #endif @@ -923,7 +923,7 @@ static vpx_codec_err_t encoder_encode(vpx_codec_alg_priv_t *ctx, pkt.data.frame.flags = lib_flags << 16; if (lib_flags & FRAMEFLAGS_KEY -#ifdef CONFIG_SPATIAL_SVC +#if CONFIG_SPATIAL_SVC || (cpi->use_svc && cpi->svc.number_temporal_layers == 1 && cpi->svc.layer_context[0].is_key_frame) #endif @@ -965,7 +965,7 @@ static vpx_codec_err_t encoder_encode(vpx_codec_alg_priv_t *ctx, vpx_codec_pkt_list_add(&ctx->pkt_list.head, &pkt); cx_data += size; cx_data_sz -= size; -#ifdef CONFIG_SPATIAL_SVC +#if CONFIG_SPATIAL_SVC if (cpi->use_svc && cpi->svc.number_temporal_layers == 1) { vpx_codec_cx_pkt_t pkt = {0}; int i; @@ -1287,7 +1287,7 @@ static vpx_codec_enc_cfg_map_t encoder_usage_cfg_map[] = { 9999, // kf_max_dist VPX_SS_DEFAULT_LAYERS, // ss_number_layers -#ifdef CONFIG_SPATIAL_SVC +#if CONFIG_SPATIAL_SVC {0}, #endif {0}, // ss_target_bitrate |