| Index: r19350_init_loop_filter_127fix.patch
|
| ===================================================================
|
| --- r19350_init_loop_filter_127fix.patch (revision 0)
|
| +++ r19350_init_loop_filter_127fix.patch (revision 0)
|
| @@ -0,0 +1,47 @@
|
| +commit 65b567e7b7a1f2687baee2e4e53bf537013d2477
|
| +Author: reimar <reimar@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
|
| +Date: Sun Jul 5 18:25:58 2009 +0000
|
| +
|
| + Extend init_loop_filter to work for filter limit values up to 127 instead
|
| + of only up to 64. 127 is the maximum value allowed by the theora specification.
|
| +
|
| +
|
| + git-svn-id: file:///var/local/repositories/ffmpeg/trunk@19350 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
|
| +
|
| +diff --git a/libavcodec/vp3.c b/libavcodec/vp3.c
|
| +index 7612851..66ac2f9 100644
|
| +--- a/libavcodec/vp3.c
|
| ++++ b/libavcodec/vp3.c
|
| +@@ -517,23 +517,30 @@ static void init_dequantizer(Vp3DecodeContext *s, int qpi)
|
| + /*
|
| + * This function initializes the loop filter boundary limits if the frame's
|
| + * quality index is different from the previous frame's.
|
| ++ *
|
| ++ * The filter_limit_values may not be larger than 127.
|
| + */
|
| + static void init_loop_filter(Vp3DecodeContext *s)
|
| + {
|
| + int *bounding_values= s->bounding_values_array+127;
|
| + int filter_limit;
|
| + int x;
|
| ++ int value;
|
| +
|
| + filter_limit = s->filter_limit_values[s->qps[0]];
|
| +
|
| + /* set up the bounding values */
|
| + memset(s->bounding_values_array, 0, 256 * sizeof(int));
|
| + for (x = 0; x < filter_limit; x++) {
|
| +- bounding_values[-x - filter_limit] = -filter_limit + x;
|
| + bounding_values[-x] = -x;
|
| + bounding_values[x] = x;
|
| +- bounding_values[x + filter_limit] = filter_limit - x;
|
| + }
|
| ++ for (x = value = filter_limit; x < 128 && value; x++, value--) {
|
| ++ bounding_values[ x] = value;
|
| ++ bounding_values[-x] = -value;
|
| ++ }
|
| ++ if (value)
|
| ++ bounding_values[128] = value;
|
| + bounding_values[129] = bounding_values[130] = filter_limit * 0x02020202;
|
| + }
|
| +
|
|
|
| Property changes on: r19350_init_loop_filter_127fix.patch
|
| ___________________________________________________________________
|
| Name: svn:eol-style
|
| + LF
|
|
|
|
|