AV1 RT: Change LF control values Change the numerical values for LF control to align them with CDEF control No change in perf or BDRate Change-Id: I7e16a619e61557b8b184df21dafade55cb75a4bf
diff --git a/aom/aomcx.h b/aom/aomcx.h index 4bfb9bc..a83470b 100644 --- a/aom/aomcx.h +++ b/aom/aomcx.h
@@ -1386,10 +1386,10 @@ /*!\brief Codec control to control loop filter * - * - 0 = Loop filter is enabled for all frames - * - 1 = Loop filter is disabled for non-reference frames - * - 2 = Loop filter is disabled for the frames with low motion - * - 3 = Loop filter is disabled for all frames + * - 0 = Loop filter is disabled for all frames + * - 1 = Loop filter is enabled for all frames + * - 2 = Loop filter is disabled for non-reference frames + * - 3 = Loop filter is disabled for the frames with low motion */ AV1E_SET_LOOPFILTER_CONTROL = 149,
diff --git a/av1/arg_defs.c b/av1/arg_defs.c index 6469bbb..3b8c075 100644 --- a/av1/arg_defs.c +++ b/av1/arg_defs.c
@@ -634,13 +634,12 @@ "If false, transforms always have the largest possible size " "(0: false, 1: true (default))"), - .loopfilter_control = - ARG_DEF(NULL, "loopfilter-control", 1, - "Control loop filtering " - "(0: Loopfilter enabled for all frames (default), 1: Disable " - "loopfilter for non-reference frames, " - "2: Disable loopfilter for low-motion frames, 3: Disable " - "loopfilter for all frames)"), + .loopfilter_control = ARG_DEF( + NULL, "loopfilter-control", 1, + "Control loop filtering " + "(0: Loopfilter disabled for all frames, 1: Enable " + "loopfilter for all frames (default), 2: Disable loopfilter for " + "non-reference frames, 3: Disable loopfilter for frames with low motion"), .two_pass_input = ARG_DEF(NULL, "two-pass-input", 1,
diff --git a/av1/encoder/encoder.h b/av1/encoder/encoder.h index fdf24c8..dff62c0 100644 --- a/av1/encoder/encoder.h +++ b/av1/encoder/encoder.h
@@ -227,11 +227,11 @@ * \brief This enum controls to which frames loopfilter is applied. */ typedef enum { - LOOPFILTER_ALL = 0, /*!< Enable loopfilter for all frames. */ - LOOPFILTER_REFERENCE = 1, /*!< Disable loopfilter on non reference frames. */ + LOOPFILTER_NONE = 0, /*!< Disable loopfilter on all frames. */ + LOOPFILTER_ALL = 1, /*!< Enable loopfilter for all frames. */ + LOOPFILTER_REFERENCE = 2, /*!< Disable loopfilter on non reference frames. */ LOOPFILTER_SELECTIVELY = - 2, /*!< Disable loopfilter on frames with low motion. */ - LOOPFILTER_NONE = 3, /*!< Disable loopfilter on all frames. */ + 3, /*!< Disable loopfilter on frames with low motion. */ } LOOPFILTER_CONTROL; /*! @@ -833,10 +833,10 @@ /*! * Controls loop filtering - * 0: Loop filter is enabled for all frames - * 1: Loop filter is disabled for non-reference frames - * 2: Loop filter is disables for the frames with low motion - * 3: Loop filter is disabled for all frames + * 0: Loop filter is disabled for all frames + * 1: Loop filter is enabled for all frames + * 2: Loop filter is disabled for non-reference frames + * 3: Loop filter is disables for the frames with low motion */ LOOPFILTER_CONTROL loopfilter_control; } AlgoCfg;
diff --git a/examples/svc_encoder_rtc.c b/examples/svc_encoder_rtc.c index 2271232..ac1238d 100644 --- a/examples/svc_encoder_rtc.c +++ b/examples/svc_encoder_rtc.c
@@ -1248,7 +1248,7 @@ aom_codec_control(&codec, AV1E_SET_AQ_MODE, app_input.aq_mode ? 3 : 0); aom_codec_control(&codec, AV1E_SET_GF_CBR_BOOST_PCT, 0); aom_codec_control(&codec, AV1E_SET_ENABLE_CDEF, 2); - aom_codec_control(&codec, AV1E_SET_LOOPFILTER_CONTROL, 1); + aom_codec_control(&codec, AV1E_SET_LOOPFILTER_CONTROL, 2); aom_codec_control(&codec, AV1E_SET_ENABLE_WARPED_MOTION, 0); aom_codec_control(&codec, AV1E_SET_ENABLE_OBMC, 0); aom_codec_control(&codec, AV1E_SET_ENABLE_GLOBAL_MOTION, 0);
diff --git a/test/loopfilter_control_test.cc b/test/loopfilter_control_test.cc index 19b48c5..f604326 100644 --- a/test/loopfilter_control_test.cc +++ b/test/loopfilter_control_test.cc
@@ -31,20 +31,20 @@ std::unordered_map<std::string, std::unordered_map<int, std::unordered_map<int, double>>> kPsnrThreshold = { { "park_joy_90p_8_420.y4m", - { { 0, { { 0, 35.1 }, { 3, 36.1 } } }, + { { 0, { { 0, 35.0 }, { 3, 36.0 } } }, { 1, { { 0, 35.1 }, { 3, 36.1 } } }, { 2, { { 0, 35.1 }, { 3, 36.1 } } }, - { 3, { { 0, 35.0 }, { 3, 36.0 } } } } }, + { 3, { { 0, 35.1 }, { 3, 36.1 } } } } }, { "paris_352_288_30.y4m", - { { 0, { { 0, 35.50 }, { 3, 36.0 } } }, + { { 0, { { 0, 35.40 }, { 3, 36.0 } } }, { 1, { { 0, 35.50 }, { 3, 36.0 } } }, { 2, { { 0, 35.50 }, { 3, 36.0 } } }, - { 3, { { 0, 35.40 }, { 3, 36.0 } } } } }, + { 3, { { 0, 35.50 }, { 3, 36.0 } } } } }, { "niklas_1280_720_30.y4m", - { { 0, { { 0, 33.57 }, { 3, 33.22 } } }, + { { 0, { { 0, 33.20 }, { 3, 32.90 } } }, { 1, { { 0, 33.57 }, { 3, 33.22 } } }, - { 2, { { 0, 33.45 }, { 3, 33.10 } } }, - { 3, { { 0, 33.20 }, { 3, 32.90 } } } } } }; + { 2, { { 0, 33.57 }, { 3, 33.22 } } }, + { 3, { { 0, 33.45 }, { 3, 33.10 } } } } } }; typedef struct { const char *filename;