Message ID | 20231211014429.1841681-4-u@pkh.me |
---|---|
State | Accepted |
Commit | e940baa65bcbdf86466fd5a8c7504caa7c1a9ec1 |
Headers | show |
Series | [FFmpeg-devel,01/35] avcodec/proresenc_kostya: remove an unnecessary parenthesis level in MAKE_CODE() macro | expand |
Context | Check | Description |
---|---|---|
yinshiyou/make_loongarch64 | success | Make finished |
yinshiyou/make_fate_loongarch64 | success | Make fate finished |
andriy/make_x86 | success | Make finished |
andriy/make_fate_x86 | success | Make fate finished |
On date Monday 2023-12-11 02:35:04 +0100, Clément Bœsch wrote: > This is already assigned at declaration. > --- > libavcodec/proresenc_kostya.c | 2 -- > 1 file changed, 2 deletions(-) > > diff --git a/libavcodec/proresenc_kostya.c b/libavcodec/proresenc_kostya.c > index 7aed3974c3..6e1d5a0cef 100644 > --- a/libavcodec/proresenc_kostya.c > +++ b/libavcodec/proresenc_kostya.c > @@ -440,7 +440,6 @@ static void encode_dcs(PutBitContext *pb, int16_t *blocks, > prev_dc = (blocks[0] - 0x4000) / scale; > encode_vlc_codeword(pb, FIRST_DC_CB, MAKE_CODE(prev_dc)); > sign = 0; > - codebook = 3; > blocks += 64; > > for (i = 1; i < blocks_per_slice; i++, blocks += 64) { > @@ -676,7 +675,6 @@ static int estimate_dcs(int *error, int16_t *blocks, int blocks_per_slice, > prev_dc = (blocks[0] - 0x4000) / scale; > bits = estimate_vlc(FIRST_DC_CB, MAKE_CODE(prev_dc)); > sign = 0; > - codebook = 3; > blocks += 64; > *error += FFABS(blocks[0] - 0x4000) % scale; Since this is the only value assigned with declaration, maybe it's better to drop the codebook = 3 in the assignment, but LGTM anyway.
diff --git a/libavcodec/proresenc_kostya.c b/libavcodec/proresenc_kostya.c index 7aed3974c3..6e1d5a0cef 100644 --- a/libavcodec/proresenc_kostya.c +++ b/libavcodec/proresenc_kostya.c @@ -440,7 +440,6 @@ static void encode_dcs(PutBitContext *pb, int16_t *blocks, prev_dc = (blocks[0] - 0x4000) / scale; encode_vlc_codeword(pb, FIRST_DC_CB, MAKE_CODE(prev_dc)); sign = 0; - codebook = 3; blocks += 64; for (i = 1; i < blocks_per_slice; i++, blocks += 64) { @@ -676,7 +675,6 @@ static int estimate_dcs(int *error, int16_t *blocks, int blocks_per_slice, prev_dc = (blocks[0] - 0x4000) / scale; bits = estimate_vlc(FIRST_DC_CB, MAKE_CODE(prev_dc)); sign = 0; - codebook = 3; blocks += 64; *error += FFABS(blocks[0] - 0x4000) % scale;