This is an automatic generated email to let you know that the following patch were queued at the http://git.linuxtv.org/v4l-utils.git tree:
Subject: libv4lconvert: fix setting/testing of supported_src_formats Author: Hans Verkuil <[email protected]> Date: Wed Jun 6 01:26:35 2012 +0200 data->supported_src_formats is a uint64_t. This code: data->supported_src_formats & (1 << i) does not work since (1 << i) is a 32-bit value. It should be (1ULL << i) instead. Interesting fact: on a 64-bit intel box (1 << 33) does a rotate, not a shift. So (1 << 33) == 2. On a 32-bit powerpc platform it is a proper shift, so (1 << 33) == 0. Signed-off-by: Hans Verkuil <[email protected]> lib/libv4lconvert/libv4lconvert.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) --- http://git.linuxtv.org/v4l-utils.git?a=commitdiff;h=5a271260e4349a11044a8f47d32bf35fd19b2903 diff --git a/lib/libv4lconvert/libv4lconvert.c b/lib/libv4lconvert/libv4lconvert.c index 4223ce6..e196641 100644 --- a/lib/libv4lconvert/libv4lconvert.c +++ b/lib/libv4lconvert/libv4lconvert.c @@ -146,7 +146,7 @@ struct v4lconvert_data *v4lconvert_create(int fd, void *dev_ops_priv, break; if (j < ARRAY_SIZE(supported_src_pixfmts)) { - data->supported_src_formats |= 1 << j; + data->supported_src_formats |= 1ULL << j; v4lconvert_get_framesizes(data, fmt.pixelformat, j); if (!supported_src_pixfmts[j].needs_conversion) always_needs_conversion = 0; @@ -245,7 +245,7 @@ int v4lconvert_enum_fmt(struct v4lconvert_data *data, struct v4l2_fmtdesc *fmt) for (i = 0; i < ARRAY_SIZE(supported_dst_pixfmts); i++) if (v4lconvert_supported_dst_fmt_only(data) || - !(data->supported_src_formats & (1 << i))) { + !(data->supported_src_formats & (1ULL << i))) { faked_fmts[no_faked_fmts] = supported_dst_pixfmts[i].fmt; no_faked_fmts++; } @@ -400,7 +400,7 @@ static int v4lconvert_do_try_format(struct v4lconvert_data *data, for (i = 0; i < ARRAY_SIZE(supported_src_pixfmts); i++) { /* is this format supported? */ - if (!(data->supported_src_formats & (1 << i))) + if (!(data->supported_src_formats & (1ULL << i))) continue; try_fmt = *dest_fmt; _______________________________________________ linuxtv-commits mailing list [email protected] http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits
