Re: [FFmpeg-devel] [PATCH] Add a commandline option to control loop restoration for libaom

2020-01-17 Thread James Zern
On Fri, Jan 17, 2020 at 2:45 PM James Zern  wrote:
>
> On Mon, Dec 23, 2019 at 12:53 PM Wang Cao  wrote:
> >
> > Signed-off-by: Wang Cao 
> > ---
> >  doc/encoders.texi  | 3 +++
> >  libavcodec/libaomenc.c | 6 ++
> >  2 files changed, 9 insertions(+)
> >
>
> lgtm. sorry for losing track of this.
>

applied, thanks.

> > [...]
> > +if (ctx->enable_restoration >= 0)
> > +  codecctl_int(avctx, AV1E_SET_ENABLE_RESTORATION, 
> > ctx->enable_restoration);
>
> indent is 4, I fixed this locally.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Re: [FFmpeg-devel] [PATCH] Add a commandline option to control loop restoration for libaom

2020-01-17 Thread James Zern
On Mon, Dec 23, 2019 at 12:53 PM Wang Cao  wrote:
>
> Signed-off-by: Wang Cao 
> ---
>  doc/encoders.texi  | 3 +++
>  libavcodec/libaomenc.c | 6 ++
>  2 files changed, 9 insertions(+)
>

lgtm. sorry for losing track of this.

> [...]
> +if (ctx->enable_restoration >= 0)
> +  codecctl_int(avctx, AV1E_SET_ENABLE_RESTORATION, 
> ctx->enable_restoration);

indent is 4, I fixed this locally.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

[FFmpeg-devel] [PATCH] Add a commandline option to control loop restoration for libaom

2019-12-23 Thread Wang Cao
Signed-off-by: Wang Cao 
---
 doc/encoders.texi  | 3 +++
 libavcodec/libaomenc.c | 6 ++
 2 files changed, 9 insertions(+)

diff --git a/doc/encoders.texi b/doc/encoders.texi
index 4ee518a124..56b36c156b 100644
--- a/doc/encoders.texi
+++ b/doc/encoders.texi
@@ -1587,6 +1587,9 @@ Enable row based multi-threading. Disabled by default.
 Enable Constrained Directional Enhancement Filter. The libaom-av1
 encoder enables CDEF by default.
 
+@item enable-restoration (@emph{boolean})
+Enable Loop Restoration Filter. Default is true for libaom-av1.
+
 @item enable-global-motion (@emph{boolean})
 Enable the use of global motion for block prediction. Default is true.
 
diff --git a/libavcodec/libaomenc.c b/libavcodec/libaomenc.c
index e06697c1bf..41a250302d 100644
--- a/libavcodec/libaomenc.c
+++ b/libavcodec/libaomenc.c
@@ -92,6 +92,7 @@ typedef struct AOMEncoderContext {
 int enable_cdef;
 int enable_global_motion;
 int enable_intrabc;
+int enable_restoration;
 } AOMContext;
 
 static const char *const ctlidstr[] = {
@@ -110,6 +111,7 @@ static const char *const ctlidstr[] = {
 [AV1E_SET_SUPERBLOCK_SIZE]  = "AV1E_SET_SUPERBLOCK_SIZE",
 [AV1E_SET_TILE_COLUMNS] = "AV1E_SET_TILE_COLUMNS",
 [AV1E_SET_TILE_ROWS]= "AV1E_SET_TILE_ROWS",
+[AV1E_SET_ENABLE_RESTORATION] = "AV1E_SET_ENABLE_RESTORATION",
 #ifdef AOM_CTRL_AV1E_SET_ROW_MT
 [AV1E_SET_ROW_MT]   = "AV1E_SET_ROW_MT",
 #endif
@@ -688,6 +690,9 @@ static av_cold int aom_init(AVCodecContext *avctx,
 codecctl_int(avctx, AOME_SET_ARNR_STRENGTH,ctx->arnr_strength);
 if (ctx->enable_cdef >= 0)
 codecctl_int(avctx, AV1E_SET_ENABLE_CDEF, ctx->enable_cdef);
+if (ctx->enable_restoration >= 0)
+  codecctl_int(avctx, AV1E_SET_ENABLE_RESTORATION, 
ctx->enable_restoration);
+
 codecctl_int(avctx, AOME_SET_STATIC_THRESHOLD, ctx->static_thresh);
 if (ctx->crf >= 0)
 codecctl_int(avctx, AOME_SET_CQ_LEVEL,  ctx->crf);
@@ -1084,6 +1089,7 @@ static const AVOption options[] = {
 { "enable-cdef",  "Enable CDEF filtering", 
OFFSET(enable_cdef),AV_OPT_TYPE_BOOL, {.i64 = -1}, -1, 1, VE},
 { "enable-global-motion",  "Enable global motion", 
OFFSET(enable_global_motion), AV_OPT_TYPE_BOOL, {.i64 = -1}, -1, 1, VE},
 { "enable-intrabc",  "Enable intra block copy prediction mode", 
OFFSET(enable_intrabc), AV_OPT_TYPE_BOOL, {.i64 = -1}, -1, 1, VE},
+{ "enable-restoration",  "Enable Loop Restoration filtering",  
   OFFSET(enable_restoration),AV_OPT_TYPE_BOOL, {.i64 = -1}, -1, 1, VE},
 { NULL },
 };
 
-- 
2.24.1.735.g03f4e72817-goog

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Re: [FFmpeg-devel] [PATCH] Add a commandline option to control loop restoration for libaom

2019-12-20 Thread James Zern
On Wed, Dec 18, 2019 at 7:25 PM Wang Cao  wrote:
>
> Signed-off-by: Wang Cao 
> ---
>  libavcodec/libaomenc.c | 6 ++

Can you update doc/encoders.texi with this detail please?
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

[FFmpeg-devel] [PATCH] Add a commandline option to control loop restoration for libaom

2019-12-18 Thread Wang Cao
Signed-off-by: Wang Cao 
---
 libavcodec/libaomenc.c | 6 ++
 1 file changed, 6 insertions(+)

diff --git a/libavcodec/libaomenc.c b/libavcodec/libaomenc.c
index e06697c1bf..41a250302d 100644
--- a/libavcodec/libaomenc.c
+++ b/libavcodec/libaomenc.c
@@ -92,6 +92,7 @@ typedef struct AOMEncoderContext {
 int enable_cdef;
 int enable_global_motion;
 int enable_intrabc;
+int enable_restoration;
 } AOMContext;
 
 static const char *const ctlidstr[] = {
@@ -110,6 +111,7 @@ static const char *const ctlidstr[] = {
 [AV1E_SET_SUPERBLOCK_SIZE]  = "AV1E_SET_SUPERBLOCK_SIZE",
 [AV1E_SET_TILE_COLUMNS] = "AV1E_SET_TILE_COLUMNS",
 [AV1E_SET_TILE_ROWS]= "AV1E_SET_TILE_ROWS",
+[AV1E_SET_ENABLE_RESTORATION] = "AV1E_SET_ENABLE_RESTORATION",
 #ifdef AOM_CTRL_AV1E_SET_ROW_MT
 [AV1E_SET_ROW_MT]   = "AV1E_SET_ROW_MT",
 #endif
@@ -688,6 +690,9 @@ static av_cold int aom_init(AVCodecContext *avctx,
 codecctl_int(avctx, AOME_SET_ARNR_STRENGTH,ctx->arnr_strength);
 if (ctx->enable_cdef >= 0)
 codecctl_int(avctx, AV1E_SET_ENABLE_CDEF, ctx->enable_cdef);
+if (ctx->enable_restoration >= 0)
+  codecctl_int(avctx, AV1E_SET_ENABLE_RESTORATION, 
ctx->enable_restoration);
+
 codecctl_int(avctx, AOME_SET_STATIC_THRESHOLD, ctx->static_thresh);
 if (ctx->crf >= 0)
 codecctl_int(avctx, AOME_SET_CQ_LEVEL,  ctx->crf);
@@ -1084,6 +1089,7 @@ static const AVOption options[] = {
 { "enable-cdef",  "Enable CDEF filtering", 
OFFSET(enable_cdef),AV_OPT_TYPE_BOOL, {.i64 = -1}, -1, 1, VE},
 { "enable-global-motion",  "Enable global motion", 
OFFSET(enable_global_motion), AV_OPT_TYPE_BOOL, {.i64 = -1}, -1, 1, VE},
 { "enable-intrabc",  "Enable intra block copy prediction mode", 
OFFSET(enable_intrabc), AV_OPT_TYPE_BOOL, {.i64 = -1}, -1, 1, VE},
+{ "enable-restoration",  "Enable Loop Restoration filtering",  
   OFFSET(enable_restoration),AV_OPT_TYPE_BOOL, {.i64 = -1}, -1, 1, VE},
 { NULL },
 };
 
-- 
2.24.1.735.g03f4e72817-goog

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".