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