Go to the documentation of this file.
49 buf0_32[
i] =
r << src_shift;
50 buf1_32[
i] =
r << src_shift;
52 buf0[
i] =
r << src_shift;
53 buf1[
i] =
r << src_shift;
60 const char *func_str =
from ?
"lumRangeFromJpeg" :
"lumRangeToJpeg";
61 #define LARGEST_INPUT_SIZE 1920
101 dst1_32[0] = dst0_32[0] = mpeg_min << src_shift;
102 dst1_32[1] = dst0_32[1] = mpeg_max << src_shift;
104 dst1_32[2] = dst0_32[2] = -1;
107 dst1[0] = dst0[0] = mpeg_min << src_shift;
108 dst1[1] = dst0[1] = mpeg_max << src_shift;
110 dst1[2] = dst0[2] = -1;
113 c->lumConvertRange_coeff,
c->lumConvertRange_offset);
115 c->lumConvertRange_coeff,
c->lumConvertRange_offset);
116 if (memcmp(dst0, dst1,
width * sample_size))
121 if ((dst1_32[0] >> src_shift) > 0 || (dst1_32[1] >> src_shift) != jpeg_max)
124 if ((dst1[0] >> src_shift) > 0 || (dst1[1] >> src_shift) != jpeg_max)
130 c->lumConvertRange_coeff,
c->lumConvertRange_offset);
137 #undef LARGEST_INPUT_SIZE
141 const char *func_str =
from ?
"chrRangeFromJpeg" :
"chrRangeToJpeg";
142 #define LARGEST_INPUT_SIZE 1920
185 dstU1_32[0] = dstU0_32[0] = mpeg_min << src_shift;
186 dstU1_32[1] = dstU0_32[1] = mpeg_max << src_shift;
188 dstU1_32[2] = dstU0_32[2] = -1;
191 dstU1[0] = dstU0[0] = mpeg_min << src_shift;
192 dstU1[1] = dstU0[1] = mpeg_max << src_shift;
194 dstU1[2] = dstU0[2] = -1;
197 c->chrConvertRange_coeff,
c->chrConvertRange_offset);
199 c->chrConvertRange_coeff,
c->chrConvertRange_offset);
200 if (memcmp(dstU0, dstU1,
width * sample_size) ||
201 memcmp(dstV0, dstV1,
width * sample_size))
206 if ((dstU1_32[0] >> src_shift) > 0 || (dstU1_32[1] >> src_shift) != jpeg_max)
209 if ((dstU1[0] >> src_shift) > 0 || (dstU1[1] >> src_shift) != jpeg_max)
215 c->chrConvertRange_coeff,
c->chrConvertRange_offset);
222 #undef LARGEST_INPUT_SIZE
227 report(
"lumRangeFromJpeg");
229 report(
"chrRangeFromJpeg");
AVPixelFormat
Pixel format.
const AVPixFmtDescriptor * av_pix_fmt_desc_get(enum AVPixelFormat pix_fmt)
void sws_freeContext(SwsContext *swsContext)
Free the swscaler context swsContext.
#define check_func(func,...)
static void bit_depth(AudioStatsContext *s, const uint64_t *const mask, uint8_t *depth)
av_warn_unused_result int sws_init_context(SwsContext *sws_context, SwsFilter *srcFilter, SwsFilter *dstFilter)
Initialize the swscaler context sws_context.
static void check_chrConvertRange(int from)
#define AV_PIX_FMT_YUV444P10
#define LARGEST_INPUT_SIZE
#define FF_ARRAY_ELEMS(a)
#define AV_PIX_FMT_YUV444P16
static enum AVPixelFormat pix_fmt
static const int input_sizes[]
#define LOCAL_ALIGNED_32(t, v,...)
int src_range
Source is full range.
Undefined Behavior In the C some operations are like signed integer dereferencing freed accessing outside allocated Undefined Behavior must not occur in a C it is not safe even if the output of undefined operations is unused The unsafety may seem nit picking but Optimizing compilers have in fact optimized code on the assumption that no undefined Behavior occurs Optimizing code based on wrong assumptions can and has in some cases lead to effects beyond the output of computations The signed integer overflow problem in speed critical code Code which is highly optimized and works with signed integers sometimes has the problem that often the output of the computation does not c
SwsContext * sws_alloc_context(void)
Allocate an empty SwsContext and set its fields to default values.
uint8_t ptrdiff_t const uint8_t ptrdiff_t int intptr_t intptr_t int int16_t * dst
#define AV_PIX_FMT_YUV444P12
it s the only field you need to keep assuming you have a context There is some magic you don t need to care about around this just let it vf offset
int dst_format
Destination pixel format.
static SwsContext * sws[3]
static void randomize_buffers(int16_t *buf0, int16_t *buf1, int bit_depth, int width)
#define i(width, name, range_min, range_max)
void ff_sws_init_scale(SwsInternal *c)
static void check_lumConvertRange(int from)
#define AV_PIX_FMT_YUV444P9
@ AV_PIX_FMT_YUV444P
planar YUV 4:4:4, 24bpp, (1 Cr & Cb sample per 1x1 Y samples)
void checkasm_check_sw_range_convert(void)
int src_format
Source pixel format.
Descriptor that unambiguously describes how the bits of a pixel are stored in the up to 4 data planes...
#define declare_func(ret,...)
int dst_range
Destination is full range.
static const double coeff[2][5]
static SwsInternal * sws_internal(const SwsContext *sws)
#define AV_PIX_FMT_YUV444P14
Main external API structure.
static enum AVPixelFormat pixel_formats[]