[FFmpeg-trac] #4814(undetermined:new): swscale default alpha blending drops alpha

FFmpeg trac at avcodec.org
Mon Aug 31 12:47:23 CEST 2015


#4814: swscale default alpha blending drops alpha
-------------------------------------+-------------------------------------
             Reporter:  michael      |                    Owner:
                 Type:  enhancement  |                   Status:  new
             Priority:  normal       |                Component:
              Version:  unspecified  |  undetermined
             Keywords:  swscale,     |               Resolution:
  alpha                              |               Blocked By:
             Blocking:               |  Reproduced by developer:  0
Analyzed by developer:  0            |
-------------------------------------+-------------------------------------

Comment (by iive):

 Using the alpha channel means that you allow the player and/or editing
 software to put any kind of background there.
 This is the only reasonable assumption.

 Black and white chessboard pattern is used by all editing software. We
 should do the same.

 ----
 So far three default behaviors have been argued:

 - Alpha channel should be ignored/dropped.
  There are encodes that signal existence of alpha channel, but it contains
 random garbage. Also this is the fastest way to handle the conversion.

 - The image should be alpha blended with white background. Sample
 "laraShadow_dl.flv" looks correctly only with that assumption.

 - The image should be alpha blended with black background. Sample from
 #4746 (prores) looks correctly only with that assumption.

 All these behaviors are wrong. None of them could be enabled without
 breaking the other two. On top of that they would be breaking in quite
 obscure way.

 ----
 The optimal solution would be to have format specific workarounds.

 For the general case, I think that the default should be black&white
 chessboard pattern:
 - It is already supported as mode for alpha blending.
 - It is used by all editing software to signal the presence of alpha
 channel.
 - The users would immediately recognize it and will know that the problem
 is related to alpha channels. Then they can set the desired behavior on
 their own and eventually demand format specific workaround from us.

--
Ticket URL: <https://trac.ffmpeg.org/ticket/4814#comment:2>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list