[FFmpeg-devel] [PATCH 2/4] avcodec/codec_desc, jvdec: JV is not intra-only

Andreas Rheinhardt andreas.rheinhardt at outlook.com
Thu May 9 05:04:41 EEST 2024


It reuses the previous frame and does not code unchanged blocks.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>
---
 libavcodec/codec_desc.c |  2 +-
 libavcodec/jvdec.c      |  2 --
 tests/ref/fate/jv-demux | 14 +++++++-------
 3 files changed, 8 insertions(+), 10 deletions(-)

diff --git a/libavcodec/codec_desc.c b/libavcodec/codec_desc.c
index 7dba61dc8b..5ae26f5d2b 100644
--- a/libavcodec/codec_desc.c
+++ b/libavcodec/codec_desc.c
@@ -1095,7 +1095,7 @@ static const AVCodecDescriptor codec_descriptors[] = {
         .type      = AVMEDIA_TYPE_VIDEO,
         .name      = "jv",
         .long_name = NULL_IF_CONFIG_SMALL("Bitmap Brothers JV video"),
-        .props     = AV_CODEC_PROP_INTRA_ONLY | AV_CODEC_PROP_LOSSY,
+        .props     = AV_CODEC_PROP_LOSSY,
     },
     {
         .id        = AV_CODEC_ID_DFA,
diff --git a/libavcodec/jvdec.c b/libavcodec/jvdec.c
index 13ede9068a..2b7c9f0d29 100644
--- a/libavcodec/jvdec.c
+++ b/libavcodec/jvdec.c
@@ -215,8 +215,6 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *rframe,
     }
 
     if (video_size) {
-        s->frame->flags |= AV_FRAME_FLAG_KEY;
-        s->frame->pict_type           = AV_PICTURE_TYPE_I;
 #if FF_API_PALETTE_HAS_CHANGED
 FF_DISABLE_DEPRECATION_WARNINGS
         s->frame->palette_has_changed = s->palette_has_changed;
diff --git a/tests/ref/fate/jv-demux b/tests/ref/fate/jv-demux
index b5d3196cf5..22a9217e23 100644
--- a/tests/ref/fate/jv-demux
+++ b/tests/ref/fate/jv-demux
@@ -11,13 +11,13 @@
 0,          0,          0,        1,        6, 0x000a0003
 1,          0,          0,   131072,   131072, 0x14c664d6
 0,          1,          1,        1,      773, 0x11802a51
-0,          2,          2,        1,    12974, 0xc2e466b7
-0,          3,          3,        1,    12200, 0x3c0eeb31
-0,          4,          4,        1,    13339, 0x91d82488
-0,          5,          5,        1,    13940, 0x064c350a
-0,          6,          6,        1,    14418, 0x078d2dd2
-0,          7,          7,        1,    14539, 0x145167ed
-0,          8,          8,        1,     2552, 0xcf2b1db7, F=0x3
+0,          2,          2,        1,    12974, 0xc2e466b7, F=0x0
+0,          3,          3,        1,    12200, 0x3c0eeb31, F=0x0
+0,          4,          4,        1,    13339, 0x91d82488, F=0x0
+0,          5,          5,        1,    13940, 0x064c350a, F=0x0
+0,          6,          6,        1,    14418, 0x078d2dd2, F=0x0
+0,          7,          7,        1,    14539, 0x145167ed, F=0x0
+0,          8,          8,        1,     2552, 0xcf2b1db7, F=0x2
 1,     131072,     131072,     1764,     1764, 0x30be734d
 1,     132836,     132836,     1764,     1764, 0xa4c873a7
 1,     134600,     134600,     1764,     1764, 0xd5f17443
-- 
2.40.1



More information about the ffmpeg-devel mailing list