Open Bug 1917874 Opened 6 months ago Updated 6 months ago

HEVC Content on twitch does not have the correct width or height

Categories

(Core :: Audio/Video: Playback, defect, P3)

Firefox 131
defect

Tracking

()

UNCONFIRMED

People

(Reporter: jhnbwrs, Unassigned)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Safari/537.36

Steps to reproduce:

Searched for HEVC videos on twitch. Usually there are one or two running. Twitch is running an HEVC beta currently, and there are a limited number of users streaming in HEVC. Make sure to enable HEVC in about:config, otherwise you won't see the HEVC quality.

Actual results:

Any video I find has slightly larger than expected dimensions. Usually height.

Expected results:

I am a twitch developer. This issue is related to the HEVC conformance window. I had to fix this exact issue once already. We are encoding mostly with nvidia cards, and nvidia sets the conformance window flag in the HEVC SPS. If it does, the width and height calculations are slightly more complicated than just taking the pic_width_in_luma_samples and pic_height_in_luma_samples. For a 1080 stream this is often 1088, so I know this is exactly what you are doing (and it makes sense, I did it myself). See the attached screenshot. Refer to the HEVC spec for how to calculate the actual width and height when the conformance window flag is set, here are the relevant bits "pic_width_in_luma_samples specifies the width of each decoded picture in units of luma samples.
pic_width_in_luma_samples shall not be equal to 0 and shall be an integer multiple of MinCbSizeY.
pic_height_in_luma_samples specifies the height of each decoded picture in units of luma samples.
pic_height_in_luma_samples shall not be equal to 0 and shall be an integer multiple of MinCbSizeY.
conformance_window_flag equal to 1 indicates that the conformance cropping window offset parameters follow next in
the SPS. conformance_window_flag equal to 0 indicates that the conformance cropping window offset parameters are not
present.
conf_win_left_offset, conf_win_right_offset, conf_win_top_offset and conf_win_bottom_offset specify the samples of
the pictures in the CVS that are output from the decoding process, in terms of a rectangular region specified in picture
coordinates for output. When conformance_window_flag is equal to 0, the values of conf_win_left_offset,
conf_win_right_offset, conf_win_top_offset and conf_win_bottom_offset are inferred to be equal to 0.
The conformance cropping window contains the luma samples with horizontal picture coordinates from
SubWidthC * conf_win_left_offset to pic_width_in_luma_samples − ( SubWidthC * conf_win_right_offset + 1 ) and
vertical picture coordinates from SubHeightC * conf_win_top_offset to
pic_height_in_luma_samples − ( SubHeightC * conf_win_bottom_offset + 1 ), inclusive.
The value of SubWidthC * ( conf_win_left_offset + conf_win_right_offset ) shall be less than
pic_width_in_luma_samples, and the value of SubHeightC * ( conf_win_top_offset + conf_win_bottom_offset ) shall be
less than pic_height_in_luma_samples."

The Bugbug bot thinks this bug should belong to the 'Core::Widget: Cocoa' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → Widget: Cocoa
Product: Firefox → Core

I am sure widget: Cocoa must be an incorrect classification for this bug.

For finding HEVC videos on twitch keep in mind that the beta cohort isn't huge right now, so you might not always be able to find a live HEVC stream, but if you scroll down to past broadcasts you should be able to easily find some recordings that have been tagged as HEVC. Only resolutions above 720p will be in HEVC.

Component: Widget: Cocoa → Audio/Video: Playback
Blocks: hevc
Severity: -- → S3
Priority: -- → P3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: