Opened 14 years ago

Closed 14 years ago

Last modified 14 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:
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 14 years ago.
Clockwerk crash
MediaConverter_sse2_error.png (99.1 KB ) - added by stippi 14 years ago.
MediaConverter crash
use_swscale_patch.diff (9.0 KB ) - added by stippi 14 years ago.
Patch which fixes the problem by re-using libswscale as the Encoder already does.

Download all attachments as: .zip

Change History (9)

by stippi, 14 years ago

Attachment: Clockwerk_sse2_error.png added

Clockwerk crash

by stippi, 14 years ago

MediaConverter crash

comment:1 by jahaiku, 14 years ago

Cc: Jens.Arm@… added

by stippi, 14 years ago

Attachment: use_swscale_patch.diff added

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

comment:2 by dlmcpaul, 14 years ago

Status: newassigned

Can you tell me more about the file?

Container, Codec, width, height?

comment:3 by stippi, 14 years ago

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 by dlmcpaul, 14 years ago

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 by axeld, 14 years ago

Component: Add-OnsAudio & Video/Codecs

That would be nice, I guess.

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

in reply to:  5 comment:6 by dlmcpaul, 14 years ago

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.