| 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 640 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 651 if (subpel_y || (sf->y_step_q4 != SUBPEL_SHIFTS)) { | 651 if (subpel_y || (sf->y_step_q4 != SUBPEL_SHIFTS)) { |
| 652 y0 -= VP9_INTERP_EXTEND - 1; | 652 y0 -= VP9_INTERP_EXTEND - 1; |
| 653 y1 += VP9_INTERP_EXTEND; | 653 y1 += VP9_INTERP_EXTEND; |
| 654 y_pad = 1; | 654 y_pad = 1; |
| 655 } | 655 } |
| 656 | 656 |
| 657 // Wait until reference block is ready. Pad 7 more pixels as last 7 | 657 // Wait until reference block is ready. Pad 7 more pixels as last 7 |
| 658 // pixels of each superblock row can be changed by next superblock row. | 658 // pixels of each superblock row can be changed by next superblock row. |
| 659 if (pbi->frame_parallel_decode) | 659 if (pbi->frame_parallel_decode) |
| 660 vp9_frameworker_wait(pbi->frame_worker_owner, ref_frame_buf, | 660 vp9_frameworker_wait(pbi->frame_worker_owner, ref_frame_buf, |
| 661 MAX(0, (y1 + 7)) << (plane == 0 ? 0 : 1)); | 661 VPXMAX(0, (y1 + 7)) << (plane == 0 ? 0 : 1)); |
| 662 | 662 |
| 663 // Skip border extension if block is inside the frame. | 663 // Skip border extension if block is inside the frame. |
| 664 if (x0 < 0 || x0 > frame_width - 1 || x1 < 0 || x1 > frame_width - 1 || | 664 if (x0 < 0 || x0 > frame_width - 1 || x1 < 0 || x1 > frame_width - 1 || |
| 665 y0 < 0 || y0 > frame_height - 1 || y1 < 0 || y1 > frame_height - 1) { | 665 y0 < 0 || y0 > frame_height - 1 || y1 < 0 || y1 > frame_height - 1) { |
| 666 // Extend the border. | 666 // Extend the border. |
| 667 const uint8_t *const buf_ptr1 = ref_frame + y0 * buf_stride + x0; | 667 const uint8_t *const buf_ptr1 = ref_frame + y0 * buf_stride + x0; |
| 668 const int b_w = x1 - x0 + 1; | 668 const int b_w = x1 - x0 + 1; |
| 669 const int b_h = y1 - y0 + 1; | 669 const int b_h = y1 - y0 + 1; |
| 670 const int border_offset = y_pad * 3 * b_w + x_pad * 3; | 670 const int border_offset = y_pad * 3 * b_w + x_pad * 3; |
| 671 | 671 |
| 672 extend_and_predict(buf_ptr1, buf_stride, x0, y0, b_w, b_h, | 672 extend_and_predict(buf_ptr1, buf_stride, x0, y0, b_w, b_h, |
| 673 frame_width, frame_height, border_offset, | 673 frame_width, frame_height, border_offset, |
| 674 dst, dst_buf->stride, | 674 dst, dst_buf->stride, |
| 675 subpel_x, subpel_y, | 675 subpel_x, subpel_y, |
| 676 kernel, sf, | 676 kernel, sf, |
| 677 #if CONFIG_VP9_HIGHBITDEPTH | 677 #if CONFIG_VP9_HIGHBITDEPTH |
| 678 xd, | 678 xd, |
| 679 #endif | 679 #endif |
| 680 w, h, ref, xs, ys); | 680 w, h, ref, xs, ys); |
| 681 return; | 681 return; |
| 682 } | 682 } |
| 683 } else { | 683 } else { |
| 684 // Wait until reference block is ready. Pad 7 more pixels as last 7 | 684 // Wait until reference block is ready. Pad 7 more pixels as last 7 |
| 685 // pixels of each superblock row can be changed by next superblock row. | 685 // pixels of each superblock row can be changed by next superblock row. |
| 686 if (pbi->frame_parallel_decode) { | 686 if (pbi->frame_parallel_decode) { |
| 687 const int y1 = (y0_16 + (h - 1) * ys) >> SUBPEL_BITS; | 687 const int y1 = (y0_16 + (h - 1) * ys) >> SUBPEL_BITS; |
| 688 vp9_frameworker_wait(pbi->frame_worker_owner, ref_frame_buf, | 688 vp9_frameworker_wait(pbi->frame_worker_owner, ref_frame_buf, |
| 689 MAX(0, (y1 + 7)) << (plane == 0 ? 0 : 1)); | 689 VPXMAX(0, (y1 + 7)) << (plane == 0 ? 0 : 1)); |
| 690 } | 690 } |
| 691 } | 691 } |
| 692 #if CONFIG_VP9_HIGHBITDEPTH | 692 #if CONFIG_VP9_HIGHBITDEPTH |
| 693 if (xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH) { | 693 if (xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH) { |
| 694 high_inter_predictor(buf_ptr, buf_stride, dst, dst_buf->stride, subpel_x, | 694 high_inter_predictor(buf_ptr, buf_stride, dst, dst_buf->stride, subpel_x, |
| 695 subpel_y, sf, w, h, ref, kernel, xs, ys, xd->bd); | 695 subpel_y, sf, w, h, ref, kernel, xs, ys, xd->bd); |
| 696 } else { | 696 } else { |
| 697 inter_predictor(buf_ptr, buf_stride, dst, dst_buf->stride, subpel_x, | 697 inter_predictor(buf_ptr, buf_stride, dst, dst_buf->stride, subpel_x, |
| 698 subpel_y, sf, w, h, ref, kernel, xs, ys); | 698 subpel_y, sf, w, h, ref, kernel, xs, ys); |
| 699 } | 699 } |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 750 sf, pre_buf, dst_buf, &mv, ref_frame_buf, | 750 sf, pre_buf, dst_buf, &mv, ref_frame_buf, |
| 751 is_scaled, ref); | 751 is_scaled, ref); |
| 752 } | 752 } |
| 753 } | 753 } |
| 754 } | 754 } |
| 755 } | 755 } |
| 756 | 756 |
| 757 static INLINE TX_SIZE dec_get_uv_tx_size(const MB_MODE_INFO *mbmi, | 757 static INLINE TX_SIZE dec_get_uv_tx_size(const MB_MODE_INFO *mbmi, |
| 758 int n4_wl, int n4_hl) { | 758 int n4_wl, int n4_hl) { |
| 759 // get minimum log2 num4x4s dimension | 759 // get minimum log2 num4x4s dimension |
| 760 const int x = MIN(n4_wl, n4_hl); | 760 const int x = VPXMIN(n4_wl, n4_hl); |
| 761 return MIN(mbmi->tx_size, x); | 761 return VPXMIN(mbmi->tx_size, x); |
| 762 } | 762 } |
| 763 | 763 |
| 764 static INLINE void dec_reset_skip_context(MACROBLOCKD *xd) { | 764 static INLINE void dec_reset_skip_context(MACROBLOCKD *xd) { |
| 765 int i; | 765 int i; |
| 766 for (i = 0; i < MAX_MB_PLANE; i++) { | 766 for (i = 0; i < MAX_MB_PLANE; i++) { |
| 767 struct macroblockd_plane *const pd = &xd->plane[i]; | 767 struct macroblockd_plane *const pd = &xd->plane[i]; |
| 768 memset(pd->above_context, 0, sizeof(ENTROPY_CONTEXT) * pd->n4_w); | 768 memset(pd->above_context, 0, sizeof(ENTROPY_CONTEXT) * pd->n4_w); |
| 769 memset(pd->left_context, 0, sizeof(ENTROPY_CONTEXT) * pd->n4_h); | 769 memset(pd->left_context, 0, sizeof(ENTROPY_CONTEXT) * pd->n4_h); |
| 770 } | 770 } |
| 771 } | 771 } |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 812 } | 812 } |
| 813 | 813 |
| 814 static void decode_block(VP9Decoder *const pbi, MACROBLOCKD *const xd, | 814 static void decode_block(VP9Decoder *const pbi, MACROBLOCKD *const xd, |
| 815 int mi_row, int mi_col, | 815 int mi_row, int mi_col, |
| 816 vpx_reader *r, BLOCK_SIZE bsize, | 816 vpx_reader *r, BLOCK_SIZE bsize, |
| 817 int bwl, int bhl) { | 817 int bwl, int bhl) { |
| 818 VP9_COMMON *const cm = &pbi->common; | 818 VP9_COMMON *const cm = &pbi->common; |
| 819 const int less8x8 = bsize < BLOCK_8X8; | 819 const int less8x8 = bsize < BLOCK_8X8; |
| 820 const int bw = 1 << (bwl - 1); | 820 const int bw = 1 << (bwl - 1); |
| 821 const int bh = 1 << (bhl - 1); | 821 const int bh = 1 << (bhl - 1); |
| 822 const int x_mis = MIN(bw, cm->mi_cols - mi_col); | 822 const int x_mis = VPXMIN(bw, cm->mi_cols - mi_col); |
| 823 const int y_mis = MIN(bh, cm->mi_rows - mi_row); | 823 const int y_mis = VPXMIN(bh, cm->mi_rows - mi_row); |
| 824 | 824 |
| 825 MB_MODE_INFO *mbmi = set_offsets(cm, xd, bsize, mi_row, mi_col, | 825 MB_MODE_INFO *mbmi = set_offsets(cm, xd, bsize, mi_row, mi_col, |
| 826 bw, bh, x_mis, y_mis, bwl, bhl); | 826 bw, bh, x_mis, y_mis, bwl, bhl); |
| 827 | 827 |
| 828 if (bsize >= BLOCK_8X8 && (cm->subsampling_x || cm->subsampling_y)) { | 828 if (bsize >= BLOCK_8X8 && (cm->subsampling_x || cm->subsampling_y)) { |
| 829 const BLOCK_SIZE uv_subsize = | 829 const BLOCK_SIZE uv_subsize = |
| 830 ss_size_lookup[bsize][cm->subsampling_x][cm->subsampling_y]; | 830 ss_size_lookup[bsize][cm->subsampling_x][cm->subsampling_y]; |
| 831 if (uv_subsize == BLOCK_INVALID) | 831 if (uv_subsize == BLOCK_INVALID) |
| 832 vpx_internal_error(xd->error_info, | 832 vpx_internal_error(xd->error_info, |
| 833 VPX_CODEC_CORRUPT_FRAME, "Invalid block size."); | 833 VPX_CODEC_CORRUPT_FRAME, "Invalid block size."); |
| (...skipping 394 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1228 } | 1228 } |
| 1229 | 1229 |
| 1230 static void setup_frame_size(VP9_COMMON *cm, struct vpx_read_bit_buffer *rb) { | 1230 static void setup_frame_size(VP9_COMMON *cm, struct vpx_read_bit_buffer *rb) { |
| 1231 int width, height; | 1231 int width, height; |
| 1232 BufferPool *const pool = cm->buffer_pool; | 1232 BufferPool *const pool = cm->buffer_pool; |
| 1233 vp9_read_frame_size(rb, &width, &height); | 1233 vp9_read_frame_size(rb, &width, &height); |
| 1234 resize_context_buffers(cm, width, height); | 1234 resize_context_buffers(cm, width, height); |
| 1235 setup_display_size(cm, rb); | 1235 setup_display_size(cm, rb); |
| 1236 | 1236 |
| 1237 lock_buffer_pool(pool); | 1237 lock_buffer_pool(pool); |
| 1238 if (vp9_realloc_frame_buffer( | 1238 if (vpx_realloc_frame_buffer( |
| 1239 get_frame_new_buffer(cm), cm->width, cm->height, | 1239 get_frame_new_buffer(cm), cm->width, cm->height, |
| 1240 cm->subsampling_x, cm->subsampling_y, | 1240 cm->subsampling_x, cm->subsampling_y, |
| 1241 #if CONFIG_VP9_HIGHBITDEPTH | 1241 #if CONFIG_VP9_HIGHBITDEPTH |
| 1242 cm->use_highbitdepth, | 1242 cm->use_highbitdepth, |
| 1243 #endif | 1243 #endif |
| 1244 VP9_DEC_BORDER_IN_PIXELS, | 1244 VP9_DEC_BORDER_IN_PIXELS, |
| 1245 cm->byte_alignment, | 1245 cm->byte_alignment, |
| 1246 &pool->frame_bufs[cm->new_fb_idx].raw_frame_buffer, pool->get_fb_cb, | 1246 &pool->frame_bufs[cm->new_fb_idx].raw_frame_buffer, pool->get_fb_cb, |
| 1247 pool->cb_priv)) { | 1247 pool->cb_priv)) { |
| 1248 unlock_buffer_pool(pool); | 1248 unlock_buffer_pool(pool); |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1309 cm->subsampling_x, | 1309 cm->subsampling_x, |
| 1310 cm->subsampling_y)) | 1310 cm->subsampling_y)) |
| 1311 vpx_internal_error(&cm->error, VPX_CODEC_CORRUPT_FRAME, | 1311 vpx_internal_error(&cm->error, VPX_CODEC_CORRUPT_FRAME, |
| 1312 "Referenced frame has incompatible color format"); | 1312 "Referenced frame has incompatible color format"); |
| 1313 } | 1313 } |
| 1314 | 1314 |
| 1315 resize_context_buffers(cm, width, height); | 1315 resize_context_buffers(cm, width, height); |
| 1316 setup_display_size(cm, rb); | 1316 setup_display_size(cm, rb); |
| 1317 | 1317 |
| 1318 lock_buffer_pool(pool); | 1318 lock_buffer_pool(pool); |
| 1319 if (vp9_realloc_frame_buffer( | 1319 if (vpx_realloc_frame_buffer( |
| 1320 get_frame_new_buffer(cm), cm->width, cm->height, | 1320 get_frame_new_buffer(cm), cm->width, cm->height, |
| 1321 cm->subsampling_x, cm->subsampling_y, | 1321 cm->subsampling_x, cm->subsampling_y, |
| 1322 #if CONFIG_VP9_HIGHBITDEPTH | 1322 #if CONFIG_VP9_HIGHBITDEPTH |
| 1323 cm->use_highbitdepth, | 1323 cm->use_highbitdepth, |
| 1324 #endif | 1324 #endif |
| 1325 VP9_DEC_BORDER_IN_PIXELS, | 1325 VP9_DEC_BORDER_IN_PIXELS, |
| 1326 cm->byte_alignment, | 1326 cm->byte_alignment, |
| 1327 &pool->frame_bufs[cm->new_fb_idx].raw_frame_buffer, pool->get_fb_cb, | 1327 &pool->frame_bufs[cm->new_fb_idx].raw_frame_buffer, pool->get_fb_cb, |
| 1328 pool->cb_priv)) { | 1328 pool->cb_priv)) { |
| 1329 unlock_buffer_pool(pool); | 1329 unlock_buffer_pool(pool); |
| (...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1596 | 1596 |
| 1597 static const uint8_t *decode_tiles_mt(VP9Decoder *pbi, | 1597 static const uint8_t *decode_tiles_mt(VP9Decoder *pbi, |
| 1598 const uint8_t *data, | 1598 const uint8_t *data, |
| 1599 const uint8_t *data_end) { | 1599 const uint8_t *data_end) { |
| 1600 VP9_COMMON *const cm = &pbi->common; | 1600 VP9_COMMON *const cm = &pbi->common; |
| 1601 const VPxWorkerInterface *const winterface = vpx_get_worker_interface(); | 1601 const VPxWorkerInterface *const winterface = vpx_get_worker_interface(); |
| 1602 const uint8_t *bit_reader_end = NULL; | 1602 const uint8_t *bit_reader_end = NULL; |
| 1603 const int aligned_mi_cols = mi_cols_aligned_to_sb(cm->mi_cols); | 1603 const int aligned_mi_cols = mi_cols_aligned_to_sb(cm->mi_cols); |
| 1604 const int tile_cols = 1 << cm->log2_tile_cols; | 1604 const int tile_cols = 1 << cm->log2_tile_cols; |
| 1605 const int tile_rows = 1 << cm->log2_tile_rows; | 1605 const int tile_rows = 1 << cm->log2_tile_rows; |
| 1606 const int num_workers = MIN(pbi->max_threads & ~1, tile_cols); | 1606 const int num_workers = VPXMIN(pbi->max_threads & ~1, tile_cols); |
| 1607 TileBuffer tile_buffers[1][1 << 6]; | 1607 TileBuffer tile_buffers[1][1 << 6]; |
| 1608 int n; | 1608 int n; |
| 1609 int final_worker = -1; | 1609 int final_worker = -1; |
| 1610 | 1610 |
| 1611 assert(tile_cols <= (1 << 6)); | 1611 assert(tile_cols <= (1 << 6)); |
| 1612 assert(tile_rows == 1); | 1612 assert(tile_rows == 1); |
| 1613 (void)tile_rows; | 1613 (void)tile_rows; |
| 1614 | 1614 |
| 1615 // TODO(jzern): See if we can remove the restriction of passing in max | 1615 // TODO(jzern): See if we can remove the restriction of passing in max |
| 1616 // threads to the decoder. | 1616 // threads to the decoder. |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1663 compare_tile_buffers); | 1663 compare_tile_buffers); |
| 1664 | 1664 |
| 1665 // Rearrange the tile buffers such that per-tile group the largest, and | 1665 // Rearrange the tile buffers such that per-tile group the largest, and |
| 1666 // presumably the most difficult, tile will be decoded in the main thread. | 1666 // presumably the most difficult, tile will be decoded in the main thread. |
| 1667 // This should help minimize the number of instances where the main thread is | 1667 // This should help minimize the number of instances where the main thread is |
| 1668 // waiting for a worker to complete. | 1668 // waiting for a worker to complete. |
| 1669 { | 1669 { |
| 1670 int group_start = 0; | 1670 int group_start = 0; |
| 1671 while (group_start < tile_cols) { | 1671 while (group_start < tile_cols) { |
| 1672 const TileBuffer largest = tile_buffers[0][group_start]; | 1672 const TileBuffer largest = tile_buffers[0][group_start]; |
| 1673 const int group_end = MIN(group_start + num_workers, tile_cols) - 1; | 1673 const int group_end = VPXMIN(group_start + num_workers, tile_cols) - 1; |
| 1674 memmove(tile_buffers[0] + group_start, tile_buffers[0] + group_start + 1, | 1674 memmove(tile_buffers[0] + group_start, tile_buffers[0] + group_start + 1, |
| 1675 (group_end - group_start) * sizeof(tile_buffers[0][0])); | 1675 (group_end - group_start) * sizeof(tile_buffers[0][0])); |
| 1676 tile_buffers[0][group_end] = largest; | 1676 tile_buffers[0][group_end] = largest; |
| 1677 group_start = group_end + 1; | 1677 group_start = group_end + 1; |
| 1678 } | 1678 } |
| 1679 } | 1679 } |
| 1680 | 1680 |
| 1681 // Initialize thread frame counts. | 1681 // Initialize thread frame counts. |
| 1682 if (!cm->frame_parallel_decoding_mode) { | 1682 if (!cm->frame_parallel_decoding_mode) { |
| 1683 int i; | 1683 int i; |
| (...skipping 411 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2095 static struct vpx_read_bit_buffer *init_read_bit_buffer( | 2095 static struct vpx_read_bit_buffer *init_read_bit_buffer( |
| 2096 VP9Decoder *pbi, | 2096 VP9Decoder *pbi, |
| 2097 struct vpx_read_bit_buffer *rb, | 2097 struct vpx_read_bit_buffer *rb, |
| 2098 const uint8_t *data, | 2098 const uint8_t *data, |
| 2099 const uint8_t *data_end, | 2099 const uint8_t *data_end, |
| 2100 uint8_t clear_data[MAX_VP9_HEADER_SIZE]) { | 2100 uint8_t clear_data[MAX_VP9_HEADER_SIZE]) { |
| 2101 rb->bit_offset = 0; | 2101 rb->bit_offset = 0; |
| 2102 rb->error_handler = error_handler; | 2102 rb->error_handler = error_handler; |
| 2103 rb->error_handler_data = &pbi->common; | 2103 rb->error_handler_data = &pbi->common; |
| 2104 if (pbi->decrypt_cb) { | 2104 if (pbi->decrypt_cb) { |
| 2105 const int n = (int)MIN(MAX_VP9_HEADER_SIZE, data_end - data); | 2105 const int n = (int)VPXMIN(MAX_VP9_HEADER_SIZE, data_end - data); |
| 2106 pbi->decrypt_cb(pbi->decrypt_state, data, clear_data, n); | 2106 pbi->decrypt_cb(pbi->decrypt_state, data, clear_data, n); |
| 2107 rb->bit_buffer = clear_data; | 2107 rb->bit_buffer = clear_data; |
| 2108 rb->bit_buffer_end = clear_data + n; | 2108 rb->bit_buffer_end = clear_data + n; |
| 2109 } else { | 2109 } else { |
| 2110 rb->bit_buffer = data; | 2110 rb->bit_buffer = data; |
| 2111 rb->bit_buffer_end = data_end; | 2111 rb->bit_buffer_end = data_end; |
| 2112 } | 2112 } |
| 2113 return rb; | 2113 return rb; |
| 2114 } | 2114 } |
| 2115 | 2115 |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2212 if (!cm->skip_loop_filter) { | 2212 if (!cm->skip_loop_filter) { |
| 2213 // If multiple threads are used to decode tiles, then we use those | 2213 // If multiple threads are used to decode tiles, then we use those |
| 2214 // threads to do parallel loopfiltering. | 2214 // threads to do parallel loopfiltering. |
| 2215 vp9_loop_filter_frame_mt(new_fb, cm, pbi->mb.plane, | 2215 vp9_loop_filter_frame_mt(new_fb, cm, pbi->mb.plane, |
| 2216 cm->lf.filter_level, 0, 0, pbi->tile_workers, | 2216 cm->lf.filter_level, 0, 0, pbi->tile_workers, |
| 2217 pbi->num_tile_workers, &pbi->lf_row_sync); | 2217 pbi->num_tile_workers, &pbi->lf_row_sync); |
| 2218 } | 2218 } |
| 2219 } else { | 2219 } else { |
| 2220 vpx_internal_error(&cm->error, VPX_CODEC_CORRUPT_FRAME, | 2220 vpx_internal_error(&cm->error, VPX_CODEC_CORRUPT_FRAME, |
| 2221 "Decode failed. Frame data is corrupted."); | 2221 "Decode failed. Frame data is corrupted."); |
| 2222 | |
| 2223 } | 2222 } |
| 2224 } else { | 2223 } else { |
| 2225 *p_data_end = decode_tiles(pbi, data + first_partition_size, data_end); | 2224 *p_data_end = decode_tiles(pbi, data + first_partition_size, data_end); |
| 2226 } | 2225 } |
| 2227 | 2226 |
| 2228 if (!xd->corrupted) { | 2227 if (!xd->corrupted) { |
| 2229 if (!cm->error_resilient_mode && !cm->frame_parallel_decoding_mode) { | 2228 if (!cm->error_resilient_mode && !cm->frame_parallel_decoding_mode) { |
| 2230 vp9_adapt_coef_probs(cm); | 2229 vp9_adapt_coef_probs(cm); |
| 2231 | 2230 |
| 2232 if (!frame_is_intra_only(cm)) { | 2231 if (!frame_is_intra_only(cm)) { |
| 2233 vp9_adapt_mode_probs(cm); | 2232 vp9_adapt_mode_probs(cm); |
| 2234 vp9_adapt_mv_probs(cm, cm->allow_high_precision_mv); | 2233 vp9_adapt_mv_probs(cm, cm->allow_high_precision_mv); |
| 2235 } | 2234 } |
| 2236 } else { | 2235 } else { |
| 2237 debug_check_frame_counts(cm); | 2236 debug_check_frame_counts(cm); |
| 2238 } | 2237 } |
| 2239 } else { | 2238 } else { |
| 2240 vpx_internal_error(&cm->error, VPX_CODEC_CORRUPT_FRAME, | 2239 vpx_internal_error(&cm->error, VPX_CODEC_CORRUPT_FRAME, |
| 2241 "Decode failed. Frame data is corrupted."); | 2240 "Decode failed. Frame data is corrupted."); |
| 2242 } | 2241 } |
| 2243 | 2242 |
| 2244 // Non frame parallel update frame context here. | 2243 // Non frame parallel update frame context here. |
| 2245 if (cm->refresh_frame_context && !context_updated) | 2244 if (cm->refresh_frame_context && !context_updated) |
| 2246 cm->frame_contexts[cm->frame_context_idx] = *cm->fc; | 2245 cm->frame_contexts[cm->frame_context_idx] = *cm->fc; |
| 2247 } | 2246 } |
| OLD | NEW |