[FFmpeg-cvslog] avcodec/exr: handle case when |im - IM| == 1 for huff compression

Paul B Mahol git at videolan.org
Sun Feb 28 03:06:55 EET 2021


ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Sun Feb 28 02:03:11 2021 +0100| [85ab9deb9808add099e8564b80244698e5649852] | committer: Paul B Mahol

avcodec/exr: handle case when |im - IM| == 1 for huff compression

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

 libavcodec/exr.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/libavcodec/exr.c b/libavcodec/exr.c
index 5f99d9d5ab..4559174ba2 100644
--- a/libavcodec/exr.c
+++ b/libavcodec/exr.c
@@ -420,6 +420,11 @@ static int huf_build_dec_table(EXRContext *s,
             td->run_sym = i;
     }
 
+    if (im > 0)
+        td->run_sym = 0;
+    else if (iM < 65535)
+        td->run_sym = 65535;
+
     if (td->run_sym == -1) {
         avpriv_request_sample(s->avctx, "No place for run symbol");
         return AVERROR_PATCHWELCOME;



More information about the ffmpeg-cvslog mailing list