| OLD | NEW |
| 1 // Copyright 2011 Google Inc. All Rights Reserved. | 1 // Copyright 2011 Google Inc. All Rights Reserved. |
| 2 // | 2 // |
| 3 // Use of this source code is governed by a BSD-style license | 3 // Use of this source code is governed by a BSD-style license |
| 4 // that can be found in the COPYING file in the root of the source | 4 // that can be found in the COPYING file in the root of the source |
| 5 // tree. An additional intellectual property rights grant can be found | 5 // tree. An additional intellectual property rights grant can be found |
| 6 // in the file PATENTS. All contributing project authors may | 6 // in the file PATENTS. All contributing project authors may |
| 7 // be found in the AUTHORS file in the root of the source tree. | 7 // be found in the AUTHORS file in the root of the source tree. |
| 8 // ----------------------------------------------------------------------------- | 8 // ----------------------------------------------------------------------------- |
| 9 // | 9 // |
| 10 // frame coding and analysis | 10 // frame coding and analysis |
| (...skipping 490 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 501 case 2: *info = mb->segment_; break; | 501 case 2: *info = mb->segment_; break; |
| 502 case 3: *info = enc->dqm_[mb->segment_].quant_; break; | 502 case 3: *info = enc->dqm_[mb->segment_].quant_; break; |
| 503 case 4: *info = (mb->type_ == 1) ? it->preds_[0] : 0xff; break; | 503 case 4: *info = (mb->type_ == 1) ? it->preds_[0] : 0xff; break; |
| 504 case 5: *info = mb->uv_mode_; break; | 504 case 5: *info = mb->uv_mode_; break; |
| 505 case 6: { | 505 case 6: { |
| 506 const int b = (int)((it->luma_bits_ + it->uv_bits_ + 7) >> 3); | 506 const int b = (int)((it->luma_bits_ + it->uv_bits_ + 7) >> 3); |
| 507 *info = (b > 255) ? 255 : b; break; | 507 *info = (b > 255) ? 255 : b; break; |
| 508 } | 508 } |
| 509 case 7: *info = mb->alpha_; break; | 509 case 7: *info = mb->alpha_; break; |
| 510 default: *info = 0; break; | 510 default: *info = 0; break; |
| 511 }; | 511 } |
| 512 } | 512 } |
| 513 #if SEGMENT_VISU // visualize segments and prediction modes | 513 #if SEGMENT_VISU // visualize segments and prediction modes |
| 514 SetBlock(it->yuv_out_ + Y_OFF, mb->segment_ * 64, 16); | 514 SetBlock(it->yuv_out_ + Y_OFF, mb->segment_ * 64, 16); |
| 515 SetBlock(it->yuv_out_ + U_OFF, it->preds_[0] * 64, 8); | 515 SetBlock(it->yuv_out_ + U_OFF, it->preds_[0] * 64, 8); |
| 516 SetBlock(it->yuv_out_ + V_OFF, mb->uv_mode_ * 64, 8); | 516 SetBlock(it->yuv_out_ + V_OFF, mb->uv_mode_ * 64, 8); |
| 517 #endif | 517 #endif |
| 518 } | 518 } |
| 519 | 519 |
| 520 static double GetPSNR(uint64_t mse, uint64_t size) { | 520 static double GetPSNR(uint64_t mse, uint64_t size) { |
| 521 return (mse > 0 && size > 0) ? 10. * log10(255. * 255. * size / mse) : 99; | 521 return (mse > 0 && size > 0) ? 10. * log10(255. * 255. * size / mse) : 99; |
| (...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 845 | 845 |
| 846 int VP8EncTokenLoop(VP8Encoder* const enc) { | 846 int VP8EncTokenLoop(VP8Encoder* const enc) { |
| 847 (void)enc; | 847 (void)enc; |
| 848 return 0; // we shouldn't be here. | 848 return 0; // we shouldn't be here. |
| 849 } | 849 } |
| 850 | 850 |
| 851 #endif // DISABLE_TOKEN_BUFFER | 851 #endif // DISABLE_TOKEN_BUFFER |
| 852 | 852 |
| 853 //------------------------------------------------------------------------------ | 853 //------------------------------------------------------------------------------ |
| 854 | 854 |
| OLD | NEW |