23#define RGB2YUV( R, G, B ) \
24 ((0.257 * R) + (0.504 * G) + (0.098 * B) + 16), \
25 (-(0.148 * R) - (0.291 * G) + (0.439 * B) + 128),\
26 ((0.439 * R) - (0.368 * G) - (0.071 * B) + 128)
28#define HEX2YUV( rgb ) \
29 RGB2YUV( (rgb >> 16), ((rgb & 0xFF00) >> 8), (rgb & 0xFF) )
33 uint32_t argb1, uint32_t argb2 )
35 for( uint8_t i = 0; i<i_splits; i++ )
37 uint32_t rgb1 = argb1 & 0x00FFFFFF;
38 uint32_t rgb2 = argb2 & 0x00FFFFFF;
40 uint32_t r = ((((rgb1 >> 16) * (i_splits - i)) + (rgb2 >> 16) * i)) / i_splits;
41 uint32_t g = (((((rgb1 >> 8) & 0xFF) * (i_splits - i)) + ((rgb2 >> 8) & 0xFF) * i)) / i_splits;
42 uint32_t b = ((((rgb1 & 0xFF) * (i_splits - i)) + (rgb2 & 0xFF) * i)) / i_splits;
52 const int i_split =
p->i_visible_lines / i_splits;
53 const int i_left =
p->i_visible_lines % i_splits +
p->i_lines -
p->i_visible_lines;
54 for(
int i = 0; i<i_splits; i++ )
56 memset( &
p->p_pixels[
p->i_pitch * (i * i_split)],
58 p->i_pitch * i_split );
60 memset( &
p->p_pixels[
p->i_pitch * (i_splits - 1) * i_split],
62 p->i_pitch * i_left );
static void picture_Release(picture_t *picture)
Decrements the picture reference count.
Definition vlc_picture.h:374
subpicture_region_t * subpicture_region_ForPicture(const video_format_t *p_fmt, picture_t *pic)
Create a subpicture region containing the picture.
Definition subpicture.c:289
void image_HandlerDelete(image_handler_t *p_image)
Delete the image_handler_t instance.
Definition image.c:119
Definition fourcc_gen.c:52
Definition vlc_image.h:40
Video picture.
Definition vlc_picture.h:130
Description of a planar graphic field.
Definition vlc_picture.h:50
Video subtitle region.
Definition vlc_subpicture.h:72
int i_entries
number of in-use palette entries
Definition vlc_es.h:46
uint8_t palette[256][4]
4-byte RGBA/YUVA palette
Definition vlc_es.h:47
VLC object common members.
Definition vlc_objects.h:53
struct vlc_logger * logger
Definition vlc_objects.h:54
bool no_interact
Definition vlc_objects.h:60
This file defines functions and structures for image conversions in vlc.
#define image_HandlerCreate(a)
Definition vlc_image.h:67
#define image_ReadUrl(a, b, c)
Definition vlc_image.h:71
#define RGB2YUV(R, G, B)
Definition vout_spuregion_helper.h:23
static void spuregion_CreateVGradientPalette(video_palette_t *p_palette, uint8_t i_splits, uint32_t argb1, uint32_t argb2)
Definition vout_spuregion_helper.h:32
static void spuregion_CreateVGradientFill(plane_t *p, uint8_t i_splits)
Definition vout_spuregion_helper.h:50
static subpicture_region_t * spuregion_CreateFromPicture(vlc_object_t *p_this, video_format_t *p_fmt, const char *psz_uri)
Definition vout_spuregion_helper.h:67