diff mbox series

[FFmpeg-devel,2/6] avcodec/svq3: Remove dead topright_samples_available variable, code

Message ID AM7PR03MB6660F274FA7AB9858A9CEEB58F509@AM7PR03MB6660.eurprd03.prod.outlook.com
State Accepted
Commit 67cccd442f73d8eea54660b552fe954c642f060c
Headers show
Series [FFmpeg-devel] avcodec/mpegvideo, svq3: Remove unused next_p_frame_damaged | expand

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
andriy/make_armv7_RPi4 success Make finished
andriy/make_fate_armv7_RPi4 success Make fate finished
andriy/make_aarch64_jetson success Make finished
andriy/make_fate_aarch64_jetson success Make fate finished

Commit Message

Andreas Rheinhardt Jan. 10, 2022, 5:51 p.m. UTC
Topright samples are always available.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
 libavcodec/svq3.c | 11 ++---------
 1 file changed, 2 insertions(+), 9 deletions(-)
diff mbox series

Patch

diff --git a/libavcodec/svq3.c b/libavcodec/svq3.c
index 6f3ade8ace..a3f434ff8d 100644
--- a/libavcodec/svq3.c
+++ b/libavcodec/svq3.c
@@ -128,7 +128,6 @@  typedef struct SVQ3Context {
     int8_t (*intra4x4_pred_mode);
 
     unsigned int top_samples_available;
-    unsigned int topright_samples_available;
     unsigned int left_samples_available;
 
     uint8_t *edge_emu_buffer;
@@ -638,15 +637,10 @@  static av_always_inline void hl_decode_mb_predict_luma(SVQ3Context *s,
             const int dir      = s->intra4x4_pred_mode_cache[scan8[i]];
 
             uint8_t *topright;
-            int nnz, tr;
+            int nnz;
             if (dir == DIAG_DOWN_LEFT_PRED || dir == VERT_LEFT_PRED) {
-                const int topright_avail = (s->topright_samples_available << i) & 0x8000;
                 av_assert2(s->mb_y || linesize <= block_offset[i]);
-                if (!topright_avail) {
-                    tr       = ptr[3 - linesize] * 0x01010101u;
-                    topright = (uint8_t *)&tr;
-                } else
-                    topright = ptr + 4 - linesize;
+                topright = ptr + 4 - linesize;
             } else
                 topright = NULL;
 
@@ -721,7 +715,6 @@  static int svq3_decode_mb(SVQ3Context *s, unsigned int mb_type)
 
     s->top_samples_available      = (s->mb_y == 0) ? 0x33FF : 0xFFFF;
     s->left_samples_available     = (s->mb_x == 0) ? 0x5F5F : 0xFFFF;
-    s->topright_samples_available = 0xFFFF;
 
     if (mb_type == 0) {           /* SKIP */
         if (s->pict_type == AV_PICTURE_TYPE_P ||