History

Fix some instances of -Wunused-but-set-variable.

Peter Kasting committed 5 years ago

Commit fc04a941 parent 3db09213 files · +15 −18Browse files

Unified · Split

3 files
  1. vp8/encoder/bitstream.c +0 −3
  2. vp9/encoder/vp9_encodeframe.c +3 −15
  3. vpx_ports/x86.h +12 −0
vp8/encoder/bitstream.c+0−3
@@ -866,7 +866,6 @@ void vp8_update_coef_probs(VP8_COMP *cpi) { · 865 unmodified lines
866866 #if !(CONFIG_REALTIME_ONLY & CONFIG_ONTHEFLY_BITPACKING)
867867 vp8_writer *const w = cpi->bc;
868868 #endif
869− int savings = 0;
870869
871870 vpx_clear_system_state();
872871
@@ -940,8 +939,6 @@ void vp8_update_coef_probs(VP8_COMP *cpi) { · 67 unmodified lines
940939 #if !(CONFIG_REALTIME_ONLY & CONFIG_ONTHEFLY_BITPACKING)
941940 vp8_write_literal(w, newp, 8);
942941 #endif
943−
944− savings += s;
945942 }
946943
947944 } while (++t < ENTROPY_NODES);
vp9/encoder/vp9_encodeframe.c+3−15
@@ -784,8 +784,8 @@ static void fill_variance_8x8avg(const uint8_t *s, int sp, const uint8_t *d, · 783 unmodified lines
784784
785785 // Check if most of the superblock is skin content, and if so, force split to
786786 // 32x32, and set x->sb_is_skin for use in mode selection.
787−static int skin_sb_split(VP9_COMP *cpi, MACROBLOCK *x, const int low_res,
788− int mi_row, int mi_col, int *force_split) {
787+static int skin_sb_split(VP9_COMP *cpi, const int low_res, int mi_row,
788+ int mi_col, int *force_split) {
789789 VP9_COMMON *const cm = &cpi->common;
790790 #if CONFIG_VP9_HIGHBITDEPTH
791791 if (cm->use_highbitdepth) return 0;
@@ -797,11 +797,6 @@ static int skin_sb_split(VP9_COMP *cpi, MACROBLOCK *x, const int low_res, · 5 unmodified lines
797797 mi_row + 8 < cm->mi_rows)) {
798798 int num_16x16_skin = 0;
799799 int num_16x16_nonskin = 0;
800− uint8_t *ysignal = x->plane[0].src.buf;
801− uint8_t *usignal = x->plane[1].src.buf;
802− uint8_t *vsignal = x->plane[2].src.buf;
803− int sp = x->plane[0].src.stride;
804− int spuv = x->plane[1].src.stride;
805800 const int block_index = mi_row * cm->mi_cols + mi_col;
806801 const int bw = num_8x8_blocks_wide_lookup[BLOCK_64X64];
807802 const int bh = num_8x8_blocks_high_lookup[BLOCK_64X64];
@@ -820,13 +815,7 @@ static int skin_sb_split(VP9_COMP *cpi, MACROBLOCK *x, const int low_res, · 12 unmodified lines
820815 i = ymis;
821816 break;
822817 }
823− ysignal += 16;
824− usignal += 8;
825− vsignal += 8;
826818 }
827− ysignal += (sp << 4) - 64;
828− usignal += (spuv << 3) - 32;
829− vsignal += (spuv << 3) - 32;
830819 }
831820 if (num_16x16_skin > 12) {
832821 *force_split = 1;
@@ -1503,8 +1492,7 @@ static int choose_partitioning(VP9_COMP *cpi, const TileInfo *const tile, · 670 unmodified lines
15031492 vp9_build_inter_predictors_sb(xd, mi_row, mi_col, BLOCK_64X64);
15041493
15051494 if (cpi->use_skin_detection)
1506− x->sb_is_skin =
1507− skin_sb_split(cpi, x, low_res, mi_row, mi_col, force_split);
1495+ x->sb_is_skin = skin_sb_split(cpi, low_res, mi_row, mi_col, force_split);
15081496
15091497 d = xd->plane[0].dst.buf;
15101498 dp = xd->plane[0].dst.stride;
vpx_ports/x86.h+12−0
@@ -223,6 +223,8 @@ static INLINE int x86_simd_caps(void) { · 222 unmodified lines
223223 }
224224 }
225225
226+ (void)reg_eax; // Avoid compiler warning on unused-but-set variable.
227+
226228 return flags & mask;
227229 }
228230
@@ -307,6 +309,11 @@ static INLINE unsigned int x86_readtscp(void) { · 78 unmodified lines
307309 static INLINE unsigned int x86_tsc_start(void) {
308310 unsigned int reg_eax, reg_ebx, reg_ecx, reg_edx;
309311 cpuid(0, 0, reg_eax, reg_ebx, reg_ecx, reg_edx);
312+ // Avoid compiler warnings on unused-but-set variables.
313+ (void)reg_eax;
314+ (void)reg_ebx;
315+ (void)reg_ecx;
316+ (void)reg_edx;
310317 return x86_readtsc();
311318 }
312319
@@ -314,6 +321,11 @@ static INLINE unsigned int x86_tsc_end(void) { · 1 unmodified line
314321 uint32_t v = x86_readtscp();
315322 unsigned int reg_eax, reg_ebx, reg_ecx, reg_edx;
316323 cpuid(0, 0, reg_eax, reg_ebx, reg_ecx, reg_edx);
324+ // Avoid compiler warnings on unused-but-set variables.
325+ (void)reg_eax;
326+ (void)reg_ebx;
327+ (void)reg_ecx;
328+ (void)reg_edx;
317329 return v;
318330 }
319331

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t