* Copyright (c) 2010 Nolan Lum <nol888@gmail.com>
* Copyright (c) 2009 Loren Merritt <lorenm@u.washignton.edu>
*
- * This file is part of FFmpeg.
+ * This file is part of Libav.
*
- * FFmpeg is free software; you can redistribute it and/or
+ * Libav is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
- * FFmpeg is distributed in the hope that it will be useful,
+ * Libav is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
- * License along with FFmpeg; if not, write to the Free Software
+ * License along with Libav; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
* Dither it back to 8bit.
*/
-#include "libavcore/imgutils.h"
+#include "libavutil/imgutils.h"
#include "libavutil/cpu.h"
#include "libavutil/pixdesc.h"
#include "avfilter.h"
+#include "formats.h"
#include "gradfun.h"
DECLARE_ALIGNED(16, static const uint16_t, dither)[8][8] = {
GradFunContext *gf = ctx->priv;
float thresh = 1.2;
int radius = 16;
- av_unused int cpu_flags = av_get_cpu_flags();
+ int cpu_flags = av_get_cpu_flags();
if (args)
sscanf(args, "%f:%d", &thresh, &radius);
PIX_FMT_NONE
};
- avfilter_set_common_formats(ctx, avfilter_make_format_list(pix_fmts));
+ ff_set_common_formats(ctx, ff_make_format_list(pix_fmts));
return 0;
}
avfilter_draw_slice(outlink, 0, inlink->h, 1);
avfilter_end_frame(outlink);
avfilter_unref_buffer(inpic);
- avfilter_unref_buffer(outpic);
+ if (outpic != inpic)
+ avfilter_unref_buffer(outpic);
}
AVFilter avfilter_vf_gradfun = {