Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: Paul B Mahol <onemda@gmail.com>
To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org>
Subject: [FFmpeg-devel] [PATCH] cfhd decoder fixes for old codebook
Date: Sat, 3 Sep 2022 11:09:45 +0200
Message-ID: <CAPYw7P48XEW=oLVnhFDtcFos_Z5bTqJJ9_F5Engeg7z2UPi9sg@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 10 bytes --]

Attached.

[-- Attachment #2: 0001-avcodec-cfhddata-remove-unused-defines.patch --]
[-- Type: text/x-patch, Size: 882 bytes --]

From 485600a2bd216a92b7035caaa1992dd5a9438848 Mon Sep 17 00:00:00 2001
From: Paul B Mahol <onemda@gmail.com>
Date: Sat, 3 Sep 2022 09:23:39 +0200
Subject: [PATCH 1/2] avcodec/cfhddata: remove unused defines

Signed-off-by: Paul B Mahol <onemda@gmail.com>
---
 libavcodec/cfhddata.c | 8 --------
 1 file changed, 8 deletions(-)

diff --git a/libavcodec/cfhddata.c b/libavcodec/cfhddata.c
index 55c8004bdd..8079fdf542 100644
--- a/libavcodec/cfhddata.c
+++ b/libavcodec/cfhddata.c
@@ -24,14 +24,6 @@
 
 #include "cfhd.h"
 
-/* some special codewords, not sure what they all mean */
-#define TABLE_9_BAND_END1 0x1C7859Eh
-#define TABLE_9_BAND_END_LEN1 25
-#define TABLE_9_BAND_END2 0x38F0B3Fh
-#define TABLE_9_BAND_END_LEN2 26
-#define TABLE_9_BAND_END3 0x38F0B3Eh
-#define TABLE_9_BAND_END_LEN3 26
-
 #define NB_VLC_TABLE_9   (71 + 3)
 #define NB_VLC_TABLE_18 (263 + 1)
 
-- 
2.37.2


[-- Attachment #3: 0002-avcodec-cfhd-fix-escape-handling-for-old-codebook.patch --]
[-- Type: text/x-patch, Size: 1344 bytes --]

From 64a2e914bb2d0e4833266a51ee2ada3bb8b36e9e Mon Sep 17 00:00:00 2001
From: Paul B Mahol <onemda@gmail.com>
Date: Sat, 3 Sep 2022 11:06:14 +0200
Subject: [PATCH 2/2] avcodec/cfhd: fix escape handling for old codebook

Signed-off-by: Paul B Mahol <onemda@gmail.com>
---
 libavcodec/cfhd.c     | 2 +-
 libavcodec/cfhddata.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavcodec/cfhd.c b/libavcodec/cfhd.c
index f908aaf8fb..e72512707e 100644
--- a/libavcodec/cfhd.c
+++ b/libavcodec/cfhd.c
@@ -819,7 +819,7 @@ static int cfhd_decode(AVCodecContext *avctx, AVFrame *pic,
                                    VLC_BITS, 3, 1);
 
                         /* escape */
-                        if (level == 64)
+                        if (level == 64 && run == 2)
                             break;
 
                         count += run;
diff --git a/libavcodec/cfhddata.c b/libavcodec/cfhddata.c
index 8079fdf542..67bd8e66db 100644
--- a/libavcodec/cfhddata.c
+++ b/libavcodec/cfhddata.c
@@ -72,7 +72,7 @@ static const uint16_t table_9_vlc_run[NB_VLC_TABLE_9] = {
     1,    1,    1,    1,    1,    1,    1,    1,
     1,    1,    1,    1,    1,    1,    1,    1,
     1,    1,    1,    1,    1,    1,    1,    1,
-    1,    1
+    1,    2,
 };
 
 static const uint8_t table_9_vlc_level[NB_VLC_TABLE_9] = {
-- 
2.37.2


[-- Attachment #4: Type: text/plain, Size: 251 bytes --]

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

             reply	other threads:[~2022-09-03  9:06 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-03  9:09 Paul B Mahol [this message]
2022-09-03 11:01 ` Kieran Kunhya

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAPYw7P48XEW=oLVnhFDtcFos_Z5bTqJJ9_F5Engeg7z2UPi9sg@mail.gmail.com' \
    --to=onemda@gmail.com \
    --cc=ffmpeg-devel@ffmpeg.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
		ffmpegdev@gitmailbox.com
	public-inbox-index ffmpegdev

Example config snippet for mirrors.


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git