diff mbox series

[FFmpeg-devel,04/13] avfilter/vf_elbg: Rename ELBGContext->ELBGFilterContext

Message ID AM7PR03MB6660C727951298B5ADBF7B808FDD9@AM7PR03MB6660.eurprd03.prod.outlook.com
State Accepted
Commit 8bfd466c9e5285ff214162c6798b202bdbf77ba6
Headers show
Series [FFmpeg-devel,01/13] avcodec/elbg: Remove avoidable buffer
Related show

Checks

Context Check Description
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished
andriy/make_ppc success Make finished
andriy/make_fate_ppc success Make fate finished

Commit Message

Andreas Rheinhardt Sept. 17, 2021, 2:07 a.m. UTC
The former name will be used for a context for avpriv_do_elbg().

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
 libavfilter/vf_elbg.c | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

Comments

Paul B Mahol Sept. 17, 2021, 6:50 a.m. UTC | #1
lgtm
diff mbox series

Patch

diff --git a/libavfilter/vf_elbg.c b/libavfilter/vf_elbg.c
index bf78030ffe..79797ee25f 100644
--- a/libavfilter/vf_elbg.c
+++ b/libavfilter/vf_elbg.c
@@ -33,7 +33,7 @@ 
 #include "internal.h"
 #include "video.h"
 
-typedef struct ELBGContext {
+typedef struct ELBGFilterContext {
     const AVClass *class;
     AVLFG lfg;
     int64_t lfg_seed;
@@ -46,9 +46,9 @@  typedef struct ELBGContext {
     const AVPixFmtDescriptor *pix_desc;
     uint8_t rgba_map[4];
     int pal8;
-} ELBGContext;
+} ELBGFilterContext;
 
-#define OFFSET(x) offsetof(ELBGContext, x)
+#define OFFSET(x) offsetof(ELBGFilterContext, x)
 #define FLAGS AV_OPT_FLAG_VIDEO_PARAM|AV_OPT_FLAG_FILTERING_PARAM
 
 static const AVOption elbg_options[] = {
@@ -66,7 +66,7 @@  AVFILTER_DEFINE_CLASS(elbg);
 
 static av_cold int init(AVFilterContext *ctx)
 {
-    ELBGContext *elbg = ctx->priv;
+    ELBGFilterContext *const elbg = ctx->priv;
 
     if (elbg->pal8 && elbg->codebook_length > 256) {
         av_log(ctx, AV_LOG_ERROR, "pal8 output allows max 256 codebook length.\n");
@@ -82,7 +82,7 @@  static av_cold int init(AVFilterContext *ctx)
 
 static int query_formats(AVFilterContext *ctx)
 {
-    ELBGContext *elbg = ctx->priv;
+    ELBGFilterContext *const elbg = ctx->priv;
     int ret;
 
     static const enum AVPixelFormat pix_fmts[] = {
@@ -109,7 +109,7 @@  static int query_formats(AVFilterContext *ctx)
 static int config_input(AVFilterLink *inlink)
 {
     AVFilterContext *ctx = inlink->dst;
-    ELBGContext *elbg = ctx->priv;
+    ELBGFilterContext *const elbg = ctx->priv;
 
     elbg->pix_desc = av_pix_fmt_desc_get(inlink->format);
     elbg->codeword_length = inlink->w * inlink->h;
@@ -140,7 +140,7 @@  static int config_input(AVFilterLink *inlink)
 
 static int filter_frame(AVFilterLink *inlink, AVFrame *frame)
 {
-    ELBGContext *elbg = inlink->dst->priv;
+    ELBGFilterContext *const elbg = inlink->dst->priv;
     int i, j, k;
     uint8_t *p, *p0;
 
@@ -221,7 +221,7 @@  static int filter_frame(AVFilterLink *inlink, AVFrame *frame)
 
 static av_cold void uninit(AVFilterContext *ctx)
 {
-    ELBGContext *elbg = ctx->priv;
+    ELBGFilterContext *const elbg = ctx->priv;
 
     av_freep(&elbg->codebook);
     av_freep(&elbg->codeword);
@@ -248,7 +248,7 @@  static const AVFilterPad elbg_outputs[] = {
 const AVFilter ff_vf_elbg = {
     .name          = "elbg",
     .description   = NULL_IF_CONFIG_SMALL("Apply posterize effect, using the ELBG algorithm."),
-    .priv_size     = sizeof(ELBGContext),
+    .priv_size     = sizeof(ELBGFilterContext),
     .priv_class    = &elbg_class,
     .query_formats = query_formats,
     .init          = init,