On 9/11/2015 3:03 PM, Paul B Mahol wrote: > Dana 11. 9. 2015. 17:52 osoba "James Almer" <jamr...@gmail.com> napisala je: >> >> On 9/11/2015 12:24 PM, Paul B Mahol wrote: >>> Signed-off-by: Paul B Mahol <one...@gmail.com> >>> --- >>> libavfilter/vf_framerate.c | 281 > ++++++++++++++++++++++++++++++++++----------- >>> 1 file changed, 212 insertions(+), 69 deletions(-) >>> >>> diff --git a/libavfilter/vf_framerate.c b/libavfilter/vf_framerate.c >>> index 5c9da19..4d8ee16 100644 >>> --- a/libavfilter/vf_framerate.c >>> +++ b/libavfilter/vf_framerate.c >>> @@ -72,6 +72,12 @@ typedef struct FrameRateContext { >>> AVFrame *srce[N_SRCE]; ///< buffered source frames >>> int64_t srce_pts_dest[N_SRCE]; ///< pts for source frames > scaled to output timebase >>> int64_t pts; ///< pts of frame we are > working on >>> + >>> + int (*blend_frames)(AVFilterContext *ctx, float interpolate, >>> + AVFrame *copy_src1, AVFrame *copy_src2); >>> + int max; >>> + int bitdepth; >>> + AVFrame *work; >>> } FrameRateContext; >>> >>> #define OFFSET(x) offsetof(FrameRateContext, x) >>> @@ -114,6 +120,59 @@ static void next_source(AVFilterContext *ctx) >>> s->srce[s->frst] = NULL; >>> } >>> >>> +static av_always_inline int64_t sad_8x8_16(const uint16_t *src1, > ptrdiff_t stride1, >>> + const uint16_t *src2, > ptrdiff_t stride2) >>> +{ >>> + int sum = 0; >>> + int x, y; >>> + >>> + for (y = 0; y < 8; y++) { >>> + for (x = 0; x < 8; x++) >>> + sum += FFABS(src1[x] - src2[x]); >>> + src1 += stride1; >>> + src2 += stride2; >>> + } >>> + return sum; >>> +} >> >> Use libavutil/pixelutils instead. It was made specifically for cases like > this. > > It have 16 bit version?
Ah, apparently it doesn't. Nevermind then. _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel