Skip to content

Commit

Permalink
fix : some C formatting and clippy warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
vats004 committed Feb 23, 2025
1 parent b480c8b commit a8ad22b
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/lib_ccx/ccx_encoders_spupng.c
Original file line number Diff line number Diff line change
Expand Up @@ -704,7 +704,15 @@ uint32_t *utf8_to_utf32(char *src)
}

// Convert big-endian and little-endian
<<<<<<< Updated upstream
#define BigtoLittle32(A) ((((uint32_t)(A) & 0xff000000) >> 24) | (((uint32_t)(A) & 0x00ff0000) >> 8) | (((uint32_t)(A) & 0x0000ff00) << 8) | (((uint32_t)(A) & 0x000000ff) << 24))
=======
#define BigtoLittle32(A) ( \
(((uint32_t)(A) & 0xff000000) >> 24) | \
(((uint32_t)(A) & 0x00ff0000) >> 8) | \
(((uint32_t)(A) & 0x0000ff00) << 8) | \
(((uint32_t)(A) & 0x000000ff) << 24))
>>>>>>> Stashed changes

// Generate PNG file from an UTF-8 string (str)
// PNG file will be stored at output
Expand Down
10 changes: 10 additions & 0 deletions src/lib_ccx/dvb_subtitle_decoder.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
#define ONE_HALF (1 << (SCALEBITS - 1))
#define FIX(x) ((int)((x) * (1 << SCALEBITS) + 0.5))

<<<<<<< Updated upstream
#define YUV_TO_RGB1_CCIR(cb1, cr1) \
{ \
cb = (cb1) - 128; \
Expand All @@ -45,6 +46,15 @@
g_add = -FIX(0.34414 * 255.0 / 224.0) * cb - FIX(0.71414 * 255.0 / 224.0) * cr + \
ONE_HALF; \
b_add = FIX(1.77200 * 255.0 / 224.0) * cb + ONE_HALF; \
=======
#define YUV_TO_RGB1_CCIR(cb1, cr1) \
{ \
cb = (cb1) - 128; \
cr = (cr1) - 128; \
r_add = FIX(1.40200 * 255.0 / 224.0) * cr + ONE_HALF; \
g_add = -FIX(0.34414 * 255.0 / 224.0) * cb - FIX(0.71414 * 255.0 / 224.0) * cr + ONE_HALF; \
b_add = FIX(1.77200 * 255.0 / 224.0) * cb + ONE_HALF; \
>>>>>>> Stashed changes
}

#define YUV_TO_RGB2_CCIR(r, g, b, y1) \
Expand Down
5 changes: 5 additions & 0 deletions src/rust/src/decoder/encoding.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,13 @@
//! 80-9F -> Characters that are in the G2 group in 60-7F
//! (there are several blank characters here, that's OK)
//! A0-FF -> Group G1 as is - non-English characters and symbols
<<<<<<< Updated upstream

// NOTE: Same as `lib_ccx/ccx_decoder_708_encoding.c` file
=======
//!
//! NOTE: Same as `lib_ccx/ccx_decoder_708_encoding.c` file
>>>>>>> Stashed changes

#[no_mangle]
pub extern "C" fn dtvcc_get_internal_from_G0(g0_char: u8) -> u8 {
Expand Down

0 comments on commit a8ad22b

Please sign in to comment.