aom_codec.h: make flag constants unsigned this matches the type of aom_codec_frame_flags_t; a similar change was made in libvpx: 9db0ec67e vpx_encoder.h: make flag constants unsigned Change-Id: I34a1a1873a7c7c046e2748250ed600e672b96bea
diff --git a/aom/aom_codec.h b/aom/aom_codec.h index d77bae6..6a9fb7b 100644 --- a/aom/aom_codec.h +++ b/aom/aom_codec.h
@@ -268,18 +268,18 @@ * support frame types that are codec specific (MPEG-1 D-frames for example) */ typedef uint32_t aom_codec_frame_flags_t; -#define AOM_FRAME_IS_KEY 0x1 /**< frame is the start of a GOP */ +#define AOM_FRAME_IS_KEY 0x1u /**< frame is the start of a GOP */ /*!\brief frame can be dropped without affecting the stream (no future frame * depends on this one) */ -#define AOM_FRAME_IS_DROPPABLE 0x2 +#define AOM_FRAME_IS_DROPPABLE 0x2u /*!\brief this is an INTRA_ONLY frame */ -#define AOM_FRAME_IS_INTRAONLY 0x10 +#define AOM_FRAME_IS_INTRAONLY 0x10u /*!\brief this is an S-frame */ -#define AOM_FRAME_IS_SWITCH 0x20 +#define AOM_FRAME_IS_SWITCH 0x20u /*!\brief this is an error-resilient frame */ -#define AOM_FRAME_IS_ERROR_RESILIENT 0x40 +#define AOM_FRAME_IS_ERROR_RESILIENT 0x40u /*!\brief this is a key-frame dependent recovery-point frame */ -#define AOM_FRAME_IS_DELAYED_RANDOM_ACCESS_POINT 0x80 +#define AOM_FRAME_IS_DELAYED_RANDOM_ACCESS_POINT 0x80u /*!\brief Iterator *
diff --git a/av1/encoder/thirdpass.c b/av1/encoder/thirdpass.c index a97efe9..a25522f 100644 --- a/av1/encoder/thirdpass.c +++ b/av1/encoder/thirdpass.c
@@ -127,7 +127,7 @@ aom_internal_error(ctx->err_info, AOM_CODEC_ERROR, "Third pass frame info ran out of available slots."); } - int frame_type_flags = 0; + aom_codec_frame_flags_t frame_type_flags = 0; if (aom_codec_control(&ctx->decoder, AOMD_GET_FRAME_FLAGS, &frame_type_flags) != AOM_CODEC_OK) { aom_internal_error(ctx->err_info, AOM_CODEC_ERROR,
diff --git a/test/error_resilience_test.cc b/test/error_resilience_test.cc index 1ef72c8..84330d6 100644 --- a/test/error_resilience_test.cc +++ b/test/error_resilience_test.cc
@@ -154,16 +154,15 @@ AOM_EFLAG_NO_UPD_ARF)) == (AOM_EFLAG_NO_UPD_LAST | AOM_EFLAG_NO_UPD_GF | AOM_EFLAG_NO_UPD_ARF)) { ASSERT_EQ(pkt->data.frame.flags & AOM_FRAME_IS_DROPPABLE, - static_cast<aom_codec_frame_flags_t>(AOM_FRAME_IS_DROPPABLE)); + AOM_FRAME_IS_DROPPABLE); } if (encode_flags & AOM_EFLAG_SET_S_FRAME) { ASSERT_EQ(pkt->data.frame.flags & AOM_FRAME_IS_SWITCH, - static_cast<aom_codec_frame_flags_t>(AOM_FRAME_IS_SWITCH)); + AOM_FRAME_IS_SWITCH); } if (encode_flags & AOM_EFLAG_ERROR_RESILIENT) { - ASSERT_EQ( - pkt->data.frame.flags & AOM_FRAME_IS_ERROR_RESILIENT, - static_cast<aom_codec_frame_flags_t>(AOM_FRAME_IS_ERROR_RESILIENT)); + ASSERT_EQ(pkt->data.frame.flags & AOM_FRAME_IS_ERROR_RESILIENT, + AOM_FRAME_IS_ERROR_RESILIENT); } }
diff --git a/test/kf_test.cc b/test/kf_test.cc index 0cef8db..5daf600 100644 --- a/test/kf_test.cc +++ b/test/kf_test.cc
@@ -84,8 +84,7 @@ is_kf_interval_violated_ = true; } } - if ((frame_flags & AOM_FRAME_IS_KEY) == - static_cast<aom_codec_frame_flags_t>(AOM_FRAME_IS_KEY)) { + if ((frame_flags & AOM_FRAME_IS_KEY) == AOM_FRAME_IS_KEY) { if (kf_dist_ != -1 && kf_dist_ < (int)kf_dist_param_.min_kf_dist) { is_kf_interval_violated_ = true; } @@ -186,8 +185,7 @@ int frame_flags = 0; AOM_CODEC_CONTROL_TYPECHECKED(ctx_dec, AOMD_GET_FRAME_FLAGS, &frame_flags); - if ((frame_flags & AOM_FRAME_IS_KEY) != - static_cast<aom_codec_frame_flags_t>(AOM_FRAME_IS_KEY)) { + if ((frame_flags & AOM_FRAME_IS_KEY) != AOM_FRAME_IS_KEY) { is_kf_placement_violated_ = true; } }