#include <stdio.h>
#include <stdlib.h>
#include <inttypes.h>
#include <assert.h>
#include "config.h"
#include "rgb2rgb.h"
#include "swscale.h"
#include "swscale_internal.h"
Go to the source code of this file.
Defines | |
#define | DITHER1XBPP |
#define | LOADCHROMA(i) |
#define | PUTRGB(dst, src, i, o) |
#define | PUTRGB24(dst, src, i) |
#define | PUTBGR24(dst, src, i) |
#define | YUV2RGBFUNC(func_name, dst_type) |
#define | ENDYUV2RGBLINE(dst_delta) |
#define | ENDYUV2RGBFUNC() |
#define | CLOSEYUV2RGBFUNC(dst_delta) |
#define | PUTRGB8(dst, src, i, o) |
#define | PUTRGB4(dst, src, i) |
#define | PUTRGB4D(dst, src, i, o) |
#define | PUTRGB4DB(dst, src, i, o) |
#define | PUTRGB1(out, src, i, o) |
Functions | |
LOADCHROMA (0) | |
PUTRGB (dst_1, py_1, 0, 0) | |
PUTRGB (dst_2, py_2, 0, 1) | |
LOADCHROMA (1) | |
PUTRGB (dst_2, py_2, 1, 1) | |
PUTRGB (dst_1, py_1, 1, 0) | |
LOADCHROMA (2) | |
PUTRGB (dst_1, py_1, 2, 0) | |
PUTRGB (dst_2, py_2, 2, 1) | |
LOADCHROMA (3) | |
PUTRGB (dst_2, py_2, 3, 1) | |
PUTRGB (dst_1, py_1, 3, 0) | |
PUTRGB24 (dst_1, py_1, 0) | |
PUTRGB24 (dst_2, py_2, 0) | |
PUTRGB24 (dst_2, py_2, 1) | |
PUTRGB24 (dst_1, py_1, 1) | |
PUTRGB24 (dst_1, py_1, 2) | |
PUTRGB24 (dst_2, py_2, 2) | |
PUTRGB24 (dst_2, py_2, 3) | |
PUTRGB24 (dst_1, py_1, 3) | |
PUTBGR24 (dst_1, py_1, 0) | |
PUTBGR24 (dst_2, py_2, 0) | |
PUTBGR24 (dst_2, py_2, 1) | |
PUTBGR24 (dst_1, py_1, 1) | |
PUTBGR24 (dst_1, py_1, 2) | |
PUTBGR24 (dst_2, py_2, 2) | |
PUTBGR24 (dst_2, py_2, 3) | |
PUTBGR24 (dst_1, py_1, 3) | |
PUTRGB8 (dst_1, py_1, 0, 0) | |
PUTRGB8 (dst_2, py_2, 0, 0+8) | |
PUTRGB8 (dst_2, py_2, 1, 2+8) | |
PUTRGB8 (dst_1, py_1, 1, 2) | |
PUTRGB8 (dst_1, py_1, 2, 4) | |
PUTRGB8 (dst_2, py_2, 2, 4+8) | |
PUTRGB8 (dst_2, py_2, 3, 6+8) | |
PUTRGB8 (dst_1, py_1, 3, 6) | |
PUTRGB4 (dst_1, py_1, 0) | |
PUTRGB4 (dst_2, py_2, 0) | |
PUTRGB4 (dst_2, py_2, 1) | |
PUTRGB4 (dst_1, py_1, 1) | |
PUTRGB4 (dst_1, py_1, 2) | |
PUTRGB4 (dst_2, py_2, 2) | |
PUTRGB4 (dst_2, py_2, 3) | |
PUTRGB4 (dst_1, py_1, 3) | |
PUTRGB4D (dst_1, py_1, 0, 0) | |
PUTRGB4D (dst_2, py_2, 0, 0+8) | |
PUTRGB4D (dst_2, py_2, 1, 2+8) | |
PUTRGB4D (dst_1, py_1, 1, 2) | |
PUTRGB4D (dst_1, py_1, 2, 4) | |
PUTRGB4D (dst_2, py_2, 2, 4+8) | |
PUTRGB4D (dst_2, py_2, 3, 6+8) | |
PUTRGB4D (dst_1, py_1, 3, 6) | |
PUTRGB4DB (dst_1, py_1, 0, 0) | |
PUTRGB4DB (dst_2, py_2, 0, 0+8) | |
PUTRGB4DB (dst_2, py_2, 1, 2+8) | |
PUTRGB4DB (dst_1, py_1, 1, 2) | |
PUTRGB4DB (dst_1, py_1, 2, 4) | |
PUTRGB4DB (dst_2, py_2, 2, 4+8) | |
PUTRGB4DB (dst_2, py_2, 3, 6+8) | |
PUTRGB4DB (dst_1, py_1, 3, 6) | |
PUTRGB1 (out_1, py_1, 0, 0) | |
PUTRGB1 (out_2, py_2, 0, 0+8) | |
PUTRGB1 (out_2, py_2, 1, 2+8) | |
PUTRGB1 (out_1, py_1, 1, 2) | |
PUTRGB1 (out_1, py_1, 2, 4) | |
PUTRGB1 (out_2, py_2, 2, 4+8) | |
PUTRGB1 (out_2, py_2, 3, 6+8) | |
PUTRGB1 (out_1, py_1, 3, 6) | |
SwsFunc | sws_yuv2rgb_get_func_ptr (SwsContext *c) |
static void | fill_table (uint8_t *table[256], const int elemsize, const int inc, uint8_t *y_table) |
static void | fill_gv_table (int table[256], const int elemsize, const int inc) |
av_cold int | sws_yuv2rgb_c_init_tables (SwsContext *c, const int inv_table[4], int fullRange, int brightness, int contrast, int saturation) |
Variables | |
const uint8_t | dither_8x8_32 [8][8] |
const uint8_t | dither_8x8_73 [8][8] |
const uint8_t | dither_8x8_220 [8][8] |
const int32_t | ff_yuv2rgb_coeffs [8][4] |
const uint8_t * | d32 = dither_8x8_32[y&7] |
const uint8_t * | d64 = dither_8x8_73[y&7] |
int | acc |
const uint8_t * | d128 = dither_8x8_220[y&7] |
char | out_1 = 0 |
char | out_2 = 0 |
g = c->table_gU[128] + c->table_gV[128] | |
dst_1 [0] = out_1 | |
dst_2 [0] = out_2 |
#define CLOSEYUV2RGBFUNC | ( | dst_delta | ) |
#define ENDYUV2RGBFUNC | ( | ) |
#define ENDYUV2RGBLINE | ( | dst_delta | ) |
#define LOADCHROMA | ( | i | ) |
#define PUTBGR24 | ( | dst, | |||
src, | |||||
i | ) |
#define PUTRGB | ( | dst, | |||
src, | |||||
i, | |||||
o | ) |
#define PUTRGB1 | ( | out, | |||
src, | |||||
i, | |||||
o | ) |
#define PUTRGB24 | ( | dst, | |||
src, | |||||
i | ) |
#define PUTRGB4 | ( | dst, | |||
src, | |||||
i | ) |
#define PUTRGB4D | ( | dst, | |||
src, | |||||
i, | |||||
o | ) |
#define PUTRGB4DB | ( | dst, | |||
src, | |||||
i, | |||||
o | ) |
#define PUTRGB8 | ( | dst, | |||
src, | |||||
i, | |||||
o | ) |
#define YUV2RGBFUNC | ( | func_name, | |||
dst_type | ) |
Value:
static int func_name(SwsContext *c, uint8_t* src[], int srcStride[], int srcSliceY, \ int srcSliceH, uint8_t* dst[], int dstStride[]){\ int y;\ \ if (c->srcFormat == PIX_FMT_YUV422P) {\ srcStride[1] *= 2;\ srcStride[2] *= 2;\ }\ for (y=0; y<srcSliceH; y+=2) {\ dst_type *dst_1 = (dst_type*)(dst[0] + (y+srcSliceY )*dstStride[0]);\ dst_type *dst_2 = (dst_type*)(dst[0] + (y+srcSliceY+1)*dstStride[0]);\ dst_type av_unused *r, *b;\ dst_type *g;\ uint8_t *py_1 = src[0] + y*srcStride[0];\ uint8_t *py_2 = py_1 + srcStride[0];\ uint8_t *pu = src[1] + (y>>1)*srcStride[1];\ uint8_t *pv = src[2] + (y>>1)*srcStride[2];\ unsigned int h_size = c->dstW>>3;\ while (h_size--) {\ int av_unused U, V;\ int Y;\
static void fill_gv_table | ( | int | table[256], | |
const int | elemsize, | |||
const int | inc | |||
) | [static] |
static void fill_table | ( | uint8_t * | table[256], | |
const int | elemsize, | |||
const int | inc, | |||
uint8_t * | y_table | |||
) | [static] |
LOADCHROMA | ( | 3 | ) |
LOADCHROMA | ( | 2 | ) |
LOADCHROMA | ( | 1 | ) |
LOADCHROMA | ( | 0 | ) |
PUTBGR24 | ( | dst_1 | , | |
py_1 | , | |||
3 | ||||
) |
PUTBGR24 | ( | dst_2 | , | |
py_2 | , | |||
3 | ||||
) |
PUTBGR24 | ( | dst_2 | , | |
py_2 | , | |||
2 | ||||
) |
PUTBGR24 | ( | dst_1 | , | |
py_1 | , | |||
2 | ||||
) |
PUTBGR24 | ( | dst_1 | , | |
py_1 | , | |||
1 | ||||
) |
PUTBGR24 | ( | dst_2 | , | |
py_2 | , | |||
1 | ||||
) |
PUTBGR24 | ( | dst_2 | , | |
py_2 | , | |||
0 | ||||
) |
PUTBGR24 | ( | dst_1 | , | |
py_1 | , | |||
0 | ||||
) |
PUTRGB | ( | dst_1 | , | |
py_1 | , | |||
3 | , | |||
0 | ||||
) |
PUTRGB | ( | dst_2 | , | |
py_2 | , | |||
3 | , | |||
1 | ||||
) |
PUTRGB | ( | dst_2 | , | |
py_2 | , | |||
2 | , | |||
1 | ||||
) |
PUTRGB | ( | dst_1 | , | |
py_1 | , | |||
2 | , | |||
0 | ||||
) |
PUTRGB | ( | dst_1 | , | |
py_1 | , | |||
1 | , | |||
0 | ||||
) |
PUTRGB | ( | dst_2 | , | |
py_2 | , | |||
1 | , | |||
1 | ||||
) |
PUTRGB | ( | dst_2 | , | |
py_2 | , | |||
0 | , | |||
1 | ||||
) |
PUTRGB | ( | dst_1 | , | |
py_1 | , | |||
0 | , | |||
0 | ||||
) |
PUTRGB1 | ( | out_1 | , | |
py_1 | , | |||
3 | , | |||
6 | ||||
) |
PUTRGB1 | ( | out_2 | , | |
py_2 | , | |||
3 | , | |||
6+ | 8 | |||
) |
PUTRGB1 | ( | out_2 | , | |
py_2 | , | |||
2 | , | |||
4+ | 8 | |||
) |
PUTRGB1 | ( | out_1 | , | |
py_1 | , | |||
2 | , | |||
4 | ||||
) |
PUTRGB1 | ( | out_1 | , | |
py_1 | , | |||
1 | , | |||
2 | ||||
) |
PUTRGB1 | ( | out_2 | , | |
py_2 | , | |||
1 | , | |||
2+ | 8 | |||
) |
PUTRGB1 | ( | out_2 | , | |
py_2 | , | |||
0 | , | |||
0+ | 8 | |||
) |
PUTRGB1 | ( | out_1 | , | |
py_1 | , | |||
0 | , | |||
0 | ||||
) |
PUTRGB24 | ( | dst_1 | , | |
py_1 | , | |||
3 | ||||
) |
PUTRGB24 | ( | dst_2 | , | |
py_2 | , | |||
3 | ||||
) |
PUTRGB24 | ( | dst_2 | , | |
py_2 | , | |||
2 | ||||
) |
PUTRGB24 | ( | dst_1 | , | |
py_1 | , | |||
2 | ||||
) |
PUTRGB24 | ( | dst_1 | , | |
py_1 | , | |||
1 | ||||
) |
PUTRGB24 | ( | dst_2 | , | |
py_2 | , | |||
1 | ||||
) |
PUTRGB24 | ( | dst_2 | , | |
py_2 | , | |||
0 | ||||
) |
PUTRGB24 | ( | dst_1 | , | |
py_1 | , | |||
0 | ||||
) |
PUTRGB4 | ( | dst_1 | , | |
py_1 | , | |||
3 | ||||
) |
PUTRGB4 | ( | dst_2 | , | |
py_2 | , | |||
3 | ||||
) |
PUTRGB4 | ( | dst_2 | , | |
py_2 | , | |||
2 | ||||
) |
PUTRGB4 | ( | dst_1 | , | |
py_1 | , | |||
2 | ||||
) |
PUTRGB4 | ( | dst_1 | , | |
py_1 | , | |||
1 | ||||
) |
PUTRGB4 | ( | dst_2 | , | |
py_2 | , | |||
1 | ||||
) |
PUTRGB4 | ( | dst_2 | , | |
py_2 | , | |||
0 | ||||
) |
PUTRGB4 | ( | dst_1 | , | |
py_1 | , | |||
0 | ||||
) |
PUTRGB4D | ( | dst_1 | , | |
py_1 | , | |||
3 | , | |||
6 | ||||
) |
PUTRGB4D | ( | dst_2 | , | |
py_2 | , | |||
3 | , | |||
6+ | 8 | |||
) |
PUTRGB4D | ( | dst_2 | , | |
py_2 | , | |||
2 | , | |||
4+ | 8 | |||
) |
PUTRGB4D | ( | dst_1 | , | |
py_1 | , | |||
2 | , | |||
4 | ||||
) |
PUTRGB4D | ( | dst_1 | , | |
py_1 | , | |||
1 | , | |||
2 | ||||
) |
PUTRGB4D | ( | dst_2 | , | |
py_2 | , | |||
1 | , | |||
2+ | 8 | |||
) |
PUTRGB4D | ( | dst_2 | , | |
py_2 | , | |||
0 | , | |||
0+ | 8 | |||
) |
PUTRGB4D | ( | dst_1 | , | |
py_1 | , | |||
0 | , | |||
0 | ||||
) |
PUTRGB4DB | ( | dst_1 | , | |
py_1 | , | |||
3 | , | |||
6 | ||||
) |
PUTRGB4DB | ( | dst_2 | , | |
py_2 | , | |||
3 | , | |||
6+ | 8 | |||
) |
PUTRGB4DB | ( | dst_2 | , | |
py_2 | , | |||
2 | , | |||
4+ | 8 | |||
) |
PUTRGB4DB | ( | dst_1 | , | |
py_1 | , | |||
2 | , | |||
4 | ||||
) |
PUTRGB4DB | ( | dst_1 | , | |
py_1 | , | |||
1 | , | |||
2 | ||||
) |
PUTRGB4DB | ( | dst_2 | , | |
py_2 | , | |||
1 | , | |||
2+ | 8 | |||
) |
PUTRGB4DB | ( | dst_2 | , | |
py_2 | , | |||
0 | , | |||
0+ | 8 | |||
) |
PUTRGB4DB | ( | dst_1 | , | |
py_1 | , | |||
0 | , | |||
0 | ||||
) |
PUTRGB8 | ( | dst_1 | , | |
py_1 | , | |||
3 | , | |||
6 | ||||
) |
PUTRGB8 | ( | dst_2 | , | |
py_2 | , | |||
3 | , | |||
6+ | 8 | |||
) |
PUTRGB8 | ( | dst_2 | , | |
py_2 | , | |||
2 | , | |||
4+ | 8 | |||
) |
PUTRGB8 | ( | dst_1 | , | |
py_1 | , | |||
2 | , | |||
4 | ||||
) |
PUTRGB8 | ( | dst_1 | , | |
py_1 | , | |||
1 | , | |||
2 | ||||
) |
PUTRGB8 | ( | dst_2 | , | |
py_2 | , | |||
1 | , | |||
2+ | 8 | |||
) |
PUTRGB8 | ( | dst_2 | , | |
py_2 | , | |||
0 | , | |||
0+ | 8 | |||
) |
PUTRGB8 | ( | dst_1 | , | |
py_1 | , | |||
0 | , | |||
0 | ||||
) |
av_cold int sws_yuv2rgb_c_init_tables | ( | SwsContext * | c, | |
const int | inv_table[4], | |||
int | fullRange, | |||
int | brightness, | |||
int | contrast, | |||
int | saturation | |||
) |
SwsFunc sws_yuv2rgb_get_func_ptr | ( | SwsContext * | c | ) |
int acc |
Definition at line 301 of file yuv2rgb.c.
Referenced by escape_FF(), fill_coding_method_array(), get_intra_count(), get_sae(), and sse().
const uint8_t * d128 = dither_8x8_220[y&7] |
const uint8_t* d32 = dither_8x8_32[y&7] |
const uint8_t * d64 = dither_8x8_73[y&7] |
const uint8_t dither_8x8_220[8][8] |
const uint8_t dither_8x8_32[8][8] |
const uint8_t dither_8x8_73[8][8] |
const int32_t ff_yuv2rgb_coeffs[8][4] |
Initial value:
{ {117504, 138453, 13954, 34903}, {117504, 138453, 13954, 34903}, {104597, 132201, 25675, 53279}, {104597, 132201, 25675, 53279}, {104448, 132798, 24759, 53109}, {104597, 132201, 25675, 53279}, {104597, 132201, 25675, 53279}, {117579, 136230, 16907, 35559} }
Definition at line 68 of file yuv2rgb.c.
Referenced by sws_getContext().
g = c->table_gU[128] + c->table_gV[128] |
Definition at line 405 of file yuv2rgb.c.
Referenced by add_left_prediction_bgr32(), apply_dependent_coupling(), apply_intensity_stereo(), apply_mid_side_stereo(), avcodec_string(), bgr24ToUV_half_TMPL(), bgr24ToUV_TMPL(), bgr24ToY_TMPL(), bgr8torgb8(), build_rgb_palette(), Configure(), convert_to_rgb32_loco(), dct_quantize_refine(), decode_band_types(), decode_cce(), decode_frame(), decode_rgb_frame(), decode_scalefactors(), decode_spectrum_and_dequant(), deloco_rgb24(), dump_stream_format(), dvbsub_init_decoder(), dvbsub_parse_clut_segment(), encode_dvb_subtitles(), ff_set_systematic_pal(), flic_decode_frame_8BPP(), gen_image(), generate_joint_tables(), glue(), guess_palette(), idcin_read_packet(), mov_read_stsd(), mp_decode_layer3(), mp_yuv_to_rgb(), opt_pad_color(), png_filter_row(), pnm_decode_frame(), Process(), process_ipmovie_chunk(), qtrle_decode_24bpp(), qtrle_decode_32bpp(), rgb24_to_yuv420p(), rgb24to15_TMPL(), rgb24to16_TMPL(), rgb24tobgr15_TMPL(), rgb24tobgr16_TMPL(), rgb24ToY_TMPL(), rgb24toyv12_TMPL(), rgb32tobgr32_TMPL(), sub_left_prediction_bgr32(), subtitle_thread(), sws_scale(), vmd_decode(), vmdvideo_decode_init(), vqa_decode_chunk(), wc3_read_packet(), and yuv_a_to_rgba().