New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 763224 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Oct 2017
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 2
Type: Bug



Sign in to add a comment

Video color range not correctly expanded in dx9 (win 7) + nVidia GPU + hardware decoding on

Reported by human.p...@gmail.com, Sep 8 2017

Issue description

UserAgent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3208.0 Safari/537.36

Example URL:

Steps to reproduce the problem:
1. Find a Win 7 (d3d9) machine with nVidia GPU.
2. Make sure everything is default (esp. with hardware accerlation on).
2. Open the attached video or https://www.youtube.com/watch?v=fcCX8ieV3Oc

What is the expected behavior?
The color should be close to the marked value, i.e. 0, 16, 235 and 255 replactively (values are not exact, due to rgb->yuv420 coversion when I was making the video).

What went wrong?
The color is "washed out" due to incorrect color range expansion. The video is in limited/studio range, but Chrome doesn't correclty expand it to full range when rendering. The 0,0,0 will became 16,16,16, and so on.

The attached screenshot shows the color difference between Chrome, Firefox vs in a local video player (mpc).

Did this work before? N/A 

Is it a problem with Flash or HTML5? HTML5

Does this work in other browsers? No
 Firefox

Chrome version: 63.0.3208.0  Channel: canary
OS Version: 6.1 (Windows 7, Windows Server 2008 R2)
Flash Version: 

Contents of chrome://gpu: 

This is a long-standing bug in Win 7 + nVidia setup. You can find lots of mentioning of this bug by users all over the Internet in recent years.

Initially it was tracked by  issue 333619  (see my particular comment#98 there too), but later that issue got split into a few (particluarly, please see  issue 576419 ). Since today, most of those saperate issues were closed by hubbe@, I feel like I would make another ticket to notice devs that this bug is still there.

This bug is also reproducable on YouTube, Twtich or similar video websites: https://www.youtube.com/watch?v=fcCX8ieV3Oc

This bug also exsits in Firefox, which is tracked by https://bugzilla.mozilla.org/show_bug.cgi?id=1161349

This bug cannot be reproduced in IE11 (with the YouTube link, since I can't seem to open local video with IE), but IE doesn't seem to support MSE so things might be different there.

There is also a workaround, which is to manually set your (target) color range to full:
in the NVIDIA Control Panel under: Video > Adjust video color settings,(1) choose which display (monitor) to change, and then (2) under "How do you make color adjustments" switch it from "With the video player settings" to "With the NVIDIA settings" and choose full range (0-255). Of course, this is not desirable as it could mess up other programs.

As far as I know, this bug is D3D9 only, can't be produced on Win 10; and it's nVidia specific. But I can't confirm them 100%. What I can confirm is hardware video decoding is required to repro the bug.

My connection to montior is via DVI, since some people report there are other issues with HDMI ports.
 
screenshot.png
333 KB View Download

Comment 1 Deleted

GPU info:

Note: To properly save this page, select the "Webpage, Complete" option in the Save File dialog.
Graphics Feature Status
Canvas: Hardware accelerated
CheckerImaging: Enabled
Flash: Hardware accelerated
Flash Stage3D: Hardware accelerated
Flash Stage3D Baseline profile: Hardware accelerated
Compositing: Hardware accelerated
Multiple Raster Threads: Enabled
Native GpuMemoryBuffers: Software only. Hardware acceleration disabled
Rasterization: Hardware accelerated
Video Decode: Hardware accelerated
Video Encode: Hardware accelerated
WebGL: Hardware accelerated
WebGL2: Hardware accelerated
Driver Bug Workarounds
clear_uniforms_before_first_program_use
decode_encode_srgb_for_generatemipmap
disable_accelerated_vpx_decode
disable_delayed_copy_nv12
disable_direct_composition
disable_discard_framebuffer
disable_dxgi_zero_copy_video
disable_framebuffer_cmaa
exit_on_context_lost
force_cube_complete
scalarize_vec_and_mat_constructor_args
texsubimage_faster_than_teximage
Problems Detected
Some drivers are unable to reset the D3D device in the GPU process sandbox
Applied Workarounds: exit_on_context_lost
TexSubImage is faster for full uploads on ANGLE
Applied Workarounds: texsubimage_faster_than_teximage
Clear uniforms before first program use on all platforms: 124764, 349137
Applied Workarounds: clear_uniforms_before_first_program_use
Always rewrite vec/mat constructors to be consistent: 398694
Applied Workarounds: scalarize_vec_and_mat_constructor_args
ANGLE crash on glReadPixels from incomplete cube map texture: 518889
Applied Workarounds: force_cube_complete
Framebuffer discarding can hurt performance on non-tilers: 570897
Applied Workarounds: disable_discard_framebuffer
Direct composition flashes black initially on Win <10: 588588
Applied Workarounds: disable_direct_composition
Zero copy DXGI video hangs on shutdown on Win < 8.1: 621190
Applied Workarounds: disable_dxgi_zero_copy_video
Limited enabling of Chromium GL_INTEL_framebuffer_CMAA: 535198
Applied Workarounds: disable_framebuffer_cmaa
Zero-copy NV12 video displays incorrect colors on NVIDIA drivers.: 635319
Applied Workarounds: disable_dxgi_zero_copy_video
Disable KHR_blend_equation_advanced until cc shaders are updated: 661715
Applied Workarounds: disable(GL_KHR_blend_equation_advanced), disable(GL_KHR_blend_equation_advanced_coherent)
Decode and Encode before generateMipmap for srgb format textures on Windows: 634519
Applied Workarounds: decode_encode_srgb_for_generatemipmap
VPx decoding isn't supported well before Windows 10 creators update.: 616318, 667532
Applied Workarounds: disable_accelerated_vpx_decode
Delayed copy NV12 displays incorrect colors on NVIDIA drivers.: 728670
Applied Workarounds: disable_delayed_copy_nv12
Native GpuMemoryBuffers have been disabled, either via about:flags or command line.
Disabled Features: native_gpu_memory_buffers
Version Information
Data exported	9/7/2017, 9:30:48 PM
Chrome version	Chrome/63.0.3208.0
Operating system	Windows NT 6.1.7601 SP1
Software rendering list version	13.12
Driver bug list version	10.28
ANGLE commit id	ad6e2b6a6810
2D graphics backend	Skia/63 11f844e559bc536e2b1cb09d126af8fffe56f31c-
Command Line	"C:\Users\Administrator\AppData\Local\Google\Chrome SxS\Application\chrome.exe" --flag-switches-begin --disable-features=BackgroundVideoTrackOptimization --flag-switches-end
Driver Information
Initialization time	26
In-process GPU	false
Passthrough Command Decoder	false
Supports overlays	false
Sandboxed	false
GPU0	VENDOR = 0x10de, DEVICE= 0x11c0 *ACTIVE*
GPU1	VENDOR = 0x8086, DEVICE= 0x0412
Optimus	false
Optimus	false
AMD switchable	false
Desktop compositing	Aero Glass
Diagonal Monitor Size of \\.\DISPLAY1	23.0"
Driver vendor	NVIDIA
Driver version	22.21.13.8494
Driver date	7-18-2017
Pixel shader version	5.0
Vertex shader version	5.0
Max. MSAA samples	8
Machine model name	
Machine model version	
GL_VENDOR	Google Inc.
GL_RENDERER	ANGLE (NVIDIA GeForce GTX 660 Direct3D11 vs_5_0 ps_5_0)
GL_VERSION	OpenGL ES 3.0 (ANGLE 2.1.0.ad6e2b6a6810)
GL_EXTENSIONS	GL_ANGLE_client_arrays GL_ANGLE_depth_texture GL_ANGLE_framebuffer_blit GL_ANGLE_framebuffer_multisample GL_ANGLE_instanced_arrays GL_ANGLE_lossy_etc_decode GL_ANGLE_multiview GL_ANGLE_pack_reverse_row_order GL_ANGLE_program_cache_control GL_ANGLE_request_extension GL_ANGLE_robust_client_memory GL_ANGLE_robust_resource_initialization GL_ANGLE_texture_compression_dxt3 GL_ANGLE_texture_compression_dxt5 GL_ANGLE_texture_usage GL_ANGLE_translated_shader_source GL_CHROMIUM_bind_generates_resource GL_CHROMIUM_bind_uniform_location GL_CHROMIUM_color_buffer_float_rgb GL_CHROMIUM_color_buffer_float_rgba GL_CHROMIUM_copy_compressed_texture GL_CHROMIUM_copy_texture GL_CHROMIUM_sync_query GL_EXT_blend_minmax GL_EXT_color_buffer_float GL_EXT_color_buffer_half_float GL_EXT_debug_marker GL_EXT_discard_framebuffer GL_EXT_disjoint_timer_query GL_EXT_draw_buffers GL_EXT_frag_depth GL_EXT_map_buffer_range GL_EXT_occlusion_query_boolean GL_EXT_read_format_bgra GL_EXT_robustness GL_EXT_sRGB GL_EXT_shader_texture_lod GL_EXT_texture_compression_dxt1 GL_EXT_texture_compression_s3tc_srgb GL_EXT_texture_filter_anisotropic GL_EXT_texture_format_BGRA8888 GL_EXT_texture_norm16 GL_EXT_texture_rg GL_EXT_texture_storage GL_EXT_unpack_subimage GL_KHR_debug GL_NV_EGL_stream_consumer_external GL_NV_fence GL_NV_pack_subimage GL_NV_pixel_buffer_object GL_OES_EGL_image GL_OES_EGL_image_external GL_OES_EGL_image_external_essl3 GL_OES_compressed_ETC1_RGB8_texture GL_OES_depth32 GL_OES_element_index_uint GL_OES_get_program_binary GL_OES_mapbuffer GL_OES_packed_depth_stencil GL_OES_rgb8_rgba8 GL_OES_standard_derivatives GL_OES_surfaceless_context GL_OES_texture_float GL_OES_texture_float_linear GL_OES_texture_half_float GL_OES_texture_half_float_linear GL_OES_texture_npot GL_OES_vertex_array_object
Disabled Extensions	GL_KHR_blend_equation_advanced GL_KHR_blend_equation_advanced_coherent
Window system binding vendor	Google Inc. (adapter LUID: 000000000000b1cc)
Window system binding version	1.4 (ANGLE 2.1.0.ad6e2b6a6810)
Window system binding extensions	EGL_EXT_create_context_robustness EGL_ANGLE_d3d_share_handle_client_buffer EGL_ANGLE_d3d_texture_client_buffer EGL_ANGLE_surface_d3d_texture_2d_share_handle EGL_ANGLE_query_surface_pointer EGL_ANGLE_window_fixed_size EGL_ANGLE_keyed_mutex EGL_ANGLE_surface_orientation EGL_NV_post_sub_buffer EGL_KHR_create_context EGL_EXT_device_query EGL_KHR_image EGL_KHR_image_base EGL_KHR_gl_texture_2D_image EGL_KHR_gl_texture_cubemap_image EGL_KHR_gl_renderbuffer_image EGL_KHR_get_all_proc_addresses EGL_KHR_stream EGL_KHR_stream_consumer_gltexture EGL_NV_stream_consumer_gltexture_yuv EGL_ANGLE_flexible_surface_compatibility EGL_ANGLE_create_context_webgl_compatibility EGL_CHROMIUM_create_context_bind_generates_resource EGL_EXT_pixel_format_float EGL_KHR_surfaceless_context EGL_ANGLE_display_texture_share_group EGL_ANGLE_create_context_client_arrays EGL_ANGLE_program_cache_control
Direct rendering	Yes
Reset notification strategy	0x8252
GPU process crash count	0
Compositor Information
Tile Update Mode	One-copy
Partial Raster	Enabled
GpuMemoryBuffers Status
ATC	Software only
ATCIA	Software only
DXT1	Software only
DXT5	Software only
ETC1	Software only
R_8	Software only
R_16	Software only
RG_88	Software only
BGR_565	Software only
RGBA_4444	Software only
RGBX_8888	Software only
RGBA_8888	Software only
BGRX_8888	Software only
BGRA_8888	Software only
RGBA_F16	Software only
YVU_420	Software only
YUV_420_BIPLANAR	Software only
UYVY_422	Software only
Diagnostics
0
b3DAccelerationEnabled	true
b3DAccelerationExists	true
bAGPEnabled	true
bAGPExistenceValid	true
bAGPExists	true
bCanRenderWindow	true
bDDAccelerationEnabled	true
bDriverBeta	false
bDriverDebug	false
bDriverSigned	false
bDriverSignedValid	false
bNoHardware	false
dwBpp	32
dwDDIVersion	11
dwHeight	1080
dwRefreshRate	60
dwWHQLLevel	0
dwWidth	1920
iAdapter	0
lDriverSize	17808120
lMiniVddSize	0
szAGPStatusEnglish	Enabled
szAGPStatusLocalized	已启用
szChipType	GeForce GTX 660
szD3DStatusEnglish	Enabled
szD3DStatusLocalized	已启用
szDACType	Integrated RAMDAC
szDDIVersionEnglish	11
szDDIVersionLocalized	11
szDDStatusEnglish	Enabled
szDDStatusLocalized	已启用
szDXVAHDEnglish	Supported
szDXVAModes	ModeMPEG2_A ModeMPEG2_C ModeVC1_C ModeWMV9_C
szDescription	NVIDIA GeForce GTX 660
szDeviceId	0x11C0
szDeviceIdentifier	{D7B71E3E-5280-11CF-C656-43151BC2DB35}
szDeviceName	\\.\DISPLAY1
szDisplayMemoryEnglish	1682 MB
szDisplayMemoryLocalized	1682 MB
szDisplayModeEnglish	1920 x 1080 (32 bit) (60Hz)
szDisplayModeLocalized	1920 x 1080 (32 bit) (60Hz)
szDriverAssemblyVersion	22.21.13.8494
szDriverAttributes	Final Retail
szDriverDateEnglish	7/18/2017 19:37:17
szDriverDateLocalized	2017/7/18 19:37:17
szDriverLanguageEnglish	English
szDriverLanguageLocalized	英语(美国)
szDriverModelEnglish	WDDM 1.1
szDriverModelLocalized	WDDM 1.1
szDriverName	nvd3dumx.dll,nvwgf2umx.dll,nvwgf2umx.dll,nvd3dum,nvwgf2um,nvwgf2um
szDriverNodeStrongName	oem9.inf:NVIDIA_Devices.NTamd64.6.1:Section028:22.21.13.8494:pci\ven_10de&dev_11c0
szDriverSignDate	
szDriverVersion	22.21.0013.8494
szKeyDeviceID	Enum\PCI\VEN_10DE&DEV_11C0&SUBSYS_354E1458&REV_A1
szKeyDeviceKey	\Registry\Machine\System\CurrentControlSet\Control\Video\{A4EF703B-9C23-4401-8D66-F5E61A268C7E}\0000
szManufacturer	NVIDIA
szMiniVdd	暂缺
szMiniVddDateEnglish	n/a
szMiniVddDateLocalized	暂缺
szMonitorMaxRes	
szMonitorName	通用即插即用监视器
szNotesEnglish	No problems found.
szNotesLocalized	没有发现问题。
szOverlayEnglish	Supported
szRankOfInstalledDriver	00E62001
szRegHelpText	
szRevision	
szRevisionId	0x00A1
szSubSysId	0x354E1458
szTestResultD3D7English	Not run
szTestResultD3D7Localized	未运行
szTestResultD3D8English	Not run
szTestResultD3D8Localized	未运行
szTestResultD3D9English	Not run
szTestResultD3D9Localized	未运行
szTestResultDDEnglish	Not run
szTestResultDDLocalized	未运行
szVdd	暂缺
szVendorId	0x10DE
Log Messages
GpuProcessHostUIShim: The GPU process exited normally. Everything is okay.
Sorry for the double post, please remove  issue 763222  which has a wrong title, thanks!
Test video.
out.mp4
201 KB View Download

Comment 5 by hubbe@chromium.org, Sep 8 2017

Owner: hubbe@chromium.org
Status: Assigned (was: Unconfirmed)
Can you try chrome canary and see if the problem is still there?

Comment 6 by hubbe@chromium.org, Sep 8 2017

Never mind, I see you did use chrome canary.
I will look into it.

Comment 7 by hubbe@chromium.org, Sep 8 2017

 Issue 763222  has been merged into this issue.

Comment 8 by hubbe@chromium.org, Sep 26 2017

It looks like your chrome is actually running on dx11, not d3d9.
Could you try running chrome with --use-angle=d3d9 and see if the bug still occurs or not?
You're right, somehow I thought Win 7 doesn't have D3D11.

But I just tested with `--use-angle=d3d9`, seam result (washed out color).

Env:

GL_VENDOR	Google Inc.
GL_RENDERER	ANGLE (NVIDIA GeForce GTX 660 Direct3D9Ex vs_3_0 ps_3_0)
GL_VERSION	OpenGL ES 2.0 (ANGLE 2.1.0.1f9d68437c9d)

Google Chrome	63.0.3223.8 (Official Build) canary (64-bit) (cohort: 64-Bit)

Tested with video in comment #4.

Comment 10 by hubbe@chromium.org, Sep 27 2017

Could you post the information from chrome://version as well?

Comment 11 by hubbe@chromium.org, Sep 27 2017

Also, could you try to see if this command line flag helps:
--enable-features=video-blit-color-accuracy

Weird, I cannot produce this bug any more with today's new Canary (63.0.3225.0 (Official Build) canary (64-bit) (cohort: 64-Bit)). I guess some new changes?

Anyway, here is my current chrome://version: https://gist.github.com/anonymous/dd05a17747107c786c612b17266d3f30


And about `--enable-features=video-blit-color-accuracy`:

On Canary, it makes no difference because the default behavior is already correct;
On Beta (Google Chrome	62.0.3202.38 (Official Build) beta (64-bit) (cohort: Beta) Revision	07acaf2e3d9da74d8348a65e7a2e5adf7ee4c662-refs/branch-heads/3202@{#463}), this flag DOES fix the color.
Status: Fixed (was: Assigned)

Sign in to add a comment