[FFmpeg-devel] [PATCH] lavfi: Port mp=pp7 to libavfilter
arwa arif
arwaarif1994 at gmail.com
Thu Dec 25 17:20:03 CET 2014
> +#include "libavutil/avassert.h"
> +#include "libavutil/imgutils.h"
> +#include "libavutil/opt.h"
> +#include "libavutil/pixdesc.h"
> +#include "internal.h"
> +#include "libavcodec/avcodec.h" //for reference to FF_QSCALE_TYPE
> +#include "vf_pp7.h"
> +
> +enum mode {
> + MODE_HARD,
> + MODE_SOFT,
> + MODE_MEDIUM
> +};
> +
> +#define OFFSET(x) offsetof(PP7Context, x)
> +#define FLAGS AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_VIDEO_PARAM
> +static const AVOption pp7_options[] = {
> + { "qp", "force a constant quantizer parameter", OFFSET(qp),
AV_OPT_TYPE_INT, {.i64 = 0}, 0, 64, FLAGS },
> + { "mode", "set thresholding mode", OFFSET(mode), AV_OPT_TYPE_INT,
{.i64 = MODE_MEDIUM}, 0, 2, FLAGS, "mode" },
> + { "hard", "hard thresholding", 0, AV_OPT_TYPE_CONST, {.i64 =
MODE_HARD}, INT_MIN, INT_MAX, FLAGS, "mode" },
> + { "soft", "soft thresholding", 0, AV_OPT_TYPE_CONST, {.i64 =
MODE_SOFT}, INT_MIN, INT_MAX, FLAGS, "mode" },
> + { "medium", "medium thresholding", 0, AV_OPT_TYPE_CONST, {.i64 =
MODE_MEDIUM}, INT_MIN, INT_MAX, FLAGS, "mode" },
> + { "use_bframe_qp", "use B-frames' QP", OFFSET(use_bframe_qp),
AV_OPT_TYPE_INT, {.i64 = 0}, 0, 1, FLAGS },
This parameter is not present in the original code, mention this in
the log (alternatively you could add it in a separate commit).
Which log should I mention it in?
...]
> +static int query_formats(AVFilterContext *ctx)
> +{
> + static const enum PixelFormat pix_fmts[] = {
> + AV_PIX_FMT_YUV444P, AV_PIX_FMT_YUV422P,
> + AV_PIX_FMT_YUV420P, AV_PIX_FMT_YUV411P,
> + AV_PIX_FMT_YUV410P, AV_PIX_FMT_YUV440P,
> + AV_PIX_FMT_YUVJ444P, AV_PIX_FMT_YUVJ422P,
> + AV_PIX_FMT_YUVJ420P, AV_PIX_FMT_YUVJ440P,
> + AV_PIX_FMT_NONE
> + };
> + ff_set_common_formats(ctx, ff_make_format_list(pix_fmts));
> + return 0;
> +}
Check that these are supported. Also the original is supporting some
more formats (for example GRAY8 == Y8).
How do I check it?
Updated the patch.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-lavfi-port-mp-pp7-to-avfilter.patch
Type: text/x-patch
Size: 26959 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20141225/26d97af4/attachment.bin>
More information about the ffmpeg-devel
mailing list