Skip to content

Commit

Permalink
change ratio to 1..2 from 1..4
Browse files Browse the repository at this point in the history
Signed-off-by: Liang <[email protected]>
  • Loading branch information
xiaoxial committed Nov 21, 2023
1 parent 80634df commit 684625d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ ffmpeg -init_hw_device vaapi=va -init_hw_device opencl=ocl@va -hwaccel vaapi -hw
`./ffmpeg -h filter=raisr`

raisr AVOptions:
ratio <float> ..FV....... ratio of the upscaling, between 1 and 4 (from 1 to 4) (default 2)
ratio <float> ..FV....... ratio of the upscaling, between 1 and 2 (default 2)
bits <int> ..FV....... bit depth (from 8 to 10) (default 8)
range <string> ..FV....... color range of the input. If you are working with images, you may want to set range to full (video/full) (default video)
threadcount <int> ..FV....... thread count (from 1 to 120) (default 20)
Expand Down
4 changes: 2 additions & 2 deletions ffmpeg/vf_raisr.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
#include <unistd.h>

#define MIN_RATIO 1
#define MAX_RATIO 4
#define MAX_RATIO 2
#define DEFAULT_RATIO 2

#define MIN_THREADCOUNT 1
Expand Down Expand Up @@ -78,7 +78,7 @@ typedef struct RaisrContext
#define OFFSET(x) offsetof(RaisrContext, x)
#define FLAGS AV_OPT_FLAG_FILTERING_PARAM | AV_OPT_FLAG_VIDEO_PARAM
static const AVOption raisr_options[] = {
{"ratio", "ratio of the upscaling, between 1 and 4", OFFSET(ratio), AV_OPT_TYPE_FLOAT, {.dbl = DEFAULT_RATIO}, MIN_RATIO, MAX_RATIO, FLAGS},
{"ratio", "ratio of the upscaling, between 1 and 2", OFFSET(ratio), AV_OPT_TYPE_FLOAT, {.dbl = DEFAULT_RATIO}, MIN_RATIO, MAX_RATIO, FLAGS},
{"bits", "bit depth", OFFSET(bits), AV_OPT_TYPE_INT, {.i64 = 8}, 8, 10, FLAGS},
{"range", "input color range", OFFSET(range), AV_OPT_TYPE_STRING, {.str = "video"}, 0, 0, FLAGS},
{"threadcount", "thread count", OFFSET(threadcount), AV_OPT_TYPE_INT, {.i64 = DEFAULT_THREADCOUNT}, MIN_THREADCOUNT, MAX_THREADCOUNT, FLAGS},
Expand Down
4 changes: 2 additions & 2 deletions ffmpeg/vf_raisr_opencl.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
#include "libavutil/pixdesc.h"

#define MIN_RATIO 1
#define MAX_RATIO 4
#define MAX_RATIO 2
#define DEFAULT_RATIO 2

typedef struct RaisrOpenCLContext {
Expand Down Expand Up @@ -212,7 +212,7 @@ static av_cold void raisr_opencl_uninit(AVFilterContext *avctx)
#define OFFSET(x) offsetof(RaisrOpenCLContext, x)
#define FLAGS (AV_OPT_FLAG_FILTERING_PARAM | AV_OPT_FLAG_VIDEO_PARAM)
static const AVOption raisr_opencl_options[] = {
{"ratio", "ratio (currently only ratio of 2 is supported)", OFFSET(ratio),
{"ratio", "ratio of the upscaling, between 1 and 2", OFFSET(ratio),
AV_OPT_TYPE_FLOAT, {.dbl = DEFAULT_RATIO}, MIN_RATIO, MAX_RATIO, FLAGS},
{"bits", "bit depth", OFFSET(bits), AV_OPT_TYPE_INT, {.i64 = 8}, 8, 10, FLAGS},
{"range", "input color range", OFFSET(range), AV_OPT_TYPE_INT, {.i64 = VideoRange}, VideoRange, FullRange, FLAGS, "range"},
Expand Down

0 comments on commit 684625d

Please sign in to comment.