From 4d6e35f434b6eca7a3384ff517c57cc8097395a3 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Tue, 12 Jul 2016 13:57:48 +0200 Subject: cfhd: drop some variables from the context They are only used locally in one function. --- libavcodec/cfhd.c | 9 +++++---- libavcodec/cfhd.h | 3 --- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/libavcodec/cfhd.c b/libavcodec/cfhd.c index f9ab950cfb..febb0c2b6b 100644 --- a/libavcodec/cfhd.c +++ b/libavcodec/cfhd.c @@ -173,6 +173,7 @@ static void free_buffers(CFHDContext *s) static int alloc_buffers(CFHDContext *s) { int i, j, ret, planes; + int chroma_x_shift, chroma_y_shift; unsigned k; if ((ret = ff_set_dimensions(s->avctx, s->coded_width, s->coded_height)) < 0) @@ -183,15 +184,15 @@ static int alloc_buffers(CFHDContext *s) s->avctx->pix_fmt = s->coded_format; if ((ret = av_pix_fmt_get_chroma_sub_sample(s->coded_format, - &s->chroma_x_shift, - &s->chroma_y_shift)) < 0) + &chroma_x_shift, + &chroma_y_shift)) < 0) return ret; planes = av_pix_fmt_count_planes(s->coded_format); for (i = 0; i < planes; i++) { int w8, h8, w4, h4, w2, h2; - int width = i ? s->coded_width >> s->chroma_x_shift : s->coded_width; - int height = i ? s->coded_height >> s->chroma_y_shift : s->coded_height; + int width = i ? s->coded_width >> chroma_x_shift : s->coded_width; + int height = i ? s->coded_height >> chroma_y_shift : s->coded_height; ptrdiff_t stride = FFALIGN(width / 8, 8) * 8; height = FFALIGN(height / 8, 2) * 8; s->plane[i].width = width; diff --git a/libavcodec/cfhd.h b/libavcodec/cfhd.h index 05d251132c..cae571a681 100644 --- a/libavcodec/cfhd.h +++ b/libavcodec/cfhd.h @@ -75,9 +75,6 @@ typedef struct CFHDContext { GetBitContext gb; - int chroma_x_shift; - int chroma_y_shift; - int coded_width; int coded_height; int cropped_height; -- cgit v1.2.3