Webcam Stream + asm.js behavior changed in FF v47 (only on Mac)

UNCONFIRMED
Unassigned

Status

()

Core
Graphics
P3
normal
UNCONFIRMED
a year ago
4 months ago

People

(Reporter: marcel.klammer, Unassigned)

Tracking

(Blocks: 1 bug)

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [gfx-noted])

(Reporter)

Description

a year ago
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36

Steps to reproduce:

Emscripten compiled Face Tracking library: BRF.

Works fine in FF (Mac) v46.0.1 and below.
Works fine in FF (Win)
Works fine in FF (Linux) up until Nightly.

Works fine in FF (Mac) up until Nightly, when providing an image as input to track.

Does not work in FF (Mac) from 47.0b1 when having webcam stream as input.

Links to reproduce:

Image as input:
https://tmp5258.s3.amazonaws.com/brf/v3.1/image/ImageFaceTrackingNew.html (click on each eyes to start the tracking, click again to switch image)

Webcam as input:
https://tmp5258.s3.amazonaws.com/brf/v3.1/basic/BasicFaceTracking.html
https://tmp5258.s3.amazonaws.com/brf/v3.1/basic/BasicFaceDetection.html


Actual results:

BRF compiles to asm code in FF, but the webcam input stream is faulty and so the lib doesn't work properly.

So my guess: Something changed in the handling of the webcam pixel buffer in FF (Mac) v47.0b1. Maybe a faulty type (int instead of float/double somewhere). Images do work, Webcams on Mac don't.


Expected results:

Same behavior as in FF on Windows and Linux.

Updated

a year ago
Blocks: 710398
OS: Unspecified → Mac OS X
(Reporter)

Comment 1

a year ago
Created a more minimal example (Webcam needed):

Please open it in FF on Mac (v47 or higher)
https://tmp5258.s3.amazonaws.com/brf/ffbug/ff_mac_test/index_not_working.html
https://tmp5258.s3.amazonaws.com/brf/ffbug/ff_mac_test/index_working.html

The only difference between the two is the order of drawImage and getImageData:

// working
gui.video.drawImage(config.input, ... );
brfManager.update(brfBmdContext.getImageData( ... ).data);

versus:

// not working
brfManager.update(brfBmdContext.getImageData( ... ).data);
gui.video.drawImage(config.input, ... );

where 

config.input is a video playing the webcam stream
brfBmdContext is a context of a canvas and
gui.video is another canvas.

brfManager.update is a function that calls asm.js compiled code.

Updated

a year ago
Component: Untriaged → Graphics
Product: Firefox → Core
Hi Munro,
Is there any change for the video stream?
Flags: needinfo?(mchiang)
Whiteboard: [gfx-noted]
https://tmp5258.s3.amazonaws.com/brf/ffbug/ff_mac_test/index_not_working.html
https://tmp5258.s3.amazonaws.com/brf/ffbug/ff_mac_test/index_working.html

Both samples work on my mbp with the latest nightly build.
Flags: needinfo?(mchiang)
(Reporter)

Comment 4

a year ago
Just updated Firefox Nightly from

51.0a1 (2016-08-04) to
51.0a1 (2016-08-24)

The bug seems to be gone in the new version. 

Will check in upcoming versions as well.
Thanks for the fix.

Best Regards
Marcel
Priority: -- → P3
You need to log in before you can comment on or make changes to this bug.