Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#4948 closed bug (fixed)

New SSE2/3 color conversion in the FFmpeg plug-in crashes Clockwerk/MediaConverter [patch]

Reported by: stippi Owned by: dlmcpaul
Priority: normal Milestone: R1
Component: Audio & Video/Codecs Version: R1/alpha1
Keywords: Cc: Jens.Arm@…
Blocked By: Blocking:
Has a Patch: no Platform: All

Description

The subject says it all. I have not investigated this further, but have fixed the issue for me by simply using the existing swscale functionality, as I already did in the AVCodecEncoder. See attached patch. I can provide a test video (ca. 91 MB) that reproduces the problem when loaded in Clockwerk.

Attachments (3)

Clockwerk_sse2_error.png (96.9 KB) - added by stippi 10 years ago.
Clockwerk crash
MediaConverter_sse2_error.png (99.1 KB) - added by stippi 10 years ago.
MediaConverter crash
use_swscale_patch.diff (9.0 KB) - added by stippi 10 years ago.
Patch which fixes the problem by re-using libswscale as the Encoder already does.

Download all attachments as: .zip

Change History (9)

Changed 10 years ago by stippi

Attachment: Clockwerk_sse2_error.png added

Clockwerk crash

Changed 10 years ago by stippi

MediaConverter crash

comment:1 Changed 10 years ago by jahaiku

Cc: Jens.Arm@… added

Changed 10 years ago by stippi

Attachment: use_swscale_patch.diff added

Patch which fixes the problem by re-using libswscale as the Encoder already does.

comment:2 Changed 10 years ago by dlmcpaul

Status: newassigned

Can you tell me more about the file?

Container, Codec, width, height?

comment:3 Changed 10 years ago by stippi

As far as I was told, it happens with any file. The only file I tried is an AVCHD MPEG2 TS Container with H.264 encoding and AC3 5.1 sound. The video is 1440x1080 YCbCr420.

comment:4 Changed 10 years ago by dlmcpaul

Resolution: fixed
Status: assignedclosed

Ok MediaConverter and I assume Clockwerk are using new to create the video buffers and this is not creating a 32 byte aligned pointer. For best performance with SSE2 code and later an aligned buffer is needed. MediaPlayer seems to do this ok.

I have added additional checks to detect alignment issues.

Should there perhaps be a media kit function to create media buffers so we can enforce the restrictions?

comment:5 Changed 10 years ago by axeld

Component: Add-OnsAudio & Video/Codecs

That would be nice, I guess.

BTW you forgot to mention that you fixed the problem in hrev34047.

comment:6 in reply to:  5 Changed 10 years ago by dlmcpaul

Replying to axeld:

That would be nice, I guess.

There is the Media Kits Media Buffers. Not sure if they guarantee any alignment though.

SSE2 does have non-aligned loads and stores but they are pretty slow compared to aligned loads/stores.

BTW you forgot to mention that you fixed the problem in hrev34047.

Yep, sorry. I linked the commit to the trac issue but not the trac issue to the commit.

Note: See TracTickets for help on using tickets.