22#define RGB2YUV( R, G, B ) \
23 ((0.257 * R) + (0.504 * G) + (0.098 * B) + 16), \
24 (-(0.148 * R) - (0.291 * G) + (0.439 * B) + 128),\
25 ((0.439 * R) - (0.368 * G) - (0.071 * B) + 128)
27#define HEX2YUV( rgb ) \
28 RGB2YUV( (rgb >> 16), ((rgb & 0xFF00) >> 8), (rgb & 0xFF) )
32 uint32_t argb1, uint32_t argb2 )
34 for( uint8_t i = 0; i<i_splits; i++ )
36 uint32_t rgb1 = argb1 & 0x00FFFFFF;
37 uint32_t rgb2 = argb2 & 0x00FFFFFF;
39 uint32_t r = ((((rgb1 >> 16) * (i_splits - i)) + (rgb2 >> 16) * i)) / i_splits;
40 uint32_t g = (((((rgb1 >> 8) & 0xFF) * (i_splits - i)) + ((rgb2 >> 8) & 0xFF) * i)) / i_splits;
41 uint32_t b = ((((rgb1 & 0xFF) * (i_splits - i)) + (rgb2 & 0xFF) * i)) / i_splits;
51 const int i_split =
p->i_visible_lines / i_splits;
52 const int i_left =
p->i_visible_lines % i_splits +
p->i_lines -
p->i_visible_lines;
53 for(
int i = 0; i<i_splits; i++ )
55 memset( &
p->p_pixels[
p->i_pitch * (i * i_split)],
57 p->i_pitch * i_split );
59 memset( &
p->p_pixels[
p->i_pitch * (i_splits - 1) * i_split],
61 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_New(const video_format_t *p_fmt)
This function will create a new subpicture region.
Definition: subpicture.c:240
void image_HandlerDelete(image_handler_t *p_image)
Delete the image_handler_t instance.
Definition: image.c:116
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:60
picture_t * p_picture
picture comprising this region
Definition: vlc_subpicture.h:62
int i_entries
number of in-use palette entries
Definition: vlc_es.h:45
uint8_t palette[256][4]
4-byte RGBA/YUVA palette
Definition: vlc_es.h:46
Definition: messages.c:85
VLC object common members.
Definition: vlc_objects.h:45
struct vlc_logger * logger
Definition: vlc_objects.h:46
bool no_interact
Definition: vlc_objects.h:52
This file defines functions and structures for image conversions in vlc.
#define image_HandlerCreate(a)
Definition: vlc_image.h:65
#define image_ReadUrl(a, b, c)
Definition: vlc_image.h:69
#define RGB2YUV(R, G, B)
Definition: vout_spuregion_helper.h:22
static void spuregion_CreateVGradientPalette(video_palette_t *p_palette, uint8_t i_splits, uint32_t argb1, uint32_t argb2)
Definition: vout_spuregion_helper.h:31
static void spuregion_CreateVGradientFill(plane_t *p, uint8_t i_splits)
Definition: vout_spuregion_helper.h:49
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:66