[FFmpeg-cvslog] ape: Support _0000 files with nblock smaller than 64

2015-06-01 Thread Andreas Cadhalpun
ffmpeg | branch: release/2.2 | Andreas Cadhalpun 
andreas.cadhal...@googlemail.com | Wed Apr 29 20:39:22 2015 +0200| 
[9726f3007196a9c3589c4f09a81c0d75e1d97f2c] | committer: Reinhard Tartler

ape: Support _ files with nblock smaller than 64

The decode_array_ assumed that 64 is the minimal block size
while it is not.

CC: libav-sta...@libav.org
Signed-off-by: Luca Barbato lu_z...@gentoo.org
(cherry picked from commit ac1660509ecfbeca7b63eb5ab8360011180e705b)
Signed-off-by: Reinhard Tartler siret...@tauware.de

 http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=9726f3007196a9c3589c4f09a81c0d75e1d97f2c
---

 libavcodec/apedec.c |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavcodec/apedec.c b/libavcodec/apedec.c
index 8669db8..d107d2b 100644
--- a/libavcodec/apedec.c
+++ b/libavcodec/apedec.c
@@ -590,12 +590,12 @@ static void decode_array_(APEContext *ctx, 
GetBitContext *gb,
 int ksummax, ksummin;
 
 rice-ksum = 0;
-for (i = 0; i  5; i++) {
+for (i = 0; i  FFMIN(blockstodecode, 5); i++) {
 out[i] = get_rice_ook(ctx-gb, 10);
 rice-ksum += out[i];
 }
 rice-k = av_log2(rice-ksum / 10) + 1;
-for (; i  64; i++) {
+for (; i  FFMIN(blockstodecode, 64); i++) {
 out[i] = get_rice_ook(ctx-gb, rice-k);
 rice-ksum += out[i];
 rice-k = av_log2(rice-ksum / ((i + 1) * 2)) + 1;

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog


[FFmpeg-cvslog] ape: Support _0000 files with nblock smaller than 64

2015-05-19 Thread Andreas Cadhalpun
ffmpeg | branch: release/2.4 | Andreas Cadhalpun 
andreas.cadhal...@googlemail.com | Wed Apr 29 20:39:22 2015 +0200| 
[ac1660509ecfbeca7b63eb5ab8360011180e705b] | committer: Vittorio Giovara

ape: Support _ files with nblock smaller than 64

The decode_array_ assumed that 64 is the minimal block size
while it is not.

CC: libav-sta...@libav.org
Signed-off-by: Luca Barbato lu_z...@gentoo.org

 http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ac1660509ecfbeca7b63eb5ab8360011180e705b
---

 libavcodec/apedec.c |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavcodec/apedec.c b/libavcodec/apedec.c
index 344c85b..131c6f3 100644
--- a/libavcodec/apedec.c
+++ b/libavcodec/apedec.c
@@ -614,12 +614,12 @@ static void decode_array_(APEContext *ctx, 
GetBitContext *gb,
 int ksummax, ksummin;
 
 rice-ksum = 0;
-for (i = 0; i  5; i++) {
+for (i = 0; i  FFMIN(blockstodecode, 5); i++) {
 out[i] = get_rice_ook(ctx-gb, 10);
 rice-ksum += out[i];
 }
 rice-k = av_log2(rice-ksum / 10) + 1;
-for (; i  64; i++) {
+for (; i  FFMIN(blockstodecode, 64); i++) {
 out[i] = get_rice_ook(ctx-gb, rice-k);
 rice-ksum += out[i];
 rice-k = av_log2(rice-ksum / ((i + 1) * 2)) + 1;

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog


[FFmpeg-cvslog] ape: Support _0000 files with nblock smaller than 64

2015-05-10 Thread Andreas Cadhalpun
ffmpeg | branch: master | Andreas Cadhalpun andreas.cadhal...@googlemail.com 
| Wed Apr 29 20:39:22 2015 +0200| [295e05a762332c5edcc84c325e94457815a51b5c] | 
committer: Luca Barbato

ape: Support _ files with nblock smaller than 64

The decode_array_ assumed that 64 is the minimal block size
while it is not.

CC: libav-sta...@libav.org
Signed-off-by: Luca Barbato lu_z...@gentoo.org

 http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=295e05a762332c5edcc84c325e94457815a51b5c
---

 libavcodec/apedec.c |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavcodec/apedec.c b/libavcodec/apedec.c
index 344c85b..131c6f3 100644
--- a/libavcodec/apedec.c
+++ b/libavcodec/apedec.c
@@ -614,12 +614,12 @@ static void decode_array_(APEContext *ctx, 
GetBitContext *gb,
 int ksummax, ksummin;
 
 rice-ksum = 0;
-for (i = 0; i  5; i++) {
+for (i = 0; i  FFMIN(blockstodecode, 5); i++) {
 out[i] = get_rice_ook(ctx-gb, 10);
 rice-ksum += out[i];
 }
 rice-k = av_log2(rice-ksum / 10) + 1;
-for (; i  64; i++) {
+for (; i  FFMIN(blockstodecode, 64); i++) {
 out[i] = get_rice_ook(ctx-gb, rice-k);
 rice-ksum += out[i];
 rice-k = av_log2(rice-ksum / ((i + 1) * 2)) + 1;

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog