diff options
author | Paul B Mahol <onemda@gmail.com> | 2019-09-16 18:16:57 +0200 |
---|---|---|
committer | Paul B Mahol <onemda@gmail.com> | 2019-09-16 18:43:11 +0200 |
commit | 05ffaa252ee89d1f21a140b995b162a6f68da0fa (patch) | |
tree | cae5d55646237de5ebab579c1af3406657205092 /libavfilter/v360.h | |
parent | a09213da23e7f580bcc455db4e7b527816f5ddf5 (diff) | |
download | ffmpeg-05ffaa252ee89d1f21a140b995b162a6f68da0fa.tar.gz |
avfilter/vf_v360: refactor creation of remap data
Diffstat (limited to 'libavfilter/v360.h')
-rw-r--r-- | libavfilter/v360.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/libavfilter/v360.h b/libavfilter/v360.h index 24e4615c1c..a15ff7dbc4 100644 --- a/libavfilter/v360.h +++ b/libavfilter/v360.h @@ -85,6 +85,12 @@ enum RotationOrder { NB_RORDERS, }; +typedef struct XYRemap { + uint16_t u[4][4]; + uint16_t v[4][4]; + float ker[4][4]; +} XYRemap; + typedef struct V360Context { const AVClass *class; int in, out; @@ -130,11 +136,23 @@ typedef struct V360Context { int uv_linesize[4]; int nb_planes; int nb_allocated; + int elements; uint16_t *u[4], *v[4]; int16_t *ker[4]; unsigned map[4]; + void (*in_transform)(const struct V360Context *s, + const float *vec, int width, int height, + uint16_t us[4][4], uint16_t vs[4][4], float *du, float *dv); + + void (*out_transform)(const struct V360Context *s, + int i, int j, int width, int height, + float *vec); + + void (*calculate_kernel)(float du, float dv, const XYRemap *rmap, + uint16_t *u, uint16_t *v, int16_t *ker); + int (*remap_slice)(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs); void (*remap_line)(uint8_t *dst, int width, const uint8_t *src, ptrdiff_t in_linesize, |