diff mbox

[FFmpeg-devel] Added support for version field flag 0x04 in OpenEXR files

Message ID CADTTen-45JzoNsGF81uHuHMT3ezKrO3Uk-1KRObuBzYmbmYR8Q@mail.gmail.com
State New
Headers show

Commit Message

Daniel Flehner Heen Feb. 21, 2018, 12:25 a.m. UTC
Hi!

First time poster so please excuse any mistakes made. I've tried submitting
a patch through git send-email but got issues authentication through gmail.
Attached is a patch file created with git format-patch.

Commit message:

Added support for version field flag 0x04 in OpenEXR files regarding long
names in attributes.
Should have no impact on decoding of images.

Also added a bit more verbose logging of OpenEXR 2.x flags not yet
supported.

Comments

Martin Vignali Feb. 21, 2018, 10:55 a.m. UTC | #1
2018-02-21 1:25 GMT+01:00 Daniel Flehner Heen <flehnerheener@gmail.com>:

> Hi!
>
> First time poster so please excuse any mistakes made. I've tried submitting
> a patch through git send-email but got issues authentication through gmail.
> Attached is a patch file created with git format-patch.
>
> Commit message:
>
> Added support for version field flag 0x04 in OpenEXR files regarding long
> names in attributes.
> Should have no impact on decoding of images.
>
> Also added a bit more verbose logging of OpenEXR 2.x flags not yet
> supported.
>

Hello,

A similar patch, have been post on this mailing list, and i plan to apply
it soon (probably not before the end of the week)
The discussion can be follow here :
http://ffmpeg.org/pipermail/ffmpeg-devel/2018-February/225443.html
(the patch i plan to apply can be found here :
http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20180217/da0052a9/attachment.obj
)

Looking your patch, doesn't sure it's correct,
Long name flag can be set with tile or deep data (same idea for multipart
and deep data (there is a sample in the official repo if i correctly
remember))
So it's not one flag or another.

Martin
Daniel Flehner Heen Feb. 21, 2018, 11:12 a.m. UTC | #2
Ok, thanks. Glad it's getting sorted :)

On Feb 21, 2018 12:01, "Martin Vignali" <martin.vignali@gmail.com> wrote:

> 2018-02-21 1:25 GMT+01:00 Daniel Flehner Heen <flehnerheener@gmail.com>:
>
> > Hi!
> >
> > First time poster so please excuse any mistakes made. I've tried
> submitting
> > a patch through git send-email but got issues authentication through
> gmail.
> > Attached is a patch file created with git format-patch.
> >
> > Commit message:
> >
> > Added support for version field flag 0x04 in OpenEXR files regarding long
> > names in attributes.
> > Should have no impact on decoding of images.
> >
> > Also added a bit more verbose logging of OpenEXR 2.x flags not yet
> > supported.
> >
>
> Hello,
>
> A similar patch, have been post on this mailing list, and i plan to apply
> it soon (probably not before the end of the week)
> The discussion can be follow here :
> http://ffmpeg.org/pipermail/ffmpeg-devel/2018-February/225443.html
> (the patch i plan to apply can be found here :
> http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/
> 20180217/da0052a9/attachment.obj
> )
>
> Looking your patch, doesn't sure it's correct,
> Long name flag can be set with tile or deep data (same idea for multipart
> and deep data (there is a sample in the official repo if i correctly
> remember))
> So it's not one flag or another.
>
> Martin
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
diff mbox

Patch

From 0a8c7b74ef6ad39c7ce4a2eaa8327dd4a1f9d851 Mon Sep 17 00:00:00 2001
From: Daniel Flehner Heen <flehnerheener@gmail.com>
Date: Tue, 20 Feb 2018 23:36:29 +0100
Subject: [PATCH] Added support for version field flag 0x04 in OpenEXR files

Added support for version field flag 0x04 in OpenEXR files regarding long names in attributes.
Should have no impact on decoding of images.

Also added a bit more verbose logging of OpenEXR 2.x flags not yet supported.
---
 libavcodec/exr.c | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/libavcodec/exr.c b/libavcodec/exr.c
index 47f59bd..238ee4a 100644
--- a/libavcodec/exr.c
+++ b/libavcodec/exr.c
@@ -1354,7 +1354,15 @@  static int decode_header(EXRContext *s, AVFrame *frame)
         s->is_tile = 0;
     else if (flags & 0x02)
         s->is_tile = 1;
-    else{
+    else if (flags & 0x04)
+        av_log(s->avctx, AV_LOG_DEBUG, "Long attribute names flag detected %d.\n", flags);
+    else if (flags & 0x08) {
+        avpriv_report_missing_feature(s->avctx, "OpenEXR 2.x deep format flag %d", flags);
+        return AVERROR_PATCHWELCOME;
+    } else if (flags & 0x10) {
+        avpriv_report_missing_feature(s->avctx, "OpenEXR 2.x multipart flag %d", flags);
+        return AVERROR_PATCHWELCOME;
+    } else {
         avpriv_report_missing_feature(s->avctx, "flags %d", flags);
         return AVERROR_PATCHWELCOME;
     }
-- 
2.7.4