#include "libavutil/pixdesc.h"
#include "libavutil/intreadwrite.h"
#include "avfilter.h"
#include "formats.h"
#include "video.h"
Go to the source code of this file.
Data Structures | |
| struct | Super2xSaIContext |
Defines | |
| #define | GET_RESULT(A, B, C, D) ((A != C || A != D) - (B != C || B != D)) |
| #define | INTERPOLATE(A, B) (((A & hi_pixel_mask) >> 1) + ((B & hi_pixel_mask) >> 1) + (A & B & lo_pixel_mask)) |
| #define | Q_INTERPOLATE(A, B, C, D) |
| #define | READ_COLOR4(dst, src_line, off) dst = *((const uint32_t *)src_line + off) |
| #define | READ_COLOR3(dst, src_line, off) dst = AV_RL24 (src_line + 3*off) |
| #define | READ_COLOR2(dst, src_line, off) dst = sai->is_be ? AV_RB16(src_line + 2 * off) : AV_RL16(src_line + 2 * off) |
Functions | |
| static void | super2xsai (AVFilterContext *ctx, uint8_t *src, int src_linesize, uint8_t *dst, int dst_linesize, int width, int height) |
| static int | query_formats (AVFilterContext *ctx) |
| static int | config_input (AVFilterLink *inlink) |
| static int | config_output (AVFilterLink *outlink) |
| static int | null_draw_slice (AVFilterLink *inlink, int y, int h, int slice_dir) |
| static int | end_frame (AVFilterLink *inlink) |
Variables | |
| AVFilter | avfilter_vf_super2xsai |
Definition in file vf_super2xsai.c.
| #define GET_RESULT | ( | A, | |||
| B, | |||||
| C, | |||||
| D | ) | ((A != C || A != D) - (B != C || B != D)) |
| #define INTERPOLATE | ( | A, | |||
| B | ) | (((A & hi_pixel_mask) >> 1) + ((B & hi_pixel_mask) >> 1) + (A & B & lo_pixel_mask)) |
Definition at line 50 of file vf_super2xsai.c.
| #define Q_INTERPOLATE | ( | A, | |||
| B, | |||||
| C, | |||||
| D | ) |
Value:
((A & q_hi_pixel_mask) >> 2) + ((B & q_hi_pixel_mask) >> 2) + ((C & q_hi_pixel_mask) >> 2) + ((D & q_hi_pixel_mask) >> 2) \ + ((((A & q_lo_pixel_mask) + (B & q_lo_pixel_mask) + (C & q_lo_pixel_mask) + (D & q_lo_pixel_mask)) >> 2) & q_lo_pixel_mask)
Definition at line 52 of file vf_super2xsai.c.
Referenced by super2xsai().
| #define READ_COLOR2 | ( | dst, | |||
| src_line, | |||||
| off | ) | dst = sai->is_be ? AV_RB16(src_line + 2 * off) : AV_RL16(src_line + 2 * off) |
Referenced by super2xsai().
Referenced by super2xsai().
Referenced by super2xsai().
| static int config_input | ( | AVFilterLink * | inlink | ) | [static] |
Definition at line 247 of file vf_super2xsai.c.
| static int config_output | ( | AVFilterLink * | outlink | ) | [static] |
Definition at line 291 of file vf_super2xsai.c.
| static int end_frame | ( | AVFilterLink * | inlink | ) | [static] |
Definition at line 307 of file vf_super2xsai.c.
| static int null_draw_slice | ( | AVFilterLink * | inlink, | |
| int | y, | |||
| int | h, | |||
| int | slice_dir | |||
| ) | [static] |
Definition at line 305 of file vf_super2xsai.c.
| static int query_formats | ( | AVFilterContext * | ctx | ) | [static] |
Definition at line 233 of file vf_super2xsai.c.
| static void super2xsai | ( | AVFilterContext * | ctx, | |
| uint8_t * | src, | |||
| int | src_linesize, | |||
| uint8_t * | dst, | |||
| int | dst_linesize, | |||
| int | width, | |||
| int | height | |||
| ) | [static] |
Definition at line 55 of file vf_super2xsai.c.
Referenced by avfilter_register_all(), and end_frame().
Initial value:
{
.name = "super2xsai",
.description = NULL_IF_CONFIG_SMALL("Scale the input by 2x using the Super2xSaI pixel art algorithm."),
.priv_size = sizeof(Super2xSaIContext),
.query_formats = query_formats,
.inputs = (const AVFilterPad[]) {
{ .name = "default",
.type = AVMEDIA_TYPE_VIDEO,
.config_props = config_input,
.draw_slice = null_draw_slice,
.end_frame = end_frame,
.min_perms = AV_PERM_READ },
{ .name = NULL }
},
.outputs = (const AVFilterPad[]) {
{ .name = "default",
.type = AVMEDIA_TYPE_VIDEO,
.config_props = config_output },
{ .name = NULL }
},
}
Definition at line 321 of file vf_super2xsai.c.
1.5.8