Go to the source code of this file.
◆ SHUFFLE_HORIZONTAL
#define SHUFFLE_HORIZONTAL |
( |
|
name, |
|
|
|
type |
|
) |
| |
Value:
int jobnr, int nb_jobs) \
{ \
ShufflePixelsContext *
s =
ctx->priv; \
for (
int p = 0; p <
s->nb_planes; p++) { \
const
int slice_start = (
s->planeheight[p] * jobnr) / nb_jobs; \
const
int slice_end = (
s->planeheight[p] * (jobnr+1)) / nb_jobs; \
type *dst = (
type *)(
out->data[p] + slice_start *
out->linesize[p]); \
slice_start *
in->linesize[p]); \
for (
int x = 0; x <
s->planewidth[p]; x++) { \
} \
\
dst +=
out->linesize[p] /
sizeof(
type); \
src +=
in->linesize[p] /
sizeof(
type); \
} \
} \
\
return 0; \
}
Definition at line 204 of file vf_shufflepixels.c.
◆ SHUFFLE_VERTICAL
Value:
int jobnr, int nb_jobs) \
{ \
ShufflePixelsContext *
s =
ctx->priv; \
for (
int p = 0; p <
s->nb_planes; p++) { \
const
int slice_start = (
s->planeheight[p] * jobnr) / nb_jobs; \
const
int slice_end = (
s->planeheight[p] * (jobnr+1)) / nb_jobs; \
type *dst = (
type *)(
out->data[p] + slice_start *
out->linesize[p]); \
map[y] *
in->linesize[p]); \
\
memcpy(dst,
src,
s->linesize[p]); \
dst +=
out->linesize[p] /
sizeof(
type); \
} \
} \
\
return 0; \
}
Definition at line 237 of file vf_shufflepixels.c.
◆ SHUFFLE_BLOCK
Value:
int jobnr, int nb_jobs) \
{ \
ShufflePixelsContext *
s =
ctx->priv; \
for (
int p = 0; p <
s->nb_planes; p++) { \
const
int slice_start = (
s->planeheight[p] * jobnr) / nb_jobs; \
const
int slice_end = (
s->planeheight[p] * (jobnr+1)) / nb_jobs; \
type *dst = (
type *)(
out->data[p] + slice_start *
out->linesize[p]); \
const int32_t *
map =
s->map + slice_start *
s->planewidth[p]; \
\
for (
int x = 0; x <
s->planewidth[p]; x++) { \
int ymap =
map[x] /
s->planewidth[p]; \
int xmap =
map[x] %
s->planewidth[p]; \
\
dst[x] =
src[xmap + ymap *
in->linesize[p] /
sizeof(
type)]; \
} \
\
dst +=
out->linesize[p] /
sizeof(
type); \
map +=
s->planewidth[p]; \
} \
} \
\
return 0; \
}
Definition at line 267 of file vf_shufflepixels.c.
◆ OFFSET
◆ FLAGS
◆ query_formats()
◆ make_horizontal_map()
◆ make_vertical_map()
◆ make_block_map()
◆ config_output()
◆ filter_frame()
◆ uninit()
◆ AVFILTER_DEFINE_CLASS()
AVFILTER_DEFINE_CLASS |
( |
shufflepixels |
| ) |
|
◆ shufflepixels_options
◆ shufflepixels_inputs
◆ shufflepixels_outputs
◆ ff_vf_shufflepixels
Initial value:= {
.name = "shufflepixels",
.priv_class = &shufflepixels_class,
}
Definition at line 446 of file vf_shufflepixels.c.
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)\n", len, av_get_sample_fmt_name(ac->in_fmt), av_get_sample_fmt_name(ac->out_fmt));return ff_convert_dither(ac-> in
const VDPAUPixFmtMap * map