[FFmpeg-cvslog] avfilter/f_reverse: add missing S64(P) sample format support
Paul B Mahol
git at videolan.org
Sat Oct 2 19:51:32 EEST 2021
ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Sat Oct 2 17:50:14 2021 +0200| [db7bd99ebfa812076acb1f2eb04c1999877e4e0a] | committer: Paul B Mahol
avfilter/f_reverse: add missing S64(P) sample format support
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=db7bd99ebfa812076acb1f2eb04c1999877e4e0a
---
libavfilter/f_reverse.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/libavfilter/f_reverse.c b/libavfilter/f_reverse.c
index 0398aa9cb0..586d95c063 100644
--- a/libavfilter/f_reverse.c
+++ b/libavfilter/f_reverse.c
@@ -167,6 +167,12 @@ static void reverse_samples_planar(AVFrame *out)
FFSWAP(int32_t, dst[i], dst[j]);
}
break;
+ case AV_SAMPLE_FMT_S64P: {
+ int64_t *dst = (int64_t *)out->extended_data[p];
+ for (int i = 0, j = out->nb_samples - 1; i < j; i++, j--)
+ FFSWAP(int64_t, dst[i], dst[j]);
+ }
+ break;
case AV_SAMPLE_FMT_FLTP: {
float *dst = (float *)out->extended_data[p];
for (int i = 0, j = out->nb_samples - 1; i < j; i++, j--)
@@ -209,6 +215,13 @@ static void reverse_samples_packed(AVFrame *out)
FFSWAP(int32_t, dst[i * channels + p], dst[j * channels + p]);
}
break;
+ case AV_SAMPLE_FMT_S64: {
+ int64_t *dst = (int64_t *)out->extended_data[0];
+ for (int i = 0, j = out->nb_samples - 1; i < j; i++, j--)
+ for (int p = 0; p < channels; p++)
+ FFSWAP(int64_t, dst[i * channels + p], dst[j * channels + p]);
+ }
+ break;
case AV_SAMPLE_FMT_FLT: {
float *dst = (float *)out->extended_data[0];
for (int i = 0, j = out->nb_samples - 1; i < j; i++, j--)
More information about the ffmpeg-cvslog
mailing list