Go to the source code of this file.
◆ done()
| static void done |
( |
void * | state | ) |
|
|
static |
◆ filter()
Definition at line 76 of file grayscale.c.
77{
79
82 return in;
83 }
87 } else {
90 }
92
93 unsigned char *in_data = (
unsigned char *) in->
tiles[0].
data;
94 unsigned char *out_data = (
unsigned char *) out->
tiles[0].
data;
95
97 *out_data++ = 127;
98 in_data++;
99 *out_data++ = *in_data++;
100 }
101
103
104 return out;
105}
void vf_free(struct video_frame *buf)
Frees video_frame structure.
struct video_desc video_desc_from_frame(const struct video_frame *frame)
Returns struct video_desc from video frame.
void vf_data_deleter(struct video_frame *buf)
struct video_frame * vf_alloc_desc(struct video_desc desc)
Allocates video frame accordig given desc.
void log_msg(int level, const char *format,...)
#define LOG_LEVEL_WARNING
less severe errors
char * vo_pp_out_buffer
buffer to write to if we use vo_pp wrapper (otherwise unused)
char * data
Raw tile data. Pointer must be at least 4B aligned.
unsigned int data_len
length of the data
void(* data_deleter)(struct video_frame *)
void(* dispose)(struct video_frame *)
Struct video_frame represents a video frame and contains video description.
struct tile tiles[FLEXIBLE_ARRAY_MEMBER]
struct video_frame_callbacks callbacks
@ UYVY
YCbCr 422 8-bit - Cb Y0 Cr Y1.
#define VIDEO_FRAME_DISPOSE(frame)
References video_frame::callbacks, video_frame::color_spec, tile::data, video_frame_callbacks::data_deleter, tile::data_len, video_frame_callbacks::dispose, tile::height, LOG_LEVEL_WARNING, log_msg(), state, video_frame::tiles, UYVY, vf_alloc_desc(), vf_data_deleter(), vf_free(), video_desc_from_frame(), VIDEO_FRAME_DISPOSE, state_grayscale::vo_pp_out_buffer, and tile::width.
◆ init()
| static int init |
( |
struct module * | parent, |
|
|
const char * | cfg, |
|
|
void ** | state ) |
|
static |
◆ REGISTER_MODULE()
◆ vo_pp_set_out_buffer()
| static void vo_pp_set_out_buffer |
( |
void * | state, |
|
|
char * | buffer ) |
|
static |
◆ capture_filter_grayscale
Initial value:= {
}
static struct video_frame * filter(void *state, struct video_frame *in)
static void done(void *state)
static int init(struct module *parent, const char *cfg, void **state)
Definition at line 114 of file grayscale.c.