Skip to content

Commit

Permalink
vpx_encoder.h: make flag constants unsigned
Browse files Browse the repository at this point in the history
this matches the type for vpx_codec_frame_flags_t and
vpx_codec_er_flags_t and quiets int sanitizer warnings of the form:

implicit conversion from type 'int' of value -9 (32-bit, signed) to type
'unsigned int' changed the value to 4294967287 (32-bit, unsigned)

Bug: b/229626362
Change-Id: Icfc5993250f37cedb300c7032cab28ce4bec1f86
  • Loading branch information
jzern committed Aug 17, 2022
1 parent a76a022 commit 9db0ec6
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions vpx/vpx_encoder.h
Original file line number Diff line number Diff line change
Expand Up @@ -115,14 +115,14 @@ typedef int64_t vpx_codec_pts_t;
* support frame types that are codec specific (MPEG-1 D-frames for example)
*/
typedef uint32_t vpx_codec_frame_flags_t;
#define VPX_FRAME_IS_KEY 0x1 /**< frame is the start of a GOP */
#define VPX_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 VPX_FRAME_IS_DROPPABLE 0x2
#define VPX_FRAME_IS_DROPPABLE 0x2u
/*!\brief frame should be decoded but will not be shown */
#define VPX_FRAME_IS_INVISIBLE 0x4
#define VPX_FRAME_IS_INVISIBLE 0x4u
/*!\brief this is a fragment of the encoded frame */
#define VPX_FRAME_IS_FRAGMENT 0x8
#define VPX_FRAME_IS_FRAGMENT 0x8u

/*!\brief Error Resilient flags
*
Expand All @@ -132,12 +132,12 @@ typedef uint32_t vpx_codec_frame_flags_t;
*/
typedef uint32_t vpx_codec_er_flags_t;
/*!\brief Improve resiliency against losses of whole frames */
#define VPX_ERROR_RESILIENT_DEFAULT 0x1
#define VPX_ERROR_RESILIENT_DEFAULT 0x1u
/*!\brief The frame partitions are independently decodable by the bool decoder,
* meaning that partitions can be decoded even though earlier partitions have
* been lost. Note that intra prediction is still done over the partition
* boundary. */
#define VPX_ERROR_RESILIENT_PARTITIONS 0x2
#define VPX_ERROR_RESILIENT_PARTITIONS 0x2u

/*!\brief Encoder output packet variants
*
Expand Down

0 comments on commit 9db0ec6

Please sign in to comment.