Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(416)

Unified Diff: cc/output/shader.h

Issue 2122573003: media: replace LUMINANCE_F16 by RG_88 for 9/10-bit h264 videos Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: introduce --disable-half-float-conversion-texture flag Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: cc/output/shader.h
diff --git a/cc/output/shader.h b/cc/output/shader.h
index 21b4a70de5aaac404dc18061f6483967841dddf7..c3a98b92fb494bee74d3f140132a01eeb8abb958 100644
--- a/cc/output/shader.h
+++ b/cc/output/shader.h
@@ -763,11 +763,21 @@ class FragmentShaderRGBATexAlphaMaskColorMatrix : public FragmentTexBlendMode {
class FragmentShaderYUVVideo : public FragmentTexBlendMode {
public:
+ enum HighbitTexture {
hubbe 2016/09/27 20:49:51 There is no need for three values here, because th
dshwang 2016/09/28 10:33:27 |resource_multiplier_location| and |resource_offse
hubbe 2016/09/28 17:57:44 True I suppose. But you'll need the resource_multi
dshwang 2016/09/29 18:52:28 no, RG88 don't need it.
+ HIGHBIT_Y8 = 0, // either RED_8 or LUMINANCE_8
+ HIGHBIT_LUMINANCE_F16 = 1,
+ HIGHBIT_RG88 = 2,
+ LAST_HIGHBIT_TEXTURE = HIGHBIT_RG88
+ };
+
FragmentShaderYUVVideo();
std::string GetShaderString(
TexCoordPrecision precision, SamplerType sampler) const;
- void SetFeatures(bool use_alpha_texture, bool use_nv12, bool use_color_lut);
+ void SetFeatures(bool use_alpha_texture,
+ bool use_nv12,
+ bool use_color_lut,
+ HighbitTexture highbit_texture);
void Init(gpu::gles2::GLES2Interface* context,
unsigned program,
@@ -781,8 +791,11 @@ class FragmentShaderYUVVideo : public FragmentTexBlendMode {
int alpha_location() const { return alpha_location_; }
int yuv_matrix_location() const { return yuv_matrix_location_; }
int yuv_adj_location() const { return yuv_adj_location_; }
+ int ya_size_location() const { return ya_size_location_; }
+ int uv_size_location() const { return uv_size_location_; }
int ya_clamp_rect_location() const { return ya_clamp_rect_location_; }
int uv_clamp_rect_location() const { return uv_clamp_rect_location_; }
+ int max_channel_value_location() const { return max_channel_value_location_; }
int resource_multiplier_location() const {
return resource_multiplier_location_;
}
@@ -792,6 +805,7 @@ class FragmentShaderYUVVideo : public FragmentTexBlendMode {
bool use_alpha_texture_;
bool use_nv12_;
bool use_color_lut_;
+ bool highbit_texture_ = HIGHBIT_Y8;
int y_texture_location_;
int u_texture_location_;
@@ -802,6 +816,9 @@ class FragmentShaderYUVVideo : public FragmentTexBlendMode {
int alpha_location_;
int yuv_matrix_location_;
int yuv_adj_location_;
+ int max_channel_value_location_;
+ int ya_size_location_;
+ int uv_size_location_;
int ya_clamp_rect_location_;
int uv_clamp_rect_location_;
int resource_multiplier_location_;

Powered by Google App Engine
This is Rietveld 408576698