Opened 6 years ago

Closed 6 years ago

#5657 closed enhancement (fixed)

support Apple 64-bit ARGB ('b64a')

Reported by: v0lt Owned by:
Priority: wish Component: avcodec
Version: git-master Keywords:
Cc: Blocked By:
Blocking: Reproduced by developer: yes
Analyzed by developer: no

Description

Attachments (2)

b64a.mov (2.3 MB ) - added by Carl Eugen Hoyos 6 years ago.
b64a.patch (1.2 KB ) - added by v0lt 6 years ago.

Change History (13)

comment:1 by Carl Eugen Hoyos, 6 years ago

Component: avcodecundetermined
Priority: minorwish

Which player plays the sample you provided?

comment:2 by v0lt, 6 years ago

Quick Time Player 7.7.9

comment:3 by Carl Eugen Hoyos, 6 years ago

The QuickTime 7 player I have here refuses to play any avi files, how do you test?

comment:4 by ami_stuff, 6 years ago

I can confirm that this file decodes correctly with QT 7.6 on Win.

in reply to:  3 comment:5 by v0lt, 6 years ago

Replying to cehoyos:

The QuickTime 7 player I have here refuses to play any avi files, how do you test?

I ran Quick Time Player 7.7.9 and pulled the file in the player window. The file is played correctly.
http://i.imgur.com/Kf3xs5M.jpg

by Carl Eugen Hoyos, 6 years ago

Attachment: b64a.mov added

comment:6 by Carl Eugen Hoyos, 6 years ago

Reproduced by developer: set
Status: newopen
Version: unspecifiedgit-master

This either needs a (trivial) codec or a new colourspace in libswscale.

comment:7 by v0lt, 6 years ago

I think there packet ARGB64BE format. If swap all the bytes of the pixel, we get AV_PIX_FMT_BGRA64LE.

comment:8 by v0lt, 6 years ago

Or change the position of the alpha channel, then we get AV_PIX_FMT_RGBA64BE.

// ARGB64BE -> AV_PIX_FMT_RGBA64BE
uint64_t pixel = ...;
pixel = pixel << 48 | pixel >> 16;
Last edited 6 years ago by v0lt (previous) (diff)

by v0lt, 6 years ago

Attachment: b64a.patch added

comment:9 by Carl Eugen Hoyos, 6 years ago

I just sent your patch to the development mailing list, in the future please prepare your patches with git format-patch and send them to ffmpeg-devel, patches are generally ignored on this bug tracker.

comment:10 by Arnaud, 6 years ago

I also think they packaged as ARGB64BE indeed.

I'm not sure what the patch proposed is doing exactly, but it seems like it interprets AV_PIX_FMT_RGBA64BE as ARGBBE when codec is b64a.
Wouldn't it make more sense to add a new AV_PIX_FMT_ARGB64BE pixel format?
To also allow conversion from/to this format for example.
But this would probably requires more work to fully support it everywhere..

comment:11 by Carl Eugen Hoyos, 6 years ago

Component: undeterminedavcodec
Resolution: fixed
Status: openclosed
Note: See TracTickets for help on using tickets.