Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(130)

Side by Side Diff: source/libvpx/vp9/decoder/vp9_decoder.c

Issue 592203002: libvpx: Pull from upstream (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/libvpx/
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « source/libvpx/vp9/decoder/vp9_decoder.h ('k') | source/libvpx/vp9/decoder/vp9_detokenize.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 53
54 vp9_zero(*pbi); 54 vp9_zero(*pbi);
55 55
56 if (setjmp(cm->error.jmp)) { 56 if (setjmp(cm->error.jmp)) {
57 cm->error.setjmp = 0; 57 cm->error.setjmp = 0;
58 vp9_decoder_remove(pbi); 58 vp9_decoder_remove(pbi);
59 return NULL; 59 return NULL;
60 } 60 }
61 61
62 cm->error.setjmp = 1; 62 cm->error.setjmp = 1;
63 pbi->need_resync = 1;
63 initialize_dec(); 64 initialize_dec();
64 65
65 // Initialize the references to not point to any frame buffers. 66 // Initialize the references to not point to any frame buffers.
66 vpx_memset(&cm->ref_frame_map, -1, sizeof(cm->ref_frame_map)); 67 vpx_memset(&cm->ref_frame_map, -1, sizeof(cm->ref_frame_map));
67 68
68 cm->current_video_frame = 0; 69 cm->current_video_frame = 0;
69 pbi->ready_for_new_data = 1; 70 pbi->ready_for_new_data = 1;
70 cm->bit_depth = VPX_BITS_8; 71 cm->bit_depth = VPX_BITS_8;
71 72
72 // vp9_init_dequantizer() is first called here. Add check in 73 // vp9_init_dequantizer() is first called here. Add check in
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 cm->frame_refs[0].buf->corrupted = 1; 232 cm->frame_refs[0].buf->corrupted = 1;
232 } 233 }
233 234
234 // Check if the previous frame was a frame without any references to it. 235 // Check if the previous frame was a frame without any references to it.
235 if (cm->new_fb_idx >= 0 && cm->frame_bufs[cm->new_fb_idx].ref_count == 0) 236 if (cm->new_fb_idx >= 0 && cm->frame_bufs[cm->new_fb_idx].ref_count == 0)
236 cm->release_fb_cb(cm->cb_priv, 237 cm->release_fb_cb(cm->cb_priv,
237 &cm->frame_bufs[cm->new_fb_idx].raw_frame_buffer); 238 &cm->frame_bufs[cm->new_fb_idx].raw_frame_buffer);
238 cm->new_fb_idx = get_free_fb(cm); 239 cm->new_fb_idx = get_free_fb(cm);
239 240
240 if (setjmp(cm->error.jmp)) { 241 if (setjmp(cm->error.jmp)) {
242 pbi->need_resync = 1;
241 cm->error.setjmp = 0; 243 cm->error.setjmp = 0;
242 vp9_clear_system_state(); 244 vp9_clear_system_state();
243 245
244 // We do not know if the missing frame(s) was supposed to update 246 // We do not know if the missing frame(s) was supposed to update
245 // any of the reference buffers, but we act conservative and 247 // any of the reference buffers, but we act conservative and
246 // mark only the last buffer as corrupted. 248 // mark only the last buffer as corrupted.
247 // 249 //
248 // TODO(jkoleszar): Error concealment is undefined and non-normative 250 // TODO(jkoleszar): Error concealment is undefined and non-normative
249 // at this point, but if it becomes so, [0] may not always be the correct 251 // at this point, but if it becomes so, [0] may not always be the correct
250 // thing to do here. 252 // thing to do here.
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
371 373
372 for (j = 0; j < mag; ++j) 374 for (j = 0; j < mag; ++j)
373 this_sz |= (*x++) << (j * 8); 375 this_sz |= (*x++) << (j * 8);
374 sizes[i] = this_sz; 376 sizes[i] = this_sz;
375 } 377 }
376 *count = frames; 378 *count = frames;
377 } 379 }
378 } 380 }
379 return VPX_CODEC_OK; 381 return VPX_CODEC_OK;
380 } 382 }
OLDNEW
« no previous file with comments | « source/libvpx/vp9/decoder/vp9_decoder.h ('k') | source/libvpx/vp9/decoder/vp9_detokenize.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698