Commit a4471895 authored by jbr's avatar jbr

Add support for FLAC's new RICE2 entropy coding method. Patch by Josh Coalson.

git-svn-id: file:///var/local/repositories/ffmpeg/trunk@10915 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 6bb33abf
...@@ -217,7 +217,7 @@ static int decode_residuals(FLACContext *s, int channel, int pred_order) ...@@ -217,7 +217,7 @@ static int decode_residuals(FLACContext *s, int channel, int pred_order)
int sample = 0, samples; int sample = 0, samples;
method_type = get_bits(&s->gb, 2); method_type = get_bits(&s->gb, 2);
if (method_type != 0){ if (method_type > 1){
av_log(s->avctx, AV_LOG_DEBUG, "illegal residual coding method %d\n", method_type); av_log(s->avctx, AV_LOG_DEBUG, "illegal residual coding method %d\n", method_type);
return -1; return -1;
} }
...@@ -234,8 +234,8 @@ static int decode_residuals(FLACContext *s, int channel, int pred_order) ...@@ -234,8 +234,8 @@ static int decode_residuals(FLACContext *s, int channel, int pred_order)
i= pred_order; i= pred_order;
for (partition = 0; partition < (1 << rice_order); partition++) for (partition = 0; partition < (1 << rice_order); partition++)
{ {
tmp = get_bits(&s->gb, 4); tmp = get_bits(&s->gb, method_type == 0 ? 4 : 5);
if (tmp == 15) if (tmp == (method_type == 0 ? 15 : 31))
{ {
av_log(s->avctx, AV_LOG_DEBUG, "fixed len partition\n"); av_log(s->avctx, AV_LOG_DEBUG, "fixed len partition\n");
tmp = get_bits(&s->gb, 5); tmp = get_bits(&s->gb, 5);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment