Skip to content

Commit

Permalink
tidy: Ignore parentheses in complex expression in mythmpeg2 library.
Browse files Browse the repository at this point in the history
Many of these warnings are in the middle of complex macros, and tidy
can't point out exactly where the additions need to be made.  Leave
them alone for now, especially since this is imported code that might
go away if mythtranscode is ever rewritten to use FFmpeg.

https://clang.llvm.org/extra/clang-tidy/checks/readability/math-missing-parentheses.html
  • Loading branch information
linuxdude42 committed Oct 4, 2024
1 parent 7dfd833 commit 68011c2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions mythtv/libs/libmythmpeg2/idct_mmx.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
#define round(bias) ((int)(((bias)+0.5) * (1<<ROW_SHIFT)))
#define rounder(bias) {round (bias), round (bias)}

/* NOLINTBEGIN(readability-math-missing-parentheses) */

#if 0
/* C row IDCT - its just here to document the MMXEXT and MMX versions */
Expand Down Expand Up @@ -819,4 +820,6 @@ void mpeg2_idct_mmx_init (void)
}
}

/* NOLINTEND(readability-math-missing-parentheses) */

#endif
2 changes: 2 additions & 0 deletions mythtv/libs/libmythmpeg2/slice.c
Original file line number Diff line number Diff line change
Expand Up @@ -922,6 +922,7 @@ static inline void slice_non_intra_DCT (mpeg2_decoder_t * const decoder,
mpeg2_idct_add (last, decoder->DCTblock, dest, stride);
}

/* NOLINTBEGIN(readability-math-missing-parentheses) */
#define MOTION_420(table,ref,motion_x,motion_y,size,y) \
pos_x = 2 * decoder->offset + (motion_x); \
pos_y = 2 * decoder->v_offset + (motion_y) + 2 * (y); \
Expand Down Expand Up @@ -1200,6 +1201,7 @@ static inline void slice_non_intra_DCT (mpeg2_decoder_t * const decoder,
(ref)[1] + offset, decoder->stride, 16); \
(table)[4] (decoder->dest[2] + decoder->offset, \
(ref)[2] + offset, decoder->stride, 16)
/* NOLINTEND(readability-math-missing-parentheses) */

#define bit_buf (decoder->bitstream_buf)
#define bits (decoder->bitstream_bits)
Expand Down

0 comments on commit 68011c2

Please sign in to comment.