From 6726bca33cb581a5b2efe7bfe32d47520f615bea Mon Sep 17 00:00:00 2001 From: Diego Biurrun Date: Thu, 12 May 2016 12:23:43 +0200 Subject: cfhd: cosmetics: Uppercase hex values cfhd: Print all debug hex values as uppercase hex --- libavcodec/cfhd.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/libavcodec/cfhd.c b/libavcodec/cfhd.c index 23f9cddaa9..49ce1b250f 100644 --- a/libavcodec/cfhd.c +++ b/libavcodec/cfhd.c @@ -259,7 +259,7 @@ static int parse_header_tag(AVCodecContext *avctx, CFHDContext *s, uint16_t tag2 = bytestream2_get_be16(gb); uint16_t val2 = bytestream2_get_be16(gb); av_log(avctx, AV_LOG_DEBUG, - "Tag/Value = %"PRIx16" %"PRIx16"\n", tag2, val2); + "Tag/Value = %"PRIX16" %"PRIX16"\n", tag2, val2); } break; } @@ -387,12 +387,12 @@ static int parse_header_tag(AVCodecContext *avctx, CFHDContext *s, s->prescale_shift[0] = (data >> 0) & 0x7; s->prescale_shift[1] = (data >> 3) & 0x7; s->prescale_shift[2] = (data >> 6) & 0x7; - av_log(avctx, AV_LOG_DEBUG, "Prescale shift (VC-5): %"PRIx16"\n", + av_log(avctx, AV_LOG_DEBUG, "Prescale shift (VC-5): %"PRIX16"\n", data); break; default: av_log(avctx, AV_LOG_DEBUG, - "Unknown header tag %"PRId16" data %"PRIx16"\n", tag, data); + "Unknown header tag %"PRId16" data %"PRIX16"\n", tag, data); } return 0; @@ -463,7 +463,7 @@ static int parse_subband_tag(AVCodecContext *avctx, CFHDContext *s, int16_t tag, break; default: av_log(avctx, AV_LOG_DEBUG, - "Unknown subband tag %"PRId16" data %"PRIx16"\n", tag, data); + "Unknown subband tag %"PRId16" data %"PRIX16"\n", tag, data); } return 0; @@ -712,10 +712,10 @@ static int cfhd_decode(AVCodecContext *avctx, void *data, int *got_frame, int8_t abs_tag8 = abs(tag8); uint16_t data = bytestream2_get_be16(&gb); - if (abs_tag8 >= 0x60 && abs_tag8 <= 0x6f) { - av_log(avctx, AV_LOG_DEBUG, "large len %"PRIx16"\n", - ((tagu & 0xff) << 16) | data); - } else if (abstag >= 0x4000 && abstag <= 0x40ff) { + if (abs_tag8 >= 0x60 && abs_tag8 <= 0x6F) { + av_log(avctx, AV_LOG_DEBUG, "large len %"PRIX16"\n", + ((tagu & 0xFF) << 16) | data); + } else if (abstag >= 0x4000 && abstag <= 0x40FF) { av_log(avctx, AV_LOG_DEBUG, "Small chunk length %"PRIu16" %s\n", data * 4, tag < 0 ? "optional" : "required"); bytestream2_skipu(&gb, data * 4); @@ -723,7 +723,7 @@ static int cfhd_decode(AVCodecContext *avctx, void *data, int *got_frame, break; /* Some kind of end of header tag */ - if (tag == 4 && data == 0x1a4a && s->coded_width && s->coded_height && + if (tag == 4 && data == 0x1A4A && s->coded_width && s->coded_height && s->coded_format != AV_PIX_FMT_NONE) { if (s->a_width != s->coded_width || s->a_height != s->coded_height || s->a_format != s->coded_format) { @@ -748,7 +748,7 @@ static int cfhd_decode(AVCodecContext *avctx, void *data, int *got_frame, break; if (s->a_width && s->a_height) { - if (tag == 4 && data == 0xf0f) { + if (tag == 4 && data == 0x0F0F) { if ((ret = read_lowpass_coeffs(avctx, s, &gb, coeff_data)) < 0) return ret; } else if (tag == 55 && s->subband_num_actual != 255) { -- cgit v1.2.3