[FFmpeg-cvslog] avcodec/prosumer: factorize e0 setting out

Michael Niedermayer git at videolan.org
Mon Sep 24 01:59:32 EEST 2018


ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Sat Sep 22 18:14:01 2018 +0200| [fa1d3caef0cbe24d2e74e3410495344c5aee9776] | committer: Michael Niedermayer

avcodec/prosumer: factorize e0 setting out

Reviewed-by: Paul B Mahol <onemda at gmail.com>
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=fa1d3caef0cbe24d2e74e3410495344c5aee9776
---

 libavcodec/prosumer.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/libavcodec/prosumer.c b/libavcodec/prosumer.c
index 399350031a..9e8a94d4db 100644
--- a/libavcodec/prosumer.c
+++ b/libavcodec/prosumer.c
@@ -290,14 +290,13 @@ static void fill_elements(uint32_t idx, uint32_t shift, int size, uint32_t *e0,
                 if (table[2 * i] >> 8 == 0x80u) {
                     return;
                 } else {
+                    *e0 = (*e0 & 0xFFFFFFu) | (((12 + b - shift)  | (0x40u<<j)) << 22);
                     if (j == 0) {
                         *e1 = table[2 * i];
-                        *e0 = (*e0 & 0xFFFFFFu) | (((12 + b - shift) & 0xFFFFFFFCu | 0x40u) << 22);
                         shift -= b;
                         h <<= b;
                     } else {
                         *e1 |= (unsigned)table[2 * i] << 16;
-                        *e0 = (*e0 & 0xFFFFFFu) | (((12 + b - shift) & 0xFFFFFFFCu | 0x80u) << 22);
                     }
                     break;
                 }



More information about the ffmpeg-cvslog mailing list