Commit f88d5df3 authored by Michael Niedermayer's avatar Michael Niedermayer

vf_drawtext: cosmetics to reduce diff to qatar

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 297422b3
...@@ -30,8 +30,8 @@ ...@@ -30,8 +30,8 @@
#include <time.h> #include <time.h>
#include "libavutil/colorspace.h" #include "libavutil/colorspace.h"
#include "libavutil/eval.h"
#include "libavutil/file.h" #include "libavutil/file.h"
#include "libavutil/eval.h"
#include "libavutil/opt.h" #include "libavutil/opt.h"
#include "libavutil/parseutils.h" #include "libavutil/parseutils.h"
#include "libavutil/pixdesc.h" #include "libavutil/pixdesc.h"
...@@ -101,9 +101,6 @@ typedef struct { ...@@ -101,9 +101,6 @@ typedef struct {
char *textfile; ///< file with text to be drawn char *textfile; ///< file with text to be drawn
int x; ///< x position to start drawing text int x; ///< x position to start drawing text
int y; ///< y position to start drawing text int y; ///< y position to start drawing text
char *x_expr; ///< expression for x position
char *y_expr; ///< expression for y position
AVExpr *x_pexpr, *y_pexpr; ///< parsed expressions for x and y
int max_glyph_w; ///< max glyph width int max_glyph_w; ///< max glyph width
int max_glyph_h; ///< max glyph heigth int max_glyph_h; ///< max glyph heigth
int shadowx, shadowy; int shadowx, shadowy;
...@@ -130,6 +127,9 @@ typedef struct { ...@@ -130,6 +127,9 @@ typedef struct {
int pixel_step[4]; ///< distance in bytes between the component of each pixel int pixel_step[4]; ///< distance in bytes between the component of each pixel
uint8_t rgba_map[4]; ///< map RGBA offsets to the positions in the packed RGBA format uint8_t rgba_map[4]; ///< map RGBA offsets to the positions in the packed RGBA format
uint8_t *box_line[4]; ///< line used for filling the box background uint8_t *box_line[4]; ///< line used for filling the box background
char *x_expr; ///< expression for x position
char *y_expr; ///< expression for y position
AVExpr *x_pexpr, *y_pexpr; ///< parsed expressions for x and y
int64_t basetime; ///< base pts time in the real world for display int64_t basetime; ///< base pts time in the real world for display
double var_values[VAR_VARS_NB]; double var_values[VAR_VARS_NB];
} DrawTextContext; } DrawTextContext;
...@@ -423,10 +423,15 @@ static av_cold void uninit(AVFilterContext *ctx) ...@@ -423,10 +423,15 @@ static av_cold void uninit(AVFilterContext *ctx)
} }
} }
static inline int is_newline(uint32_t c)
{
return (c == '\n' || c == '\r' || c == '\f' || c == '\v');
}
static int config_input(AVFilterLink *inlink) static int config_input(AVFilterLink *inlink)
{ {
AVFilterContext *ctx = inlink->dst; AVFilterContext *ctx = inlink->dst;
DrawTextContext *dtext = inlink->dst->priv; DrawTextContext *dtext = ctx->priv;
const AVPixFmtDescriptor *pix_desc = &av_pix_fmt_descriptors[inlink->format]; const AVPixFmtDescriptor *pix_desc = &av_pix_fmt_descriptors[inlink->format];
int ret; int ret;
...@@ -592,11 +597,6 @@ static inline void drawbox(AVFilterBufferRef *picref, int x, int y, ...@@ -592,11 +597,6 @@ static inline void drawbox(AVFilterBufferRef *picref, int x, int y,
} }
} }
static inline int is_newline(uint32_t c)
{
return (c == '\n' || c == '\r' || c == '\f' || c == '\v');
}
static int draw_glyphs(DrawTextContext *dtext, AVFilterBufferRef *picref, static int draw_glyphs(DrawTextContext *dtext, AVFilterBufferRef *picref,
int width, int height, const uint8_t rgbcolor[4], const uint8_t yuvcolor[4], int x, int y) int width, int height, const uint8_t rgbcolor[4], const uint8_t yuvcolor[4], int x, int y)
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment