diff mbox series

[FFmpeg-devel,2/2] avcodec/photocd: Remove set-but-unused variables

Message ID 20200904194905.6269-2-andreas.rheinhardt@gmail.com
State Accepted
Commit 38ee8f80ea341c9d3fb2f6e20bcc0d714f6eed8e
Headers show
Series [FFmpeg-devel,1/2] avcodec/mobiclip: Fix mixed declarations and code | expand

Checks

Context Check Description
andriy/default pending
andriy/make success Make finished
andriy/make_fate success Make fate finished

Commit Message

Andreas Rheinhardt Sept. 4, 2020, 7:49 p.m. UTC
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
---
 libavcodec/photocd.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

Comments

Paul B Mahol Sept. 4, 2020, 8 p.m. UTC | #1
On 9/4/20, Andreas Rheinhardt <andreas.rheinhardt@gmail.com> wrote:
> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
> ---
>  libavcodec/photocd.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
>

ok

> diff --git a/libavcodec/photocd.c b/libavcodec/photocd.c
> index 6f8426b5d2..057c9d33d4 100644
> --- a/libavcodec/photocd.c
> +++ b/libavcodec/photocd.c
> @@ -227,9 +227,9 @@ static av_noinline int decode_huff(AVCodecContext
> *avctx, AVFrame *frame,
>      PhotoCDContext *s = avctx->priv_data;
>      GetBitContext g;
>      GetByteContext *gb = &s->gb;
> -    int ret, y = 0, type, height, y2;
> +    int ret, y = 0, type, height;
>      int start = s->streampos;
> -    unsigned shiftreg, bit;
> +    unsigned shiftreg;
>      const int scaling = target_res - curr_res;
>      const uint8_t type2idx[] = { 0, 0xff, 1, 2 };
>
> @@ -239,13 +239,11 @@ static av_noinline int decode_huff(AVCodecContext
> *avctx, AVFrame *frame,
>          return ret;
>
>      height = img_info[curr_res].height;
> -    y2 = avctx->height >> scaling;
>
>      while (y < height) {
>          uint8_t *data;
>          int x2, idx;
>
> -        bit = 0;
>          for (; get_bits_left(&g) > 0;) {
>              if ((show_bits(&g, 24) & 0xfff000) == 0xfff000)
>                  break;
> --
> 2.20.1
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
diff mbox series

Patch

diff --git a/libavcodec/photocd.c b/libavcodec/photocd.c
index 6f8426b5d2..057c9d33d4 100644
--- a/libavcodec/photocd.c
+++ b/libavcodec/photocd.c
@@ -227,9 +227,9 @@  static av_noinline int decode_huff(AVCodecContext *avctx, AVFrame *frame,
     PhotoCDContext *s = avctx->priv_data;
     GetBitContext g;
     GetByteContext *gb = &s->gb;
-    int ret, y = 0, type, height, y2;
+    int ret, y = 0, type, height;
     int start = s->streampos;
-    unsigned shiftreg, bit;
+    unsigned shiftreg;
     const int scaling = target_res - curr_res;
     const uint8_t type2idx[] = { 0, 0xff, 1, 2 };
 
@@ -239,13 +239,11 @@  static av_noinline int decode_huff(AVCodecContext *avctx, AVFrame *frame,
         return ret;
 
     height = img_info[curr_res].height;
-    y2 = avctx->height >> scaling;
 
     while (y < height) {
         uint8_t *data;
         int x2, idx;
 
-        bit = 0;
         for (; get_bits_left(&g) > 0;) {
             if ((show_bits(&g, 24) & 0xfff000) == 0xfff000)
                 break;