| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2010 The WebM project authors. All Rights Reserved. | 2 * Copyright (c) 2010 The WebM project authors. All Rights Reserved. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
| 5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
| 6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
| 7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
| 8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
| 9 */ | 9 */ |
| 10 | 10 |
| (...skipping 1059 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1070 cm->profile = read_profile(rb); | 1070 cm->profile = read_profile(rb); |
| 1071 if (cm->profile >= MAX_PROFILES) | 1071 if (cm->profile >= MAX_PROFILES) |
| 1072 vpx_internal_error(&cm->error, VPX_CODEC_UNSUP_BITSTREAM, | 1072 vpx_internal_error(&cm->error, VPX_CODEC_UNSUP_BITSTREAM, |
| 1073 "Unsupported bitstream profile"); | 1073 "Unsupported bitstream profile"); |
| 1074 | 1074 |
| 1075 cm->show_existing_frame = vp9_rb_read_bit(rb); | 1075 cm->show_existing_frame = vp9_rb_read_bit(rb); |
| 1076 if (cm->show_existing_frame) { | 1076 if (cm->show_existing_frame) { |
| 1077 // Show an existing frame directly. | 1077 // Show an existing frame directly. |
| 1078 const int frame_to_show = cm->ref_frame_map[vp9_rb_read_literal(rb, 3)]; | 1078 const int frame_to_show = cm->ref_frame_map[vp9_rb_read_literal(rb, 3)]; |
| 1079 | 1079 |
| 1080 if (cm->frame_bufs[frame_to_show].ref_count < 1) | 1080 if (frame_to_show < 0 || cm->frame_bufs[frame_to_show].ref_count < 1) |
| 1081 vpx_internal_error(&cm->error, VPX_CODEC_UNSUP_BITSTREAM, | 1081 vpx_internal_error(&cm->error, VPX_CODEC_UNSUP_BITSTREAM, |
| 1082 "Buffer %d does not contain a decoded frame", | 1082 "Buffer %d does not contain a decoded frame", |
| 1083 frame_to_show); | 1083 frame_to_show); |
| 1084 | 1084 |
| 1085 ref_cnt_fb(cm->frame_bufs, &cm->new_fb_idx, frame_to_show); | 1085 ref_cnt_fb(cm->frame_bufs, &cm->new_fb_idx, frame_to_show); |
| 1086 pbi->refresh_frame_flags = 0; | 1086 pbi->refresh_frame_flags = 0; |
| 1087 cm->lf.filter_level = 0; | 1087 cm->lf.filter_level = 0; |
| 1088 cm->show_frame = 1; | 1088 cm->show_frame = 1; |
| 1089 return 0; | 1089 return 0; |
| 1090 } | 1090 } |
| (...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1382 vp9_adapt_mv_probs(cm, cm->allow_high_precision_mv); | 1382 vp9_adapt_mv_probs(cm, cm->allow_high_precision_mv); |
| 1383 } | 1383 } |
| 1384 } else { | 1384 } else { |
| 1385 debug_check_frame_counts(cm); | 1385 debug_check_frame_counts(cm); |
| 1386 } | 1386 } |
| 1387 } | 1387 } |
| 1388 | 1388 |
| 1389 if (cm->refresh_frame_context) | 1389 if (cm->refresh_frame_context) |
| 1390 cm->frame_contexts[cm->frame_context_idx] = cm->fc; | 1390 cm->frame_contexts[cm->frame_context_idx] = cm->fc; |
| 1391 } | 1391 } |
| OLD | NEW |