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

Unified Diff: src/codec/SkJpegCodec.cpp

Issue 1766523002: Fix YUV horizontal and vertical sampling checks (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: DeMorgan's Created 4 years, 10 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/codec/SkJpegCodec.cpp
diff --git a/src/codec/SkJpegCodec.cpp b/src/codec/SkJpegCodec.cpp
index d36051511c664c14cc9bfeddc642426b7fc24df1..b5780c55817e670ae545d1c7f16bddc9e77368ea 100644
--- a/src/codec/SkJpegCodec.cpp
+++ b/src/codec/SkJpegCodec.cpp
@@ -568,10 +568,11 @@ static bool is_yuv_supported(jpeg_decompress_struct* dinfo) {
// that of Y would be an extremely difficult change, given that clients
// allocate memory as if the size of the Y plane is always the size of the
// image. However, this case is very, very rare.
- if (!(1 == dinfo->comp_info[1].h_samp_factor) &&
- (1 == dinfo->comp_info[1].v_samp_factor) &&
- (1 == dinfo->comp_info[2].h_samp_factor) &&
- (1 == dinfo->comp_info[2].v_samp_factor)) {
+ if ((1 != dinfo->comp_info[1].h_samp_factor) ||
+ (1 != dinfo->comp_info[1].v_samp_factor) ||
+ (1 != dinfo->comp_info[2].h_samp_factor) ||
+ (1 != dinfo->comp_info[2].v_samp_factor))
+ {
return false;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698