BradLarson / GPUImage

An open source iOS framework for GPU-based image and video processing
http://www.sunsetlakesoftware.com/2012/02/12/introducing-gpuimage-framework
BSD 3-Clause "New" or "Revised" License
20.25k stars 4.61k forks source link

Intermittent vertical magenta lines through filtered video feed. #1236

Open ghost opened 11 years ago

ghost commented 11 years ago

I'm just flagging this as an observation as I have no idea of the underlying cause.

I have a live video feed that is clipped and scaled and displayed in a view.

Intermittently (3-4 minutes apart) while the app is running near vertical magenta lines will appear, then disappear again.

I see no other evidence of issues via debug e.t.c

As far as I know there is no other activity in the App at the time the lines appear.

I am running the App on iPhone5/ios7

BradLarson commented 11 years ago

What's the exact filter chain you're using that demonstrates this effect? It's possibly related to the known issue on iOS 7 with two-pass filters, but I'd like to try to reproduce this myself.

ghost commented 11 years ago

Hereis the exact filter code:

videoCamera = [[GPUImageVideoCamera alloc] initWithSessionPreset:AVCaptureSessionPresetiFrame960x540 cameraPosition:AVCaptureDevicePositionBack];

    videoCamera.outputImageOrientation = UIInterfaceOrientationPortrait;
    videoCamera.horizontallyMirrorFrontFacingCamera = NO;
    videoCamera.horizontallyMirrorRearFacingCamera = NO;

    GPUImageCropFilter *cropFilter = [[GPUImageCropFilter alloc] initWithCropRegion:CGRectMake(0.0f, 0.0f, 0.94814814814815f, 0.53333333333333f)];

    GPUImageTransformFilter *transformFilter = [[GPUImageTransformFilter alloc] init];
    transformFilter.affineTransform = CGAffineTransformMakeRotation(0.0);
    [cropFilter addTarget:transformFilter];

    [transformFilter prepareForImageCapture];

    [videoCamera addTarget:cropFilter];

    [videoCamera startCameraCapture];
JensDee commented 11 years ago

It could also be a hardware bug of the iPhone. I had magenta lines appearing on an iPhone 5 a while ago. Just using normal AVFoundation classes. Got a replacement phone and it did not occur again. I have heard from some other users that they were having this bug with the iPhone 5S as well (not related to GPUImage).