Libav
|
#include <stdio.h>
#include <stdlib.h>
#include <inttypes.h>
#include <assert.h>
#include "libavutil/cpu.h"
#include "libavutil/bswap.h"
#include "config.h"
#include "rgb2rgb.h"
#include "swscale.h"
#include "swscale_internal.h"
Go to the source code of this file.
Macros | |
#define | LOADCHROMA(i) |
#define | PUTRGB(dst, src, i) |
#define | PUTRGB24(dst, src, i) |
#define | PUTBGR24(dst, src, i) |
#define | PUTRGBA(dst, ysrc, asrc, i, s) |
#define | PUTRGB48(dst, src, i) |
#define | PUTBGR48(dst, src, i) |
#define | YUV2RGBFUNC(func_name, dst_type, alpha) |
#define | ENDYUV2RGBLINE(dst_delta, ss) |
#define | ENDYUV2RGBFUNC() |
#define | CLOSEYUV2RGBFUNC(dst_delta) |
#define | PUTRGB12(dst, src, i, o) |
#define | PUTRGB8(dst, src, i, o) |
#define | PUTRGB4D(dst, src, i, o) |
#define | PUTRGB4DB(dst, src, i, o) |
#define | PUTRGB1(out, src, i, o) |
Functions | |
const int * | sws_getCoefficients (int colorspace) |
Return a pointer to yuv<->rgb coefficients for the given colorspace suitable for sws_setColorspaceDetails(). More... | |
LOADCHROMA (0) | |
PUTRGB48 (dst_1, py_1, 0) | |
PUTRGB48 (dst_2, py_2, 0) | |
LOADCHROMA (1) | |
PUTRGB48 (dst_2, py_2, 1) | |
PUTRGB48 (dst_1, py_1, 1) | |
LOADCHROMA (2) | |
PUTRGB48 (dst_1, py_1, 2) | |
PUTRGB48 (dst_2, py_2, 2) | |
LOADCHROMA (3) | |
PUTRGB48 (dst_2, py_2, 3) | |
PUTRGB48 (dst_1, py_1, 3) | |
PUTBGR48 (dst_1, py_1, 0) | |
PUTBGR48 (dst_2, py_2, 0) | |
PUTBGR48 (dst_2, py_2, 1) | |
PUTBGR48 (dst_1, py_1, 1) | |
PUTBGR48 (dst_1, py_1, 2) | |
PUTBGR48 (dst_2, py_2, 2) | |
PUTBGR48 (dst_2, py_2, 3) | |
PUTBGR48 (dst_1, py_1, 3) | |
PUTRGB (dst_1, py_1, 0) | |
PUTRGB (dst_2, py_2, 0) | |
PUTRGB (dst_2, py_2, 1) | |
PUTRGB (dst_1, py_1, 1) | |
PUTRGB (dst_1, py_1, 2) | |
PUTRGB (dst_2, py_2, 2) | |
PUTRGB (dst_2, py_2, 3) | |
PUTRGB (dst_1, py_1, 3) | |
PUTRGBA (dst_1, py_1, pa_1, 0, 24) | |
PUTRGBA (dst_2, py_2, pa_2, 0, 24) | |
PUTRGBA (dst_2, py_2, pa_2, 1, 24) | |
PUTRGBA (dst_1, py_1, pa_1, 1, 24) | |
PUTRGBA (dst_1, py_1, pa_1, 2, 24) | |
PUTRGBA (dst_2, py_2, pa_2, 2, 24) | |
PUTRGBA (dst_2, py_2, pa_2, 3, 24) | |
PUTRGBA (dst_1, py_1, pa_1, 3, 24) | |
PUTRGBA (dst_1, py_1, pa_1, 0, 0) | |
PUTRGBA (dst_2, py_2, pa_2, 0, 0) | |
PUTRGBA (dst_2, py_2, pa_2, 1, 0) | |
PUTRGBA (dst_1, py_1, pa_1, 1, 0) | |
PUTRGBA (dst_1, py_1, pa_1, 2, 0) | |
PUTRGBA (dst_2, py_2, pa_2, 2, 0) | |
PUTRGBA (dst_2, py_2, pa_2, 3, 0) | |
PUTRGBA (dst_1, py_1, pa_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) | |
PUTRGB12 (dst_1, py_1, 0, 0) | |
PUTRGB12 (dst_2, py_2, 0, 0+8) | |
PUTRGB12 (dst_2, py_2, 1, 2+8) | |
PUTRGB12 (dst_1, py_1, 1, 2) | |
PUTRGB12 (dst_1, py_1, 2, 4) | |
PUTRGB12 (dst_2, py_2, 2, 4+8) | |
PUTRGB12 (dst_2, py_2, 3, 6+8) | |
PUTRGB12 (dst_1, py_1, 3, 6) | |
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) | |
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 | ff_yuv2rgb_get_func_ptr (SwsContext *c) |
static void | fill_table (uint8_t *table[256], const int elemsize, const int inc, void *y_tab) |
static void | fill_gv_table (int table[256], const int elemsize, const int inc) |
static uint16_t | roundToInt16 (int64_t f) |
av_cold int | ff_yuv2rgb_c_init_tables (SwsContext *c, const int inv_table[4], int fullRange, int brightness, int contrast, int saturation) |
Variables | |
const int32_t | ff_yuv2rgb_coeffs [8][4] |
pa_1 = 8 | |
pa_2 = 8 | |
const uint8_t * | d16 = ff_dither_4x4_16[y & 3] |
const uint8_t * | d32 = ff_dither_8x8_32[y & 7] |
const uint8_t * | d64 = ff_dither_8x8_73[y & 7] |
const uint8_t * | d128 = ff_dither_8x8_220[y & 7] |
int | acc |
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 LOADCHROMA | ( | i) |
#define PUTRGB | ( | dst, | |
src, | |||
i | |||
) |
#define PUTRGB24 | ( | dst, | |
src, | |||
i | |||
) |
#define PUTBGR24 | ( | dst, | |
src, | |||
i | |||
) |
#define PUTRGBA | ( | dst, | |
ysrc, | |||
asrc, | |||
i, | |||
s | |||
) |
#define PUTRGB48 | ( | dst, | |
src, | |||
i | |||
) |
#define PUTBGR48 | ( | dst, | |
src, | |||
i | |||
) |
#define YUV2RGBFUNC | ( | func_name, | |
dst_type, | |||
alpha | |||
) |
#define ENDYUV2RGBLINE | ( | dst_delta, | |
ss | |||
) |
#define ENDYUV2RGBFUNC | ( | ) |
#define CLOSEYUV2RGBFUNC | ( | dst_delta) |
#define PUTRGB12 | ( | dst, | |
src, | |||
i, | |||
o | |||
) |
#define PUTRGB8 | ( | dst, | |
src, | |||
i, | |||
o | |||
) |
#define PUTRGB4D | ( | dst, | |
src, | |||
i, | |||
o | |||
) |
#define PUTRGB4DB | ( | dst, | |
src, | |||
i, | |||
o | |||
) |
#define PUTRGB1 | ( | out, | |
src, | |||
i, | |||
o | |||
) |
LOADCHROMA | ( | 0 | ) |
PUTRGB48 | ( | dst_1 | , |
py_1 | , | ||
0 | |||
) |
PUTRGB48 | ( | dst_2 | , |
py_2 | , | ||
0 | |||
) |
LOADCHROMA | ( | 1 | ) |
PUTRGB48 | ( | dst_2 | , |
py_2 | , | ||
1 | |||
) |
PUTRGB48 | ( | dst_1 | , |
py_1 | , | ||
1 | |||
) |
LOADCHROMA | ( | 2 | ) |
PUTRGB48 | ( | dst_1 | , |
py_1 | , | ||
2 | |||
) |
PUTRGB48 | ( | dst_2 | , |
py_2 | , | ||
2 | |||
) |
LOADCHROMA | ( | 3 | ) |
PUTRGB48 | ( | dst_2 | , |
py_2 | , | ||
3 | |||
) |
PUTRGB48 | ( | dst_1 | , |
py_1 | , | ||
3 | |||
) |
PUTBGR48 | ( | dst_1 | , |
py_1 | , | ||
0 | |||
) |
PUTBGR48 | ( | dst_2 | , |
py_2 | , | ||
0 | |||
) |
PUTBGR48 | ( | dst_2 | , |
py_2 | , | ||
1 | |||
) |
PUTBGR48 | ( | dst_1 | , |
py_1 | , | ||
1 | |||
) |
PUTBGR48 | ( | dst_1 | , |
py_1 | , | ||
2 | |||
) |
PUTBGR48 | ( | dst_2 | , |
py_2 | , | ||
2 | |||
) |
PUTBGR48 | ( | dst_2 | , |
py_2 | , | ||
3 | |||
) |
PUTBGR48 | ( | dst_1 | , |
py_1 | , | ||
3 | |||
) |
PUTRGB | ( | dst_1 | , |
py_1 | , | ||
0 | |||
) |
PUTRGB | ( | dst_2 | , |
py_2 | , | ||
0 | |||
) |
PUTRGB | ( | dst_2 | , |
py_2 | , | ||
1 | |||
) |
PUTRGB | ( | dst_1 | , |
py_1 | , | ||
1 | |||
) |
PUTRGB | ( | dst_1 | , |
py_1 | , | ||
2 | |||
) |
PUTRGB | ( | dst_2 | , |
py_2 | , | ||
2 | |||
) |
PUTRGB | ( | dst_2 | , |
py_2 | , | ||
3 | |||
) |
PUTRGB | ( | dst_1 | , |
py_1 | , | ||
3 | |||
) |
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 | |||
) |
PUTRGB12 | ( | dst_1 | , |
py_1 | , | ||
0 | , | ||
0 | |||
) |
PUTRGB12 | ( | dst_2 | , |
py_2 | , | ||
0 | , | ||
0+ | 8 | ||
) |
PUTRGB12 | ( | dst_2 | , |
py_2 | , | ||
1 | , | ||
2+ | 8 | ||
) |
PUTRGB12 | ( | dst_1 | , |
py_1 | , | ||
1 | , | ||
2 | |||
) |
PUTRGB12 | ( | dst_1 | , |
py_1 | , | ||
2 | , | ||
4 | |||
) |
PUTRGB12 | ( | dst_2 | , |
py_2 | , | ||
2 | , | ||
4+ | 8 | ||
) |
PUTRGB12 | ( | dst_2 | , |
py_2 | , | ||
3 | , | ||
6+ | 8 | ||
) |
PUTRGB12 | ( | dst_1 | , |
py_1 | , | ||
3 | , | ||
6 | |||
) |
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 | |||
) |
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 ff_yuv2rgb_get_func_ptr | ( | SwsContext * | c) |
Definition at line 559 of file yuv2rgb.c.
Referenced by ff_get_unscaled_swscale().
|
static |
Definition at line 625 of file yuv2rgb.c.
Referenced by ff_yuv2rgb_c_init_tables().
|
static |
Definition at line 640 of file yuv2rgb.c.
Referenced by ff_yuv2rgb_c_init_tables().
|
static |
Definition at line 652 of file yuv2rgb.c.
Referenced by ff_yuv2rgb_c_init_tables().
av_cold int ff_yuv2rgb_c_init_tables | ( | SwsContext * | c, |
const int | inv_table[4], | ||
int | fullRange, | ||
int | brightness, | ||
int | contrast, | ||
int | saturation | ||
) |
Definition at line 664 of file yuv2rgb.c.
Referenced by sws_setColorspaceDetails().
const int32_t ff_yuv2rgb_coeffs[8][4] |
Definition at line 38 of file yuv2rgb.c.
Referenced by sws_getCachedContext(), sws_getCoefficients(), and sws_getContext().
const uint8_t* d16 = ff_dither_4x4_16[y & 3] |
const uint8_t* d32 = ff_dither_8x8_32[y & 7] |
Definition at line 438 of file yuv2rgb.c.
Referenced by yuv2rgb_write().
const uint8_t * d64 = ff_dither_8x8_73[y & 7] |
Definition at line 439 of file yuv2rgb.c.
Referenced by yuv2rgb_write().
const uint8_t * d128 = ff_dither_8x8_220[y & 7] |
Definition at line 470 of file yuv2rgb.c.
Referenced by yuv2mono_1_c_template(), yuv2mono_2_c_template(), yuv2mono_X_c_template(), and yuv2rgb_write().
int acc |
Definition at line 471 of file yuv2rgb.c.
Referenced by add_hfyu_left_prediction_c(), apply_lpc(), escape_FF(), fill_coding_method_array(), get_intra_count(), get_sae(), sse(), stability_factor(), yuv2mono_1_c_template(), yuv2mono_2_c_template(), and yuv2mono_X_c_template().
g = c->table_gU[128] + c->table_gV[128] |
Definition at line 535 of file yuv2rgb.c.
Referenced by aac_encode_frame(), add_hfyu_left_prediction_bgr32_c(), add_opt(), adjust_frame_information(), apply_dependent_coupling(), apply_intensity_stereo(), apply_mid_side_stereo(), asf_build_simple_index(), asf_read_ext_stream_properties(), asf_read_header(), asf_read_stream_properties(), avcodec_string(), avpriv_set_systematic_pal2(), bfi_decode_frame(), bgr24ToUV_c(), bgr24ToUV_half_c(), bgr24ToY_c(), bgr8torgb8(), cdg_load_palette(), cdxl_decode_ham6(), cdxl_decode_ham8(), convert_to_rgb32_loco(), dct_quantize_refine(), decode_band_types(), decode_cce(), decode_frame(), decode_hybrid(), decode_pal(), decode_rgb_frame(), decode_scalefactors(), decode_spectrum_and_dequant(), deloco_rgb24(), dump_stream_format(), dvbsub_init_decoder(), dvbsub_parse_clut_segment(), dx2_decode_slice_565(), encode_dvb_subtitles(), encode_rgb_frame(), find_best_vect(), finish_group(), flic_decode_frame_8BPP(), gen_image(), generate_joint_tables(), get_match_score(), gif_clut_index(), guess_palette(), idcin_read_packet(), import_palette(), lag_decode_frame(), mangle_rgb_planes(), mov_parse_stsd_video(), mp_decode_layer3(), mp_yuv_to_rgb(), open_files(), paint_mouse_pointer(), parse_chunks(), parse_palette_segment(), planar_rgb16_to_uv(), planar_rgb16_to_y(), planar_rgb_to_uv(), planar_rgb_to_y(), png_filter_row(), pnm_decode_frame(), process_ipmovie_chunk(), psy_3gpp_analyze_channel(), psy_3gpp_init(), put_pixel(), qtrle_decode_24bpp(), ra144_encode_subblock(), restore_rgb_planes(), rgb12to15(), rgb16_32ToUV_c_template(), rgb16_32ToUV_half_c_template(), rgb24_to_yuv420p(), rgb24to15(), rgb24to15_c(), rgb24to16(), rgb24to16_c(), rgb24tobgr15(), rgb24tobgr15_c(), rgb24tobgr16(), rgb24tobgr16_c(), rgb24ToUV_c(), rgb24ToUV_half_c(), rgb24ToY_c(), rgb24toyv12_c(), rgb48funcs(), rgb48ToUV_c_template(), rgb48ToUV_half_c_template(), rgb48ToY_c_template(), sbr_hf_gen(), search_for_ms(), search_for_quantizers_anmr(), search_for_quantizers_faac(), search_for_quantizers_fast(), search_for_quantizers_twoloop(), sha256_transform(), shuffle_bytes_2103(), shuffle_bytes_2103_c(), sub_left_prediction_bgr32(), sub_left_prediction_rgb24(), subtitle_thread(), sws_scale(), vb_decode_framedata(), vmd_decode(), vmdvideo_decode_init(), vqa_decode_chunk(), xan_decode_frame(), yuv2rgb_1_c_template(), yuv2rgb_2_c_template(), yuv2rgb_write(), yuv2rgb_X_c_template(), and yuv_a_to_rgba().