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

Unified Diff: core/src/fxcodec/codec/fx_codec_jpx_opj.cpp

Issue 837533003: Cleanup: Get rid of CRLF line endings. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 5 years, 11 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 | « core/src/fpdfapi/fpdf_page/fpdf_page_pattern.cpp ('k') | core/src/fxge/freetype/fx_freetype.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/src/fxcodec/codec/fx_codec_jpx_opj.cpp
diff --git a/core/src/fxcodec/codec/fx_codec_jpx_opj.cpp b/core/src/fxcodec/codec/fx_codec_jpx_opj.cpp
index 8dcecf9061796df363ddfb59347b75d47f27eb7a..c4a0f88201a81db97599ac9aea9b1d7385585cdd 100644
--- a/core/src/fxcodec/codec/fx_codec_jpx_opj.cpp
+++ b/core/src/fxcodec/codec/fx_codec_jpx_opj.cpp
@@ -168,17 +168,17 @@ static void sycc422_to_rgb(opj_image_t *img)
d2 = b = FX_Alloc(int, (size_t)max);
for(i = 0; i < maxh; ++i)
{
- for (j = 0; (OPJ_UINT32)j < (maxw & ~(OPJ_UINT32)1); j += 2)
- {
- sycc_to_rgb(offset, upb, *y, *cb, *cr, r, g, b);
- ++y; ++r; ++g; ++b;
- sycc_to_rgb(offset, upb, *y, *cb, *cr, r, g, b);
- ++y; ++r; ++g; ++b; ++cb; ++cr;
- }
- if (j < maxw)
- {
- sycc_to_rgb(offset, upb, *y, *cb, *cr, r, g, b);
- ++y; ++r; ++g; ++b; ++cb; ++cr;
+ for (j = 0; (OPJ_UINT32)j < (maxw & ~(OPJ_UINT32)1); j += 2)
+ {
+ sycc_to_rgb(offset, upb, *y, *cb, *cr, r, g, b);
+ ++y; ++r; ++g; ++b;
+ sycc_to_rgb(offset, upb, *y, *cb, *cr, r, g, b);
+ ++y; ++r; ++g; ++b; ++cb; ++cr;
+ }
+ if (j < maxw)
+ {
+ sycc_to_rgb(offset, upb, *y, *cb, *cr, r, g, b);
+ ++y; ++r; ++g; ++b; ++cb; ++cr;
}
}
FX_Free(img->comps[0].data);
@@ -218,46 +218,46 @@ static void sycc420_to_rgb(opj_image_t *img)
d0 = r = FX_Alloc(int, (size_t)max);
d1 = g = FX_Alloc(int, (size_t)max);
d2 = b = FX_Alloc(int, (size_t)max);
- for (i = 0; (OPJ_UINT32)i < (maxh & ~(OPJ_UINT32)1); i += 2)
- {
- ny = y + maxw;
- nr = r + maxw;
- ng = g + maxw;
- nb = b + maxw;
- for (j = 0; (OPJ_UINT32)j < (maxw & ~(OPJ_UINT32)1); j += 2)
- {
- sycc_to_rgb(offset, upb, *y, *cb, *cr, r, g, b);
- ++y; ++r; ++g; ++b;
- sycc_to_rgb(offset, upb, *y, *cb, *cr, r, g, b);
- ++y; ++r; ++g; ++b;
- sycc_to_rgb(offset, upb, *ny, *cb, *cr, nr, ng, nb);
- ++ny; ++nr; ++ng; ++nb;
- sycc_to_rgb(offset, upb, *ny, *cb, *cr, nr, ng, nb);
- ++ny; ++nr; ++ng; ++nb; ++cb; ++cr;
- }
- if (j < maxw)
- {
- sycc_to_rgb(offset, upb, *y, *cb, *cr, r, g, b);
- ++y; ++r; ++g; ++b;
- sycc_to_rgb(offset, upb, *ny, *cb, *cr, nr, ng, nb);
- ++ny; ++nr; ++ng; ++nb; ++cb; ++cr;
- }
- y += maxw; r += maxw; g += maxw; b += maxw;
- }
- if (i < maxh)
- {
- for (j = 0; (OPJ_UINT32)j < (maxw & ~(OPJ_UINT32)1); j += 2)
- {
- sycc_to_rgb(offset, upb, *y, *cb, *cr, r, g, b);
- ++y; ++r; ++g; ++b;
- sycc_to_rgb(offset, upb, *y, *cb, *cr, r, g, b);
- ++y; ++r; ++g; ++b; ++cb; ++cr;
- }
- if (j < maxw)
- {
- sycc_to_rgb(offset, upb, *y, *cb, *cr, r, g, b);
- }
- }
+ for (i = 0; (OPJ_UINT32)i < (maxh & ~(OPJ_UINT32)1); i += 2)
+ {
+ ny = y + maxw;
+ nr = r + maxw;
+ ng = g + maxw;
+ nb = b + maxw;
+ for (j = 0; (OPJ_UINT32)j < (maxw & ~(OPJ_UINT32)1); j += 2)
+ {
+ sycc_to_rgb(offset, upb, *y, *cb, *cr, r, g, b);
+ ++y; ++r; ++g; ++b;
+ sycc_to_rgb(offset, upb, *y, *cb, *cr, r, g, b);
+ ++y; ++r; ++g; ++b;
+ sycc_to_rgb(offset, upb, *ny, *cb, *cr, nr, ng, nb);
+ ++ny; ++nr; ++ng; ++nb;
+ sycc_to_rgb(offset, upb, *ny, *cb, *cr, nr, ng, nb);
+ ++ny; ++nr; ++ng; ++nb; ++cb; ++cr;
+ }
+ if (j < maxw)
+ {
+ sycc_to_rgb(offset, upb, *y, *cb, *cr, r, g, b);
+ ++y; ++r; ++g; ++b;
+ sycc_to_rgb(offset, upb, *ny, *cb, *cr, nr, ng, nb);
+ ++ny; ++nr; ++ng; ++nb; ++cb; ++cr;
+ }
+ y += maxw; r += maxw; g += maxw; b += maxw;
+ }
+ if (i < maxh)
+ {
+ for (j = 0; (OPJ_UINT32)j < (maxw & ~(OPJ_UINT32)1); j += 2)
+ {
+ sycc_to_rgb(offset, upb, *y, *cb, *cr, r, g, b);
+ ++y; ++r; ++g; ++b;
+ sycc_to_rgb(offset, upb, *y, *cb, *cr, r, g, b);
+ ++y; ++r; ++g; ++b; ++cb; ++cr;
+ }
+ if (j < maxw)
+ {
+ sycc_to_rgb(offset, upb, *y, *cb, *cr, r, g, b);
+ }
+ }
FX_Free(img->comps[0].data);
img->comps[0].data = d0;
« no previous file with comments | « core/src/fpdfapi/fpdf_page/fpdf_page_pattern.cpp ('k') | core/src/fxge/freetype/fx_freetype.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698