[haiku-development] Re: BMediaTrack->ReadChunk() query

  • From: Stephan Aßmus <superstippi@xxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Fri, 11 Oct 2019 18:23:22 +0200

Am 11.10.2019 um 18:13 schrieb Dario Casalinuovo:

On Fri, Oct 11, 2019 at 3:24 PM Zenja Solaja <solaja@xxxxxxxxx
<mailto:solaja@xxxxxxxxx>> wrote:

    Thanks Dario.  Yes, the fallback path of using ffmpeg for decoding
    is also on my mind.  Until I encountered the encoding phase of my
    project, using the existing BMediaTrack->ReadFrames() code in the
    past has proven itself to be quite decent and robust for my
    seeking/displaying/editing purposes.  It would be a shame to ditch
    this working code simply because I dont have access to a non-colour
    conversion code path.  It's just a question of skipping the swscaler
    code in the Decode() function of the ffmpeg plugin, something an
    additional API argument could provide.


This is where I think the code forces B_RGB32:

https://github.com/haiku/haiku/blob/master/src/add-ons/media/plugins/ffmpeg/AVCodecDecoder.cpp#L481

Indeed. Someone defined USE_SWS_FOR_COLOR_SPACE_CONVERSION to 1 in the
header, I am not familiar with the reasons. I guess one could put in
some effort to match B_YCbCr_422 to the required SWS functions in FFmpeg
and turn support back on.

Best regards,
-Stephan


Other related posts: