IWYU: Include all headers for symbols used in files.

Semi-automatically taking the the misc-include-cleaner warnings
by clang-tidy and fixing files to be self-contained.

Change-Id: Iaaa2b2ec9d6dcce547fa5cb6b4f056dfc8c781ff
This commit is contained in:
Henner Zeller
2025-05-10 19:00:56 +02:00
parent eb3ff78159
commit 98c2780100
152 changed files with 517 additions and 110 deletions

View File

@@ -20,12 +20,15 @@
#include "src/webp/config.h"
#endif
#include <assert.h>
#include <string.h> // for memcpy
#include "src/dsp/cpu.h"
#include "src/dsp/dsp.h"
#include "src/utils/bit_reader_utils.h"
#include "src/utils/endian_inl_utils.h"
#include "src/utils/utils.h"
#include "src/webp/types.h"
#ifdef __cplusplus
extern "C" {

View File

@@ -15,10 +15,14 @@
#include "src/webp/config.h"
#endif
#include <assert.h>
#include <stddef.h>
#include "src/webp/types.h"
#include "src/dsp/cpu.h"
#include "src/utils/bit_reader_inl_utils.h"
#include "src/utils/bit_reader_utils.h"
#include "src/utils/endian_inl_utils.h"
#include "src/utils/utils.h"
//------------------------------------------------------------------------------

View File

@@ -16,6 +16,8 @@
#define WEBP_UTILS_BIT_READER_UTILS_H_
#include <assert.h>
#include <stddef.h>
#ifdef _MSC_VER
#include <stdlib.h> // _byteswap_ulong
#endif

View File

@@ -13,10 +13,11 @@
// Vikas Arora (vikaas.arora@gmail.com)
#include <assert.h>
#include <string.h> // for memcpy()
#include <stdlib.h>
#include <string.h> // for memcpy()
#include "src/utils/bit_writer_utils.h"
#include "src/webp/types.h"
#include "src/utils/endian_inl_utils.h"
#include "src/utils/utils.h"

View File

@@ -14,6 +14,8 @@
#ifndef WEBP_UTILS_BIT_WRITER_UTILS_H_
#define WEBP_UTILS_BIT_WRITER_UTILS_H_
#include <stddef.h>
#include "src/webp/types.h"
#ifdef __cplusplus

View File

@@ -14,7 +14,9 @@
#include <assert.h>
#include <stdlib.h>
#include <string.h>
#include "src/utils/color_cache_utils.h"
#include "src/webp/types.h"
#include "src/utils/utils.h"
//------------------------------------------------------------------------------

View File

@@ -17,6 +17,7 @@
#include <assert.h>
#include "src/dsp/cpu.h"
#include "src/dsp/dsp.h"
#include "src/webp/types.h"

View File

@@ -11,10 +11,13 @@
//
// Author: Urvang (urvang@google.com)
#include "src/utils/filters_utils.h"
#include <stdlib.h>
#include <string.h>
#include "src/dsp/dsp.h"
#include "src/webp/types.h"
#include "src/utils/filters_utils.h"
// -----------------------------------------------------------------------------
// Quick estimate of a potentially interesting filter mode to try.

View File

@@ -14,8 +14,8 @@
#ifndef WEBP_UTILS_FILTERS_UTILS_H_
#define WEBP_UTILS_FILTERS_UTILS_H_
#include "src/webp/types.h"
#include "src/dsp/dsp.h"
#include "src/webp/types.h"
#ifdef __cplusplus
extern "C" {

View File

@@ -14,7 +14,9 @@
#include <assert.h>
#include <stdlib.h>
#include <string.h>
#include "src/utils/huffman_encode_utils.h"
#include "src/webp/types.h"
#include "src/utils/utils.h"
#include "src/webp/format_constants.h"

View File

@@ -14,9 +14,11 @@
#include <assert.h>
#include <stdlib.h>
#include <string.h>
#include "src/utils/huffman_utils.h"
#include "src/utils/utils.h"
#include "src/webp/format_constants.h"
#include "src/webp/types.h"
// Huffman data read via DecodeImageStream is represented in two (red and green)
// bytes.

View File

@@ -15,6 +15,7 @@
#define WEBP_UTILS_HUFFMAN_UTILS_H_
#include <assert.h>
#include "src/webp/format_constants.h"
#include "src/webp/types.h"

View File

@@ -15,12 +15,14 @@
#include <assert.h>
#include <stdlib.h>
#include <string.h>
#include "src/dsp/lossless_common.h"
#include "src/utils/color_cache_utils.h"
#include "src/utils/utils.h"
#include "src/webp/encode.h"
#include "src/webp/format_constants.h"
#include "src/webp/types.h"
// -----------------------------------------------------------------------------

View File

@@ -19,6 +19,7 @@
#include <string.h> // for memset
#include "src/utils/utils.h"
#include "src/webp/types.h"
// #define USE_DITHERING // uncomment to enable ordered dithering (not vital)

View File

@@ -13,7 +13,9 @@
// Author: Skal (pascal.massimino@gmail.com)
#include <assert.h>
#include <stddef.h>
#include "src/webp/types.h"
#include "src/utils/quant_levels_utils.h"
#define NUM_SYMBOLS 256
@@ -137,4 +139,3 @@ int QuantizeLevels(uint8_t* const data, int width, int height,
return 1;
}

View File

@@ -12,6 +12,8 @@
// Author: Skal (pascal.massimino@gmail.com)
#include <string.h>
#include "src/webp/types.h"
#include "src/utils/random_utils.h"
//------------------------------------------------------------------------------
@@ -40,4 +42,3 @@ void VP8InitRandom(VP8Random* const rg, float dithering) {
}
//------------------------------------------------------------------------------

View File

@@ -15,6 +15,7 @@
#define WEBP_UTILS_RANDOM_UTILS_H_
#include <assert.h>
#include "src/webp/types.h"
#ifdef __cplusplus

View File

@@ -15,7 +15,9 @@
#include <limits.h>
#include <stdlib.h>
#include <string.h>
#include "src/dsp/dsp.h"
#include "src/webp/types.h"
#include "src/utils/rescaler_utils.h"
#include "src/utils/utils.h"

View File

@@ -13,6 +13,7 @@
#include <assert.h>
#include <string.h> // for memset()
#include "src/utils/thread_utils.h"
#include "src/utils/utils.h"

View File

@@ -13,9 +13,11 @@
#include "src/utils/utils.h"
#include <assert.h>
#include <stdlib.h>
#include <string.h> // for memcpy()
#include "src/webp/types.h"
#include "src/utils/palette.h"
#include "src/webp/encode.h"