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

Side by Side Diff: source/libvpx/vp9/encoder/vp9_writer.c

Issue 478033002: libvpx: Pull from upstream (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/libvpx/
Patch Set: Created 6 years, 4 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/encoder/vp9_writer.h ('k') | source/libvpx/vp9/encoder/x86/vp9_dct_avx2.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
11 #include <assert.h> 11 #include <assert.h>
12 #include "vp9/encoder/vp9_writer.h" 12 #include "vp9/encoder/vp9_writer.h"
13 #include "vp9/common/vp9_entropy.h" 13 #include "vp9/common/vp9_entropy.h"
14 14
15 void vp9_start_encode(vp9_writer *br, uint8_t *source) { 15 void vp9_start_encode(vp9_writer *br, uint8_t *source) {
16 br->lowvalue = 0; 16 br->lowvalue = 0;
17 br->range = 255; 17 br->range = 255;
18 br->value = 0;
19 br->count = -24; 18 br->count = -24;
20 br->buffer = source; 19 br->buffer = source;
21 br->pos = 0; 20 br->pos = 0;
22 vp9_write_bit(br, 0); 21 vp9_write_bit(br, 0);
23 } 22 }
24 23
25 void vp9_stop_encode(vp9_writer *br) { 24 void vp9_stop_encode(vp9_writer *br) {
26 int i; 25 int i;
27 26
28 for (i = 0; i < 32; i++) 27 for (i = 0; i < 32; i++)
29 vp9_write_bit(br, 0); 28 vp9_write_bit(br, 0);
30 29
31 // Ensure there's no ambigous collision with any index marker bytes 30 // Ensure there's no ambigous collision with any index marker bytes
32 if ((br->buffer[br->pos - 1] & 0xe0) == 0xc0) 31 if ((br->buffer[br->pos - 1] & 0xe0) == 0xc0)
33 br->buffer[br->pos++] = 0; 32 br->buffer[br->pos++] = 0;
34 } 33 }
35 34
OLDNEW
« no previous file with comments | « source/libvpx/vp9/encoder/vp9_writer.h ('k') | source/libvpx/vp9/encoder/x86/vp9_dct_avx2.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698