in update_encode_frame_result()
Unified · Split
| @@ -7107,17 +7107,24 @@ static void update_encode_frame_result(ENCODE_FRAME_RESULT *encode_frame_result, · 7106 unmodified lines | ||
| 7107 | 7107 | const YV12_BUFFER_CONFIG *coded_frame, |
| 7108 | 7108 | int quantize_index, uint32_t bit_depth, |
| 7109 | 7109 | uint32_t input_bit_depth) { |
| 7110 | +#if CONFIG_RATE_CTRL | |
| 7110 | 7111 | PSNR_STATS psnr; |
| 7111 | 7112 | #if CONFIG_VP9_HIGHBITDEPTH |
| 7112 | 7113 | vpx_calc_highbd_psnr(source_frame, coded_frame, &psnr, bit_depth, |
| 7113 | 7114 | input_bit_depth); |
| 7114 | −#else | |
| 7115 | +#else // CONFIG_VP9_HIGHBITDEPTH | |
| 7115 | 7116 | (void)bit_depth; |
| 7116 | 7117 | (void)input_bit_depth; |
| 7117 | 7118 | vpx_calc_psnr(source_frame, coded_frame, &psnr); |
| 7118 | −#endif | |
| 7119 | +#endif // CONFIG_VP9_HIGHBITDEPTH | |
| 7119 | 7120 | encode_frame_result->psnr = psnr.psnr[0]; |
| 7120 | 7121 | encode_frame_result->sse = psnr.sse[0]; |
| 7122 | +#else // CONFIG_RATE_CTRL | |
| 7123 | + (void)bit_depth; | |
| 7124 | + (void)input_bit_depth; | |
| 7125 | + (void)source_frame; | |
| 7126 | + (void)coded_frame; | |
| 7127 | +#endif // CONFIG_RATE_CTRL | |
| 7121 | 7128 | encode_frame_result->show_idx = show_idx; |
| 7122 | 7129 | encode_frame_result->update_type = update_type; |
| 7123 | 7130 | encode_frame_result->quantize_index = quantize_index; |
| @@ -853,8 +853,10 @@ typedef struct VP9_COMP { · 852 unmodified lines | ||
| 853 | 853 | typedef struct ENCODE_FRAME_RESULT { |
| 854 | 854 | int show_idx; |
| 855 | 855 | FRAME_UPDATE_TYPE update_type; |
| 856 | +#if CONFIG_RATE_CTRL | |
| 856 | 857 | double psnr; |
| 857 | 858 | uint64_t sse; |
| 859 | +#endif // CONFIG_RATE_CTRL | |
| 858 | 860 | int quantize_index; |
| 859 | 861 | } ENCODE_FRAME_RESULT; |
| 860 | 862 | |