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

Side by Side Diff: r19350_init_loop_filter_127fix.patch

Issue 164120: Add patches for block-level quant in theora, -O2 on build, and statically link pthread on Windows (Closed) Base URL: svn://chrome-svn/chrome/trunk/deps/third_party/ffmpeg/
Patch Set: '' Created 11 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 | « r18986_theora_block_quant.patch ('k') | r19351_theora_decode_tables_limit127.patch » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Property Changes:
Name: svn:eol-style
+ LF
OLDNEW
(Empty)
1 commit 65b567e7b7a1f2687baee2e4e53bf537013d2477
2 Author: reimar <reimar@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
3 Date: Sun Jul 5 18:25:58 2009 +0000
4
5 Extend init_loop_filter to work for filter limit values up to 127 instead
6 of only up to 64. 127 is the maximum value allowed by the theora specificati on.
7
8
9 git-svn-id: file:///var/local/repositories/ffmpeg/trunk@19350 9553f0bf-9b14- 0410-a0b8-cfaf0461ba5b
10
11 diff --git a/libavcodec/vp3.c b/libavcodec/vp3.c
12 index 7612851..66ac2f9 100644
13 --- a/libavcodec/vp3.c
14 +++ b/libavcodec/vp3.c
15 @@ -517,23 +517,30 @@ static void init_dequantizer(Vp3DecodeContext *s, int qpi)
16 /*
17 * This function initializes the loop filter boundary limits if the frame's
18 * quality index is different from the previous frame's.
19 + *
20 + * The filter_limit_values may not be larger than 127.
21 */
22 static void init_loop_filter(Vp3DecodeContext *s)
23 {
24 int *bounding_values= s->bounding_values_array+127;
25 int filter_limit;
26 int x;
27 + int value;
28
29 filter_limit = s->filter_limit_values[s->qps[0]];
30
31 /* set up the bounding values */
32 memset(s->bounding_values_array, 0, 256 * sizeof(int));
33 for (x = 0; x < filter_limit; x++) {
34 - bounding_values[-x - filter_limit] = -filter_limit + x;
35 bounding_values[-x] = -x;
36 bounding_values[x] = x;
37 - bounding_values[x + filter_limit] = filter_limit - x;
38 }
39 + for (x = value = filter_limit; x < 128 && value; x++, value--) {
40 + bounding_values[ x] = value;
41 + bounding_values[-x] = -value;
42 + }
43 + if (value)
44 + bounding_values[128] = value;
45 bounding_values[129] = bounding_values[130] = filter_limit * 0x02020202;
46 }
47
OLDNEW
« no previous file with comments | « r18986_theora_block_quant.patch ('k') | r19351_theora_decode_tables_limit127.patch » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698