56 #define OFFSET(x) offsetof(DatascopeContext, x) 57 #define FLAGS AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_VIDEO_PARAM 58 #define FLAGSR AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_VIDEO_PARAM|AV_OPT_FLAG_RUNTIME_PARAM 85 int x0,
int y0,
const uint8_t *text,
int vertical)
89 for (; *text; text++) {
111 color->
rgba[3] = 255;
114 for (i = 0; i < 4; i++) {
120 color->
comp[p].
u8[0] = value[p];
129 color->
rgba[3] = 255;
132 for (i = 0; i < 4; i++) {
138 color->
comp[p].
u16[0] = value[p];
147 reverse->
rgba[3] = 255;
149 reverse->
comp[p].
u8[0] = color->
comp[p].
u8[0] > 127 ? 0 : 255;
150 reverse->
comp[p].
u8[1] = color->
comp[p].
u8[1] > 127 ? 0 : 255;
151 reverse->
comp[p].
u8[2] = color->
comp[p].
u8[2] > 127 ? 0 : 255;
159 reverse->
rgba[3] = 255;
162 const unsigned mid = (max + 1) / 2;
183 const int xoff = td->
xoff;
184 const int yoff = td->
yoff;
188 const int W = (outlink->
w - xoff) / (C * 10);
189 const int H = (outlink->
h - yoff) / (P * 12);
190 const char *
format[4] = {
"%02X\n",
"%04X\n",
"%03d\n",
"%05d\n"};
191 const int slice_start = (W * jobnr) / nb_jobs;
192 const int slice_end = (W * (jobnr+1)) / nb_jobs;
195 for (y = 0; y < H && (y + s->
y < inlink->
h); y++) {
196 for (x = slice_start; x < slice_end && (x + s->
x < inlink->
w); x++) {
199 int value[4] = { 0 };
204 xoff + x * C * 10, yoff + y * P * 12, C * 10, P * 12);
206 for (p = 0; p <
P; p++) {
209 snprintf(text,
sizeof(text), format[D], value[p]);
210 draw_text(&s->
draw, out, &reverse, xoff + x * C * 10 + 2, yoff + y * P * 12 + p * 10 + 2, text, 0);
226 const int xoff = td->
xoff;
227 const int yoff = td->
yoff;
231 const int W = (outlink->
w - xoff) / (C * 10);
232 const int H = (outlink->
h - yoff) / (P * 12);
233 const char *
format[4] = {
"%02X\n",
"%04X\n",
"%03d\n",
"%05d\n"};
234 const int slice_start = (W * jobnr) / nb_jobs;
235 const int slice_end = (W * (jobnr+1)) / nb_jobs;
238 for (y = 0; y < H && (y + s->
y < inlink->
h); y++) {
239 for (x = slice_start; x < slice_end && (x + s->
x < inlink->
w); x++) {
241 int value[4] = { 0 };
245 for (p = 0; p <
P; p++) {
248 snprintf(text,
sizeof(text), format[D], value[p]);
249 draw_text(&s->
draw, out, &color, xoff + x * C * 10 + 2, yoff + y * P * 12 + p * 10 + 2, text, 0);
265 const int xoff = td->
xoff;
266 const int yoff = td->
yoff;
270 const int W = (outlink->
w - xoff) / (C * 10);
271 const int H = (outlink->
h - yoff) / (P * 12);
272 const char *
format[4] = {
"%02X\n",
"%04X\n",
"%03d\n",
"%05d\n"};
273 const int slice_start = (W * jobnr) / nb_jobs;
274 const int slice_end = (W * (jobnr+1)) / nb_jobs;
277 for (y = 0; y < H && (y + s->
y < inlink->
h); y++) {
278 for (x = slice_start; x < slice_end && (x + s->
x < inlink->
w); x++) {
280 int value[4] = { 0 };
283 for (p = 0; p <
P; p++) {
286 snprintf(text,
sizeof(text), format[D], value[p]);
287 draw_text(&s->
draw, out, &s->
white, xoff + x * C * 10 + 2, yoff + y * P * 12 + p * 10 + 2, text, 0);
313 0, 0, outlink->
w, outlink->
h);
318 int Y = outlink->
h / (P * 12);
319 int X = outlink->
w / (C * 10);
320 char text[256] = { 0 };
323 snprintf(text,
sizeof(text),
"%d", s->
y + Y);
324 ymaxlen = strlen(text);
326 snprintf(text,
sizeof(text),
"%d", s->
x + X);
327 xmaxlen = strlen(text);
330 Y = (outlink->
h - xmaxlen) / (P * 12);
331 X = (outlink->
w - ymaxlen) / (C * 10);
333 for (y = 0; y <
Y; y++) {
334 snprintf(text,
sizeof(text),
"%d", s->
y + y);
337 0, xmaxlen + y * P * 12 + (P + 1) * P - 2, ymaxlen, 10);
342 for (x = 0; x <
X; x++) {
343 snprintf(text,
sizeof(text),
"%d", s->
x + x);
346 ymaxlen + x * C * 10 + 2 * C - 2, 0, 10, xmaxlen);
424 .priv_class = &datascope_class,
455 uint16_t values[4][80][80];
460 #define POFFSET(x) offsetof(PixscopeContext, x) 513 if (inlink->
w < 640 || inlink->
h < 480) {
520 s->
x = s->
xpos * (inlink->
w - 1);
521 s->
y = s->
ypos * (inlink->
h - 1);
522 if (s->
x + s->
w >= inlink->
w || s->
y + s->
h >= inlink->
h) {
531 #define SQR(x) ((x)*(x)) 539 int max[4] = { 0 },
min[4] = { INT_MAX, INT_MAX, INT_MAX, INT_MAX };
540 float average[4] = { 0 };
541 double std[4] = { 0 }, rms[4] = { 0 };
542 const char rgba[4] = {
'R',
'G',
'B',
'A' };
543 const char yuva[4] = {
'Y',
'U',
'V',
'A' };
569 if (s->
x + s->
w >= X && (s->
x + s->
w <= X + s->
ww) &&
570 s->
y + s->
h >= Y && (s->
y + s->
h <= Y + s->
wh)) {
576 if (s->
x + s->
w >= X && (s->
x + s->
w <= X + s->
ww) &&
577 s->
y + s->
h >= Y && (s->
y + s->
h <= Y + s->
wh)) {
589 for (y = 0; y < s->
h; y++) {
590 for (x = 0; x < s->
w; x++) {
592 int value[4] = { 0 };
596 x * w + (s->
ww - 4 - (s->
w * w)) / 2 + X, y * h + 2 + Y, w, h);
597 for (i = 0; i < 4; i++) {
599 rms[
i] += (double)value[i] * (
double)value[
i];
600 average[
i] += value[
i];
602 max[
i] =
FFMAX(max[i], value[i]);
609 s->
x - 2, s->
y - 2, s->
w + 4, 1);
613 s->
x - 1, s->
y - 1, s->
w + 2, 1);
617 s->
x - 1, s->
y - 1, 1, s->
h + 2);
621 s->
x - 2, s->
y - 2, 1, s->
h + 4);
625 s->
x - 1, s->
y + 1 + s->
h, s->
w + 3, 1);
629 s->
x - 2, s->
y + 2 + s->
h, s->
w + 4, 1);
633 s->
x + 1 + s->
w, s->
y - 1, 1, s->
h + 2);
637 s->
x + 2 + s->
w, s->
y - 2, 1, s->
h + 5);
639 for (i = 0; i < 4; i++) {
640 rms[
i] /= s->
w * s->
h;
641 rms[
i] = sqrt(rms[i]);
642 average[
i] /= s->
w * s->
h;
645 for (y = 0; y < s->
h; y++) {
646 for (x = 0; x < s->
w; x++) {
647 for (i = 0; i < 4; i++)
648 std[i] +=
SQR(s->
values[i][x][y] - average[i]);
652 for (i = 0; i < 4; i++) {
653 std[
i] /= s->
w * s->
h;
654 std[
i] = sqrt(std[i]);
657 snprintf(text,
sizeof(text),
"CH AVG MIN MAX RMS\n");
662 snprintf(text,
sizeof(text),
"%c %07.1f %05d %05d %07.1f\n", s->
is_rgb ? rgba[i] : yuva[i], average[c],
min[c], max[c], rms[c]);
665 snprintf(text,
sizeof(text),
"CH STD\n");
670 snprintf(text,
sizeof(text),
"%c %07.2f\n", s->
is_rgb ? rgba[i] : yuva[i], std[c]);
700 .priv_class = &pixscope_class,
702 .inputs = pixscope_inputs,
703 .outputs = pixscope_outputs,
753 #define OOFFSET(x) offsetof(OscilloscopeContext, x) 784 int dx =
FFABS(x1 - x0), sx = x0 < x1 ? 1 : -1;
785 int dy =
FFABS(y1 - y0), sy = y0 < y1 ? 1 : -1;
786 int err = (dx > dy ? dx : -dy) / 2, e2;
790 if (x0 >= 0 && y0 >= 0 && x0 < out->
width && y0 < out->
height) {
794 for (i = 0; i < 4; i++) {
802 for (i = 0; i < 4; i++) {
812 if (x0 == x1 && y0 == y1)
876 size =
hypot(inlink->
w, inlink->
h);
879 cx = s->
xpos * (inlink->
w - 1);
880 cy = s->
ypos * (inlink->
h - 1);
881 s->
x1 = cx - size / 2.0 * cos(tilt);
882 s->
x2 = cx + size / 2.0 * cos(tilt);
883 s->
y1 = cy - size / 2.0 * sin(tilt);
884 s->
y2 = cy + size / 2.0 * sin(tilt);
933 size =
hypot(inlink->
w, inlink->
h);
947 int dx =
FFABS(x1 - x0), sx = x0 < x1 ? 1 : -1;
948 int dy =
FFABS(y1 - y0), sy = y0 < y1 ? 1 : -1;
949 int err = (dx > dy ? dx : -dy) / 2, e2;
952 if (x0 >= 0 && y0 >= 0 && x0 < out->
width && y0 < out->
height) {
954 int value[4] = { 0 };
986 if (x0 == x1 && y0 == y1)
1008 float average[4] = { 0 };
1010 int min[4] = { INT_MAX, INT_MAX, INT_MAX, INT_MAX };
1019 if (s->
grid && outlink->
h >= 10) {
1023 for (i = 1; i < 5; i++) {
1028 for (i = 0; i < 10; i++) {
1040 for (c = 0; c < s->
nb_comps; c++) {
1048 for (c = 0; c < s->
nb_comps; c++) {
1053 for (c = 0, i = 0; c < s->
nb_comps; c++) {
1055 const char rgba[4] = {
'R',
'G',
'B',
'A' };
1056 const char yuva[4] = {
'Y',
'U',
'V',
'A' };
1059 snprintf(text,
sizeof(text),
"%c avg:%.1f min:%d max:%d\n", s->
is_rgb ? rgba[c] : yuva[c], average[c], min[c], max[c]);
1069 char *res,
int res_len,
int flags)
1088 .needs_writable = 1,
1102 .
name =
"oscilloscope",
1105 .priv_class = &oscilloscope_class,
1108 .inputs = oscilloscope_inputs,
1109 .outputs = oscilloscope_outputs,
int64_t frame_count_in
Number of past frames sent through the link.
AVFilterFormats * ff_draw_supported_pixel_formats(unsigned flags)
Return the list of pixel formats supported by the draw functions.
static const char * format[]
This structure describes decoded (raw) audio or video data.
static const AVOption pixscope_options[]
#define AV_LOG_WARNING
Something somehow does not look correct.
int av_pix_fmt_count_planes(enum AVPixelFormat pix_fmt)
Main libavfilter public API header.
int h
agreed upon image height
void(* draw_trace)(struct OscilloscopeContext *s, AVFrame *frame)
static int filter_color2(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs)
AVFrame * ff_get_video_buffer(AVFilterLink *link, int w, int h)
Request a picture buffer with a specific set of permissions.
void * av_calloc(size_t nmemb, size_t size)
Non-inlined equivalent of av_mallocz_array().
static int filter_mono(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs)
#define AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC
Some filters support a generic "enable" expression option that can be used to enable or disable a fil...
const char * name
Pad name.
AVFilterLink ** inputs
array of pointers to input links
int ff_filter_frame(AVFilterLink *link, AVFrame *frame)
Send a frame of data to the next filter.
AVComponentDescriptor comp[4]
Parameters that describe how pixels are packed.
static void pick_color16(FFDrawContext *draw, FFDrawColor *color, AVFrame *in, int x, int y, int *value)
static void pick_color8(FFDrawContext *draw, FFDrawColor *color, AVFrame *in, int x, int y, int *value)
static av_cold int uninit(AVCodecContext *avctx)
void(* reverse_color)(FFDrawContext *draw, FFDrawColor *color, FFDrawColor *reverse)
static const uint32_t color[16+AV_CLASS_CATEGORY_NB]
static uint32_t reverse(uint32_t num, int bits)
static int filter_color(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs)
int64_t pts
Presentation timestamp in time_base units (time when frame should be shown to user).
void(* pick_color)(FFDrawContext *draw, FFDrawColor *color, AVFrame *in, int x, int y, int *value)
void(* pick_color)(FFDrawContext *draw, FFDrawColor *color, AVFrame *in, int x, int y, int *value)
static const AVFilterPad inputs[]
union FFDrawColor::@204 comp[MAX_PLANES]
A filter pad used for either input or output.
A link between two filters.
static const AVOption datascope_options[]
static void draw_trace16(OscilloscopeContext *s, AVFrame *frame)
#define i(width, name, range_min, range_max)
static void draw_trace8(OscilloscopeContext *s, AVFrame *frame)
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
const uint8_t avpriv_cga_font[2048]
#define AV_PIX_FMT_FLAG_RGB
The pixel format contains RGB-like data (as opposed to YUV/grayscale).
void av_frame_free(AVFrame **frame)
Free the frame and any dynamically allocated objects in it, e.g.
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
int ff_filter_process_command(AVFilterContext *ctx, const char *cmd, const char *arg, char *res, int res_len, int flags)
Generic processing of user supplied commands that are set in the same way as the filter options...
void * priv
private data for use by the filter
#define AVFILTER_FLAG_SLICE_THREADS
The filter supports multithreading by splitting frames into multiple parts and processing them concur...
void ff_draw_color(FFDrawContext *draw, FFDrawColor *color, const uint8_t rgba[4])
Prepare a color.
simple assert() macros that are a bit more flexible than ISO C assert().
static const AVFilterPad oscilloscope_inputs[]
static const AVFilterPad oscilloscope_outputs[]
static void reverse_color16(FFDrawContext *draw, FFDrawColor *color, FFDrawColor *reverse)
int av_frame_copy(AVFrame *dst, const AVFrame *src)
Copy the frame data from src to dst.
int w
agreed upon image width
static void oscilloscope_uninit(AVFilterContext *ctx)
uint64_t flags
Combination of AV_PIX_FMT_FLAG_...
static void update_oscilloscope(AVFilterContext *ctx)
static av_const double hypot(double x, double y)
uint8_t nb_components
The number of components each pixel has, (1-4)
int(* filter)(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs)
int ff_filter_get_nb_threads(AVFilterContext *ctx)
Get number of threads for current filter instance.
static int filter_frame(AVFilterLink *inlink, AVFrame *in)
static int config_input(AVFilterLink *inlink)
static int query_formats(AVFilterContext *ctx)
#define FFABS(a)
Absolute value, Note, INT_MIN / INT64_MIN result in undefined behavior as they are not representable ...
AVFilter ff_vf_oscilloscope
AVFilterContext * src
source filter
void(* pick_color)(FFDrawContext *draw, FFDrawColor *color, AVFrame *in, int x, int y, int *value)
int format
agreed upon media format
int ff_fill_rgba_map(uint8_t *rgba_map, enum AVPixelFormat pix_fmt)
AVFILTER_DEFINE_CLASS(datascope)
void ff_blend_mask(FFDrawContext *draw, FFDrawColor *color, uint8_t *dst[], int dst_linesize[], int dst_w, int dst_h, const uint8_t *mask, int mask_linesize, int mask_w, int mask_h, int l2depth, unsigned endianness, int x0, int y0)
Blend an alpha mask with an uniform color.
static const AVFilterPad outputs[]
static int oscilloscope_process_command(AVFilterContext *ctx, const char *cmd, const char *args, char *res, int res_len, int flags)
typedef void(RENAME(mix_any_func_type))
Used for passing data between threads.
int linesize[AV_NUM_DATA_POINTERS]
For video, size in bytes of each picture line.
static const AVOption oscilloscope_options[]
static void draw_text(FFDrawContext *draw, AVFrame *frame, FFDrawColor *color, int x0, int y0, const uint8_t *text, int vertical)
static const int16_t alpha[]
uint8_t pi<< 24) CONV_FUNC_GROUP(AV_SAMPLE_FMT_FLT, float, AV_SAMPLE_FMT_U8, uint8_t,(*(const uint8_t *) pi - 0x80) *(1.0f/(1<< 7))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_DBL, double, AV_SAMPLE_FMT_U8, uint8_t,(*(const uint8_t *) pi - 0x80) *(1.0/(1<< 7))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_S16, int16_t,(*(const int16_t *) pi >> 8)+0x80) CONV_FUNC_GROUP(AV_SAMPLE_FMT_FLT, float, AV_SAMPLE_FMT_S16, int16_t, *(const int16_t *) pi *(1.0f/(1<< 15))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_DBL, double, AV_SAMPLE_FMT_S16, int16_t, *(const int16_t *) pi *(1.0/(1<< 15))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_S32, int32_t,(*(const int32_t *) pi >> 24)+0x80) CONV_FUNC_GROUP(AV_SAMPLE_FMT_FLT, float, AV_SAMPLE_FMT_S32, int32_t, *(const int32_t *) pi *(1.0f/(1U<< 31))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_DBL, double, AV_SAMPLE_FMT_S32, int32_t, *(const int32_t *) pi *(1.0/(1U<< 31))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_FLT, float, av_clip_uint8(lrintf(*(const float *) pi *(1<< 7))+0x80)) CONV_FUNC_GROUP(AV_SAMPLE_FMT_S16, int16_t, AV_SAMPLE_FMT_FLT, float, av_clip_int16(lrintf(*(const float *) pi *(1<< 15)))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_S32, int32_t, AV_SAMPLE_FMT_FLT, float, av_clipl_int32(llrintf(*(const float *) pi *(1U<< 31)))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_DBL, double, av_clip_uint8(lrint(*(const double *) pi *(1<< 7))+0x80)) CONV_FUNC_GROUP(AV_SAMPLE_FMT_S16, int16_t, AV_SAMPLE_FMT_DBL, double, av_clip_int16(lrint(*(const double *) pi *(1<< 15)))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_S32, int32_t, AV_SAMPLE_FMT_DBL, double, av_clipl_int32(llrint(*(const double *) pi *(1U<< 31)))) #define SET_CONV_FUNC_GROUP(ofmt, ifmt) static void set_generic_function(AudioConvert *ac) { } void ff_audio_convert_free(AudioConvert **ac) { if(! *ac) return;ff_dither_free(&(*ac) ->dc);av_freep(ac);} AudioConvert *ff_audio_convert_alloc(AVAudioResampleContext *avr, enum AVSampleFormat out_fmt, enum AVSampleFormat in_fmt, int channels, int sample_rate, int apply_map) { AudioConvert *ac;int in_planar, out_planar;ac=av_mallocz(sizeof(*ac));if(!ac) return NULL;ac->avr=avr;ac->out_fmt=out_fmt;ac->in_fmt=in_fmt;ac->channels=channels;ac->apply_map=apply_map;if(avr->dither_method !=AV_RESAMPLE_DITHER_NONE &&av_get_packed_sample_fmt(out_fmt)==AV_SAMPLE_FMT_S16 &&av_get_bytes_per_sample(in_fmt) > 2) { ac->dc=ff_dither_alloc(avr, out_fmt, in_fmt, channels, sample_rate, apply_map);if(!ac->dc) { av_free(ac);return NULL;} return ac;} in_planar=ff_sample_fmt_is_planar(in_fmt, channels);out_planar=ff_sample_fmt_is_planar(out_fmt, channels);if(in_planar==out_planar) { ac->func_type=CONV_FUNC_TYPE_FLAT;ac->planes=in_planar ? ac->channels :1;} else if(in_planar) ac->func_type=CONV_FUNC_TYPE_INTERLEAVE;else ac->func_type=CONV_FUNC_TYPE_DEINTERLEAVE;set_generic_function(ac);if(ARCH_AARCH64) ff_audio_convert_init_aarch64(ac);if(ARCH_ARM) ff_audio_convert_init_arm(ac);if(ARCH_X86) ff_audio_convert_init_x86(ac);return ac;} int ff_audio_convert(AudioConvert *ac, AudioData *out, AudioData *in) { int use_generic=1;int len=in->nb_samples;int p;if(ac->dc) { av_log(ac->avr, AV_LOG_TRACE, "%d samples - audio_convert: %s to %s (dithered)\", len, av_get_sample_fmt_name(ac->in_fmt), av_get_sample_fmt_name(ac->out_fmt));return ff_convert_dither(ac-> in
static int pixscope_filter_frame(AVFilterLink *inlink, AVFrame *in)
Describe the class of an AVClass context structure.
Rational number (pair of numerator and denominator).
void ff_blend_rectangle(FFDrawContext *draw, FFDrawColor *color, uint8_t *dst[], int dst_linesize[], int dst_w, int dst_h, int x0, int y0, int w, int h)
Blend a rectangle with an uniform color.
const char * name
Filter name.
int ff_draw_init(FFDrawContext *draw, enum AVPixelFormat format, unsigned flags)
Init a draw context.
AVRational sample_aspect_ratio
agreed upon sample aspect ratio
offset must point to two consecutive integers
AVFilterLink ** outputs
array of pointers to output links
#define flags(name, subs,...)
AVFilterInternal * internal
An opaque struct for libavfilter internal use.
uint8_t * data[AV_NUM_DATA_POINTERS]
pointer to the picture/channel planes.
static void draw_scope(OscilloscopeContext *s, int x0, int y0, int x1, int y1, AVFrame *out, PixelValues *p, int state)
static int config_output(AVFilterLink *outlink)
static int oscilloscope_filter_frame(AVFilterLink *inlink, AVFrame *frame)
static int pixscope_config_input(AVFilterLink *inlink)
avfilter_execute_func * execute
static int slice_end(AVCodecContext *avctx, AVFrame *pict)
Handle slice ends.
uint16_t values[4][80][80]
AVFilterContext * dst
dest filter
static const AVFilterPad pixscope_outputs[]
int pixelstep[MAX_PLANES]
const struct AVPixFmtDescriptor * desc
void ff_fill_rectangle(FFDrawContext *draw, FFDrawColor *color, uint8_t *dst[], int dst_linesize[], int dst_x, int dst_y, int w, int h)
Fill a rectangle with an uniform color.
static int process_command(AVFilterContext *ctx, const char *cmd, const char *args, char *res, int res_len, int flags)
static void draw_line(FFDrawContext *draw, int x0, int y0, int x1, int y1, AVFrame *out, FFDrawColor *color)
static int oscilloscope_config_input(AVFilterLink *inlink)
int depth
Number of bits in the component.
static const AVFilterPad pixscope_inputs[]
mode
Use these values in ebur128_init (or'ed).
int av_frame_copy_props(AVFrame *dst, const AVFrame *src)
Copy only "metadata" fields from src to dst.
CGA/EGA/VGA ROM font data.
static void reverse_color8(FFDrawContext *draw, FFDrawColor *color, FFDrawColor *reverse)