Rename third_party/libopenjpeg20 to libopenjpeg.

Remove the version number from the directory name, as it is out of date.

Change-Id: Ibc3092594d040a89f8be5cd8f74ed20dca5828ff
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/93774
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
diff --git a/core/fxcodec/jpx/DEPS b/core/fxcodec/jpx/DEPS
index d728e0f..56cdc44 100644
--- a/core/fxcodec/jpx/DEPS
+++ b/core/fxcodec/jpx/DEPS
@@ -1,3 +1,3 @@
 include_rules = [
-  '+third_party/libopenjpeg20',
+  '+third_party/libopenjpeg',
 ]
diff --git a/core/fxcodec/jpx/cjpx_decoder.cpp b/core/fxcodec/jpx/cjpx_decoder.cpp
index d887578..aa646dd 100644
--- a/core/fxcodec/jpx/cjpx_decoder.cpp
+++ b/core/fxcodec/jpx/cjpx_decoder.cpp
@@ -20,7 +20,7 @@
 #include "third_party/base/ptr_util.h"
 
 #if !defined(USE_SYSTEM_LIBOPENJPEG2)
-#include "third_party/libopenjpeg20/opj_malloc.h"
+#include "third_party/libopenjpeg/opj_malloc.h"
 #endif
 
 namespace fxcodec {
diff --git a/core/fxcodec/jpx/cjpx_decoder.h b/core/fxcodec/jpx/cjpx_decoder.h
index fbbc3ac..74fc7c9 100644
--- a/core/fxcodec/jpx/cjpx_decoder.h
+++ b/core/fxcodec/jpx/cjpx_decoder.h
@@ -15,7 +15,7 @@
 #if defined(USE_SYSTEM_LIBOPENJPEG2)
 #include <openjpeg.h>
 #else
-#include "third_party/libopenjpeg20/openjpeg.h"
+#include "third_party/libopenjpeg/openjpeg.h"
 #endif
 
 namespace fxcodec {
diff --git a/core/fxcodec/jpx/jpx_decode_utils.h b/core/fxcodec/jpx/jpx_decode_utils.h
index 4403cb8..8f28da6 100644
--- a/core/fxcodec/jpx/jpx_decode_utils.h
+++ b/core/fxcodec/jpx/jpx_decode_utils.h
@@ -12,7 +12,7 @@
 #if defined(USE_SYSTEM_LIBOPENJPEG2)
 #include <openjpeg.h>
 #else
-#include "third_party/libopenjpeg20/openjpeg.h"
+#include "third_party/libopenjpeg/openjpeg.h"
 #endif
 
 namespace fxcodec {
diff --git a/core/fxcodec/jpx/jpx_unittest.cpp b/core/fxcodec/jpx/jpx_unittest.cpp
index 7ae60a5..712f7f8 100644
--- a/core/fxcodec/jpx/jpx_unittest.cpp
+++ b/core/fxcodec/jpx/jpx_unittest.cpp
@@ -11,7 +11,7 @@
 #include "core/fxcodec/jpx/jpx_decode_utils.h"
 #include "core/fxcrt/fx_memory.h"
 #include "testing/gtest/include/gtest/gtest.h"
-#include "third_party/libopenjpeg20/opj_malloc.h"
+#include "third_party/libopenjpeg/opj_malloc.h"
 
 namespace fxcodec {
 
diff --git a/third_party/BUILD.gn b/third_party/BUILD.gn
index cb8c356..066b2e4 100644
--- a/third_party/BUILD.gn
+++ b/third_party/BUILD.gn
@@ -401,32 +401,32 @@
     ":fx_libopenjpeg_warnings",
   ]
   sources = [
-    "libopenjpeg20/bio.c",
-    "libopenjpeg20/cio.c",
-    "libopenjpeg20/dwt.c",
-    "libopenjpeg20/event.c",
-    "libopenjpeg20/function_list.c",
-    "libopenjpeg20/ht_dec.c",
-    "libopenjpeg20/image.c",
-    "libopenjpeg20/invert.c",
-    "libopenjpeg20/j2k.c",
-    "libopenjpeg20/jp2.c",
-    "libopenjpeg20/mct.c",
-    "libopenjpeg20/mqc.c",
-    "libopenjpeg20/openjpeg.c",
+    "libopenjpeg/bio.c",
+    "libopenjpeg/cio.c",
+    "libopenjpeg/dwt.c",
+    "libopenjpeg/event.c",
+    "libopenjpeg/function_list.c",
+    "libopenjpeg/ht_dec.c",
+    "libopenjpeg/image.c",
+    "libopenjpeg/invert.c",
+    "libopenjpeg/j2k.c",
+    "libopenjpeg/jp2.c",
+    "libopenjpeg/mct.c",
+    "libopenjpeg/mqc.c",
+    "libopenjpeg/openjpeg.c",
 
-    # NOTE: libopenjpeg20/opj_clock.c is not used.
-    "libopenjpeg20/opj_malloc.cc",
-    "libopenjpeg20/opj_malloc.h",
-    "libopenjpeg20/pi.c",
-    "libopenjpeg20/sparse_array.c",
-    "libopenjpeg20/sparse_array.h",
-    "libopenjpeg20/t1.c",
-    "libopenjpeg20/t1_ht_luts.h",
-    "libopenjpeg20/t2.c",
-    "libopenjpeg20/tcd.c",
-    "libopenjpeg20/tgt.c",
-    "libopenjpeg20/thread.c",
+    # NOTE: libopenjpeg/opj_clock.c is not used.
+    "libopenjpeg/opj_malloc.cc",
+    "libopenjpeg/opj_malloc.h",
+    "libopenjpeg/pi.c",
+    "libopenjpeg/sparse_array.c",
+    "libopenjpeg/sparse_array.h",
+    "libopenjpeg/t1.c",
+    "libopenjpeg/t1_ht_luts.h",
+    "libopenjpeg/t2.c",
+    "libopenjpeg/tcd.c",
+    "libopenjpeg/tgt.c",
+    "libopenjpeg/thread.c",
   ]
   deps = [ "../core/fxcrt" ]
 }
diff --git a/third_party/libopenjpeg20/0003-dwt-decode.patch b/third_party/libopenjpeg/0003-dwt-decode.patch
similarity index 97%
rename from third_party/libopenjpeg20/0003-dwt-decode.patch
rename to third_party/libopenjpeg/0003-dwt-decode.patch
index 99c7a8c..3d43a89 100644
--- a/third_party/libopenjpeg20/0003-dwt-decode.patch
+++ b/third_party/libopenjpeg/0003-dwt-decode.patch
@@ -1,7 +1,7 @@
-diff --git a/third_party/libopenjpeg20/dwt.c b/third_party/libopenjpeg20/dwt.c
+diff --git a/third_party/libopenjpeg/dwt.c b/third_party/libopenjpeg/dwt.c
 index 4164ba090..a36b7ed10 100644
---- a/third_party/libopenjpeg20/dwt.c
-+++ b/third_party/libopenjpeg20/dwt.c
+--- a/third_party/libopenjpeg/dwt.c
++++ b/third_party/libopenjpeg/dwt.c
 @@ -63,9 +63,6 @@
  /** @defgroup DWT DWT - Implementation of a discrete wavelet transform */
  /*@{*/
diff --git a/third_party/libopenjpeg20/0005-jp2_apply_pclr.patch b/third_party/libopenjpeg/0005-jp2_apply_pclr.patch
similarity index 88%
rename from third_party/libopenjpeg20/0005-jp2_apply_pclr.patch
rename to third_party/libopenjpeg/0005-jp2_apply_pclr.patch
index cbc5a8f..85e0698 100644
--- a/third_party/libopenjpeg20/0005-jp2_apply_pclr.patch
+++ b/third_party/libopenjpeg/0005-jp2_apply_pclr.patch
@@ -1,7 +1,7 @@
-diff --git a/third_party/libopenjpeg20/jp2.c b/third_party/libopenjpeg20/jp2.c
+diff --git a/third_party/libopenjpeg/jp2.c b/third_party/libopenjpeg/jp2.c
 index 7c065ba74..a5790b267 100644
---- a/third_party/libopenjpeg20/jp2.c
-+++ b/third_party/libopenjpeg20/jp2.c
+--- a/third_party/libopenjpeg/jp2.c
++++ b/third_party/libopenjpeg/jp2.c
 @@ -1079,8 +1079,8 @@ static OPJ_BOOL opj_jp2_apply_pclr(opj_image_t *image,
              assert(pcol == 0);
              new_comps[i] = old_comps[cmp];
diff --git a/third_party/libopenjpeg20/0006-tcd_init_tile.patch b/third_party/libopenjpeg/0006-tcd_init_tile.patch
similarity index 79%
rename from third_party/libopenjpeg20/0006-tcd_init_tile.patch
rename to third_party/libopenjpeg/0006-tcd_init_tile.patch
index 409fe7b..19532ea 100644
--- a/third_party/libopenjpeg20/0006-tcd_init_tile.patch
+++ b/third_party/libopenjpeg/0006-tcd_init_tile.patch
@@ -1,7 +1,7 @@
-diff --git a/third_party/libopenjpeg20/tcd.c b/third_party/libopenjpeg20/tcd.c
+diff --git a/third_party/libopenjpeg/tcd.c b/third_party/libopenjpeg/tcd.c
 index 6442669d6..4c728d4c6 100644
---- a/third_party/libopenjpeg20/tcd.c
-+++ b/third_party/libopenjpeg20/tcd.c
+--- a/third_party/libopenjpeg/tcd.c
++++ b/third_party/libopenjpeg/tcd.c
 @@ -819,6 +819,11 @@ static INLINE OPJ_BOOL opj_tcd_init_tile(opj_tcd_t *p_tcd, OPJ_UINT32 p_tile_no,
          if (isEncoder) {
              OPJ_SIZE_T l_tile_data_size;
diff --git a/third_party/libopenjpeg20/0007-jp2_read_cmap.patch b/third_party/libopenjpeg/0007-jp2_read_cmap.patch
similarity index 71%
rename from third_party/libopenjpeg20/0007-jp2_read_cmap.patch
rename to third_party/libopenjpeg/0007-jp2_read_cmap.patch
index 781f2c6..02293ed 100644
--- a/third_party/libopenjpeg20/0007-jp2_read_cmap.patch
+++ b/third_party/libopenjpeg/0007-jp2_read_cmap.patch
@@ -1,7 +1,7 @@
-diff --git a/third_party/libopenjpeg20/jp2.c b/third_party/libopenjpeg20/jp2.c
+diff --git a/third_party/libopenjpeg/jp2.c b/third_party/libopenjpeg/jp2.c
 index a5790b267..a0f639d8e 100644
---- a/third_party/libopenjpeg20/jp2.c
-+++ b/third_party/libopenjpeg20/jp2.c
+--- a/third_party/libopenjpeg/jp2.c
++++ b/third_party/libopenjpeg/jp2.c
 @@ -1308,7 +1308,7 @@ static OPJ_BOOL opj_jp2_read_cmap(opj_jp2_t * jp2,
  
  
diff --git a/third_party/libopenjpeg20/0009-opj_pi_next.patch b/third_party/libopenjpeg/0009-opj_pi_next.patch
similarity index 92%
rename from third_party/libopenjpeg20/0009-opj_pi_next.patch
rename to third_party/libopenjpeg/0009-opj_pi_next.patch
index ed0332f..8aa80c1 100644
--- a/third_party/libopenjpeg20/0009-opj_pi_next.patch
+++ b/third_party/libopenjpeg/0009-opj_pi_next.patch
@@ -1,7 +1,7 @@
-diff --git a/third_party/libopenjpeg20/pi.c b/third_party/libopenjpeg20/pi.c
+diff --git a/third_party/libopenjpeg/pi.c b/third_party/libopenjpeg/pi.c
 index 4f7dd50f1..1430d12a9 100644
---- a/third_party/libopenjpeg20/pi.c
-+++ b/third_party/libopenjpeg20/pi.c
+--- a/third_party/libopenjpeg/pi.c
++++ b/third_party/libopenjpeg/pi.c
 @@ -464,6 +464,9 @@ static OPJ_BOOL opj_pi_next_rpcl(opj_pi_iterator_t * pi)
                                                   (comp->dy << levelno)), res->pdy)
                             - opj_uint_floordivpow2(try0, res->pdy);
diff --git a/third_party/libopenjpeg20/0011-j2k_update_image_data.patch b/third_party/libopenjpeg/0011-j2k_update_image_data.patch
similarity index 77%
rename from third_party/libopenjpeg20/0011-j2k_update_image_data.patch
rename to third_party/libopenjpeg/0011-j2k_update_image_data.patch
index 1402129..3314495 100644
--- a/third_party/libopenjpeg20/0011-j2k_update_image_data.patch
+++ b/third_party/libopenjpeg/0011-j2k_update_image_data.patch
@@ -1,7 +1,7 @@
-diff --git a/third_party/libopenjpeg20/j2k.c b/third_party/libopenjpeg20/j2k.c
+diff --git a/third_party/libopenjpeg/j2k.c b/third_party/libopenjpeg/j2k.c
 index 8e343ab2e..5e1494394 100644
---- a/third_party/libopenjpeg20/j2k.c
-+++ b/third_party/libopenjpeg20/j2k.c
+--- a/third_party/libopenjpeg/j2k.c
++++ b/third_party/libopenjpeg/j2k.c
 @@ -9882,6 +9882,12 @@ static OPJ_BOOL opj_j2k_update_image_data(opj_tcd_t * p_tcd,
           * */
          assert(res_x0 >= 0);
diff --git a/third_party/libopenjpeg20/0012-mct_sse.patch b/third_party/libopenjpeg/0012-mct_sse.patch
similarity index 89%
rename from third_party/libopenjpeg20/0012-mct_sse.patch
rename to third_party/libopenjpeg/0012-mct_sse.patch
index 812ff01..3010975 100644
--- a/third_party/libopenjpeg20/0012-mct_sse.patch
+++ b/third_party/libopenjpeg/0012-mct_sse.patch
@@ -1,7 +1,7 @@
-diff --git a/third_party/libopenjpeg20/mct.c b/third_party/libopenjpeg20/mct.c
+diff --git a/third_party/libopenjpeg/mct.c b/third_party/libopenjpeg/mct.c
 index 88c8f4092..c4c2e732e 100644
---- a/third_party/libopenjpeg20/mct.c
-+++ b/third_party/libopenjpeg20/mct.c
+--- a/third_party/libopenjpeg/mct.c
++++ b/third_party/libopenjpeg/mct.c
 @@ -37,13 +37,15 @@
   * POSSIBILITY OF SUCH DAMAGE.
   */
diff --git a/third_party/libopenjpeg20/0014-opj_jp2_read_ihdr_leak.patch b/third_party/libopenjpeg/0014-opj_jp2_read_ihdr_leak.patch
similarity index 80%
rename from third_party/libopenjpeg20/0014-opj_jp2_read_ihdr_leak.patch
rename to third_party/libopenjpeg/0014-opj_jp2_read_ihdr_leak.patch
index ab0da52..c221701 100644
--- a/third_party/libopenjpeg20/0014-opj_jp2_read_ihdr_leak.patch
+++ b/third_party/libopenjpeg/0014-opj_jp2_read_ihdr_leak.patch
@@ -1,7 +1,7 @@
-diff --git a/third_party/libopenjpeg20/jp2.c b/third_party/libopenjpeg20/jp2.c
+diff --git a/third_party/libopenjpeg/jp2.c b/third_party/libopenjpeg/jp2.c
 index a0f639d8e..38715b80f 100644
---- a/third_party/libopenjpeg20/jp2.c
-+++ b/third_party/libopenjpeg20/jp2.c
+--- a/third_party/libopenjpeg/jp2.c
++++ b/third_party/libopenjpeg/jp2.c
 @@ -599,6 +599,7 @@ static OPJ_BOOL opj_jp2_read_ihdr(opj_jp2_t *jp2,
      }
  
diff --git a/third_party/libopenjpeg20/0015-read_SPCod_SPCoc_overflow.patch b/third_party/libopenjpeg/0015-read_SPCod_SPCoc_overflow.patch
similarity index 71%
rename from third_party/libopenjpeg20/0015-read_SPCod_SPCoc_overflow.patch
rename to third_party/libopenjpeg/0015-read_SPCod_SPCoc_overflow.patch
index 11e22fb..41c9ecd 100644
--- a/third_party/libopenjpeg20/0015-read_SPCod_SPCoc_overflow.patch
+++ b/third_party/libopenjpeg/0015-read_SPCod_SPCoc_overflow.patch
@@ -1,7 +1,7 @@
-diff --git a/third_party/libopenjpeg20/j2k.c b/third_party/libopenjpeg20/j2k.c
+diff --git a/third_party/libopenjpeg/j2k.c b/third_party/libopenjpeg/j2k.c
 index 5e1494394..413dbdd9f 100644
---- a/third_party/libopenjpeg20/j2k.c
-+++ b/third_party/libopenjpeg20/j2k.c
+--- a/third_party/libopenjpeg/j2k.c
++++ b/third_party/libopenjpeg/j2k.c
 @@ -10537,6 +10537,10 @@ static OPJ_BOOL opj_j2k_read_SPCod_SPCoc(opj_j2k_t *p_j2k,
              p_j2k->m_specific_param.m_decoder.m_default_tcp;
  
diff --git a/third_party/libopenjpeg20/0016-read_SQcd_SQcc_overflow.patch b/third_party/libopenjpeg/0016-read_SQcd_SQcc_overflow.patch
similarity index 73%
rename from third_party/libopenjpeg20/0016-read_SQcd_SQcc_overflow.patch
rename to third_party/libopenjpeg/0016-read_SQcd_SQcc_overflow.patch
index 7a63b9b..b14d553 100644
--- a/third_party/libopenjpeg20/0016-read_SQcd_SQcc_overflow.patch
+++ b/third_party/libopenjpeg/0016-read_SQcd_SQcc_overflow.patch
@@ -1,7 +1,7 @@
-diff --git a/third_party/libopenjpeg20/j2k.c b/third_party/libopenjpeg20/j2k.c
+diff --git a/third_party/libopenjpeg/j2k.c b/third_party/libopenjpeg/j2k.c
 index 413dbdd9f..1932fe20c 100644
---- a/third_party/libopenjpeg20/j2k.c
-+++ b/third_party/libopenjpeg20/j2k.c
+--- a/third_party/libopenjpeg/j2k.c
++++ b/third_party/libopenjpeg/j2k.c
 @@ -10885,7 +10885,9 @@ static OPJ_BOOL opj_j2k_read_SQcd_SQcc(opj_j2k_t *p_j2k,
              p_j2k->m_specific_param.m_decoder.m_default_tcp;
  
diff --git a/third_party/libopenjpeg20/0019-tcd_init_tile.patch b/third_party/libopenjpeg/0019-tcd_init_tile.patch
similarity index 83%
rename from third_party/libopenjpeg20/0019-tcd_init_tile.patch
rename to third_party/libopenjpeg/0019-tcd_init_tile.patch
index bf16596..d6995a7 100644
--- a/third_party/libopenjpeg20/0019-tcd_init_tile.patch
+++ b/third_party/libopenjpeg/0019-tcd_init_tile.patch
@@ -1,7 +1,7 @@
-diff --git a/third_party/libopenjpeg20/tcd.c b/third_party/libopenjpeg20/tcd.c
+diff --git a/third_party/libopenjpeg/tcd.c b/third_party/libopenjpeg/tcd.c
 index 4c728d4c6..b9f571410 100644
---- a/third_party/libopenjpeg20/tcd.c
-+++ b/third_party/libopenjpeg20/tcd.c
+--- a/third_party/libopenjpeg/tcd.c
++++ b/third_party/libopenjpeg/tcd.c
 @@ -1094,6 +1094,9 @@ static INLINE OPJ_BOOL opj_tcd_init_tile(opj_tcd_t *p_tcd, OPJ_UINT32 p_tile_no,
                      l_current_precinct->ch = (OPJ_UINT32)((brcblkyend - tlcblkystart) >>
                                                            cblkheightexpn);
diff --git a/third_party/libopenjpeg20/0022-jp2_apply_pclr_overflow.patch b/third_party/libopenjpeg/0022-jp2_apply_pclr_overflow.patch
similarity index 90%
rename from third_party/libopenjpeg20/0022-jp2_apply_pclr_overflow.patch
rename to third_party/libopenjpeg/0022-jp2_apply_pclr_overflow.patch
index 1546b95..d978f06 100644
--- a/third_party/libopenjpeg20/0022-jp2_apply_pclr_overflow.patch
+++ b/third_party/libopenjpeg/0022-jp2_apply_pclr_overflow.patch
@@ -1,7 +1,7 @@
-diff --git a/third_party/libopenjpeg20/jp2.c b/third_party/libopenjpeg20/jp2.c
+diff --git a/third_party/libopenjpeg/jp2.c b/third_party/libopenjpeg/jp2.c
 index 38715b80f..dcaf3872c 100644
---- a/third_party/libopenjpeg20/jp2.c
-+++ b/third_party/libopenjpeg20/jp2.c
+--- a/third_party/libopenjpeg/jp2.c
++++ b/third_party/libopenjpeg/jp2.c
 @@ -1064,6 +1064,14 @@ static OPJ_BOOL opj_jp2_apply_pclr(opj_image_t *image,
      }
  
diff --git a/third_party/libopenjpeg20/0023-opj_j2k_read_mct_records.patch b/third_party/libopenjpeg/0023-opj_j2k_read_mct_records.patch
similarity index 82%
rename from third_party/libopenjpeg20/0023-opj_j2k_read_mct_records.patch
rename to third_party/libopenjpeg/0023-opj_j2k_read_mct_records.patch
index 607d9f1..674d4c1 100644
--- a/third_party/libopenjpeg20/0023-opj_j2k_read_mct_records.patch
+++ b/third_party/libopenjpeg/0023-opj_j2k_read_mct_records.patch
@@ -1,7 +1,7 @@
-diff --git a/third_party/libopenjpeg20/j2k.c b/third_party/libopenjpeg20/j2k.c
+diff --git a/third_party/libopenjpeg/j2k.c b/third_party/libopenjpeg/j2k.c
 index 1932fe20c..d24564cc2 100644
---- a/third_party/libopenjpeg20/j2k.c
-+++ b/third_party/libopenjpeg20/j2k.c
+--- a/third_party/libopenjpeg/j2k.c
++++ b/third_party/libopenjpeg/j2k.c
 @@ -5749,6 +5749,7 @@ static OPJ_BOOL opj_j2k_read_mct(opj_j2k_t *p_j2k,
      OPJ_UINT32 l_tmp;
      OPJ_UINT32 l_indix;
diff --git a/third_party/libopenjpeg20/0025-opj_j2k_add_mct_null_data.patch b/third_party/libopenjpeg/0025-opj_j2k_add_mct_null_data.patch
similarity index 85%
rename from third_party/libopenjpeg20/0025-opj_j2k_add_mct_null_data.patch
rename to third_party/libopenjpeg/0025-opj_j2k_add_mct_null_data.patch
index 5067906..1027138 100644
--- a/third_party/libopenjpeg20/0025-opj_j2k_add_mct_null_data.patch
+++ b/third_party/libopenjpeg/0025-opj_j2k_add_mct_null_data.patch
@@ -1,7 +1,7 @@
-diff --git a/third_party/libopenjpeg20/j2k.c b/third_party/libopenjpeg20/j2k.c
+diff --git a/third_party/libopenjpeg/j2k.c b/third_party/libopenjpeg/j2k.c
 index d24564cc2..889c2cfc8 100644
---- a/third_party/libopenjpeg20/j2k.c
-+++ b/third_party/libopenjpeg20/j2k.c
+--- a/third_party/libopenjpeg/j2k.c
++++ b/third_party/libopenjpeg/j2k.c
 @@ -6397,7 +6397,7 @@ static OPJ_BOOL opj_j2k_add_mct(opj_tcp_t * p_tcp, opj_image_t * p_image,
      if (l_deco_array) {
          l_data_size = MCT_ELEMENT_SIZE[l_deco_array->m_element_type] * p_image->numcomps
diff --git a/third_party/libopenjpeg20/0026-use_opj_uint_ceildiv.patch b/third_party/libopenjpeg/0026-use_opj_uint_ceildiv.patch
similarity index 96%
rename from third_party/libopenjpeg20/0026-use_opj_uint_ceildiv.patch
rename to third_party/libopenjpeg/0026-use_opj_uint_ceildiv.patch
index 90aabdb..e65f4c6 100644
--- a/third_party/libopenjpeg20/0026-use_opj_uint_ceildiv.patch
+++ b/third_party/libopenjpeg/0026-use_opj_uint_ceildiv.patch
@@ -1,7 +1,7 @@
-diff --git a/third_party/libopenjpeg20/j2k.c b/third_party/libopenjpeg20/j2k.c
+diff --git a/third_party/libopenjpeg/j2k.c b/third_party/libopenjpeg/j2k.c
 index 889c2cfc8..711dd73e8 100644
---- a/third_party/libopenjpeg20/j2k.c
-+++ b/third_party/libopenjpeg20/j2k.c
+--- a/third_party/libopenjpeg/j2k.c
++++ b/third_party/libopenjpeg/j2k.c
 @@ -2299,10 +2299,8 @@ static OPJ_BOOL opj_j2k_read_siz(opj_j2k_t *p_j2k,
      }
  
diff --git a/third_party/libopenjpeg20/0034-opj_malloc.patch b/third_party/libopenjpeg/0034-opj_malloc.patch
similarity index 86%
rename from third_party/libopenjpeg20/0034-opj_malloc.patch
rename to third_party/libopenjpeg/0034-opj_malloc.patch
index c0ab88e..5ed8711 100644
--- a/third_party/libopenjpeg20/0034-opj_malloc.patch
+++ b/third_party/libopenjpeg/0034-opj_malloc.patch
@@ -1,7 +1,7 @@
-diff --git a/third_party/libopenjpeg20/opj_malloc.cc b/third_party/libopenjpeg20/opj_malloc.cc
+diff --git a/third_party/libopenjpeg/opj_malloc.cc b/third_party/libopenjpeg/opj_malloc.cc
 new file mode 100644
 --- /dev/null
-+++ b/third_party/libopenjpeg20/opj_malloc.cc
++++ b/third_party/libopenjpeg/opj_malloc.cc
 @@ -0,0 +1,42 @@
 +// Copyright 2020 PDFium Authors. All rights reserved.
 +// Use of this source code is governed by a BSD-style license that can be
@@ -45,9 +45,9 @@
 +}
 +
 +}  // extern "C"
-diff --git a/third_party/libopenjpeg20/opj_malloc.h b/third_party/libopenjpeg20/opj_malloc.h
---- a/third_party/libopenjpeg20/opj_malloc.h
-+++ b/third_party/libopenjpeg20/opj_malloc.h
+diff --git a/third_party/libopenjpeg/opj_malloc.h b/third_party/libopenjpeg/opj_malloc.h
+--- a/third_party/libopenjpeg/opj_malloc.h
++++ b/third_party/libopenjpeg/opj_malloc.h
 @@ -33,6 +33,11 @@
  #define OPJ_MALLOC_H
  
diff --git a/third_party/libopenjpeg20/0035-opj_image_data_free.patch b/third_party/libopenjpeg/0035-opj_image_data_free.patch
similarity index 72%
rename from third_party/libopenjpeg20/0035-opj_image_data_free.patch
rename to third_party/libopenjpeg/0035-opj_image_data_free.patch
index f0cdd8a..436b31d 100644
--- a/third_party/libopenjpeg20/0035-opj_image_data_free.patch
+++ b/third_party/libopenjpeg/0035-opj_image_data_free.patch
@@ -1,7 +1,7 @@
-diff --git a/third_party/libopenjpeg20/jp2.c b/third_party/libopenjpeg20/jp2.c
+diff --git a/third_party/libopenjpeg/jp2.c b/third_party/libopenjpeg/jp2.c
 index dcaf3872c..02f3d04c7 100644
---- a/third_party/libopenjpeg20/jp2.c
-+++ b/third_party/libopenjpeg20/jp2.c
+--- a/third_party/libopenjpeg/jp2.c
++++ b/third_party/libopenjpeg/jp2.c
 @@ -1122,7 +1122,7 @@ static OPJ_BOOL opj_jp2_apply_pclr(opj_image_t *image,
          /* Prevent null pointer access */
          if (!src || !dst) {
diff --git a/third_party/libopenjpeg20/0039-opj_mqc_renorme.patch b/third_party/libopenjpeg/0039-opj_mqc_renorme.patch
similarity index 64%
rename from third_party/libopenjpeg20/0039-opj_mqc_renorme.patch
rename to third_party/libopenjpeg/0039-opj_mqc_renorme.patch
index 07e8a80..feac335 100644
--- a/third_party/libopenjpeg20/0039-opj_mqc_renorme.patch
+++ b/third_party/libopenjpeg/0039-opj_mqc_renorme.patch
@@ -1,7 +1,7 @@
-diff --git a/third_party/libopenjpeg20/mqc.c b/third_party/libopenjpeg20/mqc.c
+diff --git a/third_party/libopenjpeg/mqc.c b/third_party/libopenjpeg/mqc.c
 index 4cbfabd03..3caab9e7c 100644
---- a/third_party/libopenjpeg20/mqc.c
-+++ b/third_party/libopenjpeg20/mqc.c
+--- a/third_party/libopenjpeg/mqc.c
++++ b/third_party/libopenjpeg/mqc.c
 @@ -370,11 +370,6 @@ void opj_mqc_erterm_enc(opj_mqc_t *mqc)
      }
  }
diff --git a/third_party/libopenjpeg/0041-remove_opj_clock.patch b/third_party/libopenjpeg/0041-remove_opj_clock.patch
new file mode 100644
index 0000000..036a3bf
--- /dev/null
+++ b/third_party/libopenjpeg/0041-remove_opj_clock.patch
@@ -0,0 +1,12 @@
+diff --git a/third_party/libopenjpeg/opj_includes.h b/third_party/libopenjpeg/opj_includes.h
+index 0a8628c96..43c00a556 100644
+--- a/third_party/libopenjpeg/opj_includes.h
++++ b/third_party/libopenjpeg/opj_includes.h
+@@ -219,7 +219,6 @@ typedef unsigned int OPJ_BITFIELD;
+ #define OPJ_UNUSED(x) (void)x
+ 
+ #include "opj_inttypes.h"
+-#include "opj_clock.h"
+ #include "opj_malloc.h"
+ #include "event.h"
+ #include "function_list.h"
diff --git a/third_party/libopenjpeg20/README.pdfium b/third_party/libopenjpeg/README.pdfium
similarity index 100%
rename from third_party/libopenjpeg20/README.pdfium
rename to third_party/libopenjpeg/README.pdfium
diff --git a/third_party/libopenjpeg20/bio.c b/third_party/libopenjpeg/bio.c
similarity index 100%
rename from third_party/libopenjpeg20/bio.c
rename to third_party/libopenjpeg/bio.c
diff --git a/third_party/libopenjpeg20/bio.h b/third_party/libopenjpeg/bio.h
similarity index 100%
rename from third_party/libopenjpeg20/bio.h
rename to third_party/libopenjpeg/bio.h
diff --git a/third_party/libopenjpeg20/cio.c b/third_party/libopenjpeg/cio.c
similarity index 100%
rename from third_party/libopenjpeg20/cio.c
rename to third_party/libopenjpeg/cio.c
diff --git a/third_party/libopenjpeg20/cio.h b/third_party/libopenjpeg/cio.h
similarity index 100%
rename from third_party/libopenjpeg20/cio.h
rename to third_party/libopenjpeg/cio.h
diff --git a/third_party/libopenjpeg20/dwt.c b/third_party/libopenjpeg/dwt.c
similarity index 100%
rename from third_party/libopenjpeg20/dwt.c
rename to third_party/libopenjpeg/dwt.c
diff --git a/third_party/libopenjpeg20/dwt.h b/third_party/libopenjpeg/dwt.h
similarity index 100%
rename from third_party/libopenjpeg20/dwt.h
rename to third_party/libopenjpeg/dwt.h
diff --git a/third_party/libopenjpeg20/event.c b/third_party/libopenjpeg/event.c
similarity index 100%
rename from third_party/libopenjpeg20/event.c
rename to third_party/libopenjpeg/event.c
diff --git a/third_party/libopenjpeg20/event.h b/third_party/libopenjpeg/event.h
similarity index 100%
rename from third_party/libopenjpeg20/event.h
rename to third_party/libopenjpeg/event.h
diff --git a/third_party/libopenjpeg20/function_list.c b/third_party/libopenjpeg/function_list.c
similarity index 100%
rename from third_party/libopenjpeg20/function_list.c
rename to third_party/libopenjpeg/function_list.c
diff --git a/third_party/libopenjpeg20/function_list.h b/third_party/libopenjpeg/function_list.h
similarity index 100%
rename from third_party/libopenjpeg20/function_list.h
rename to third_party/libopenjpeg/function_list.h
diff --git a/third_party/libopenjpeg20/ht_dec.c b/third_party/libopenjpeg/ht_dec.c
similarity index 100%
rename from third_party/libopenjpeg20/ht_dec.c
rename to third_party/libopenjpeg/ht_dec.c
diff --git a/third_party/libopenjpeg20/image.c b/third_party/libopenjpeg/image.c
similarity index 100%
rename from third_party/libopenjpeg20/image.c
rename to third_party/libopenjpeg/image.c
diff --git a/third_party/libopenjpeg20/image.h b/third_party/libopenjpeg/image.h
similarity index 100%
rename from third_party/libopenjpeg20/image.h
rename to third_party/libopenjpeg/image.h
diff --git a/third_party/libopenjpeg20/invert.c b/third_party/libopenjpeg/invert.c
similarity index 100%
rename from third_party/libopenjpeg20/invert.c
rename to third_party/libopenjpeg/invert.c
diff --git a/third_party/libopenjpeg20/invert.h b/third_party/libopenjpeg/invert.h
similarity index 100%
rename from third_party/libopenjpeg20/invert.h
rename to third_party/libopenjpeg/invert.h
diff --git a/third_party/libopenjpeg20/j2k.c b/third_party/libopenjpeg/j2k.c
similarity index 100%
rename from third_party/libopenjpeg20/j2k.c
rename to third_party/libopenjpeg/j2k.c
diff --git a/third_party/libopenjpeg20/j2k.h b/third_party/libopenjpeg/j2k.h
similarity index 100%
rename from third_party/libopenjpeg20/j2k.h
rename to third_party/libopenjpeg/j2k.h
diff --git a/third_party/libopenjpeg20/jp2.c b/third_party/libopenjpeg/jp2.c
similarity index 100%
rename from third_party/libopenjpeg20/jp2.c
rename to third_party/libopenjpeg/jp2.c
diff --git a/third_party/libopenjpeg20/jp2.h b/third_party/libopenjpeg/jp2.h
similarity index 100%
rename from third_party/libopenjpeg20/jp2.h
rename to third_party/libopenjpeg/jp2.h
diff --git a/third_party/libopenjpeg20/mct.c b/third_party/libopenjpeg/mct.c
similarity index 100%
rename from third_party/libopenjpeg20/mct.c
rename to third_party/libopenjpeg/mct.c
diff --git a/third_party/libopenjpeg20/mct.h b/third_party/libopenjpeg/mct.h
similarity index 100%
rename from third_party/libopenjpeg20/mct.h
rename to third_party/libopenjpeg/mct.h
diff --git a/third_party/libopenjpeg20/mqc.c b/third_party/libopenjpeg/mqc.c
similarity index 100%
rename from third_party/libopenjpeg20/mqc.c
rename to third_party/libopenjpeg/mqc.c
diff --git a/third_party/libopenjpeg20/mqc.h b/third_party/libopenjpeg/mqc.h
similarity index 100%
rename from third_party/libopenjpeg20/mqc.h
rename to third_party/libopenjpeg/mqc.h
diff --git a/third_party/libopenjpeg20/mqc_inl.h b/third_party/libopenjpeg/mqc_inl.h
similarity index 100%
rename from third_party/libopenjpeg20/mqc_inl.h
rename to third_party/libopenjpeg/mqc_inl.h
diff --git a/third_party/libopenjpeg20/openjpeg.c b/third_party/libopenjpeg/openjpeg.c
similarity index 100%
rename from third_party/libopenjpeg20/openjpeg.c
rename to third_party/libopenjpeg/openjpeg.c
diff --git a/third_party/libopenjpeg20/openjpeg.h b/third_party/libopenjpeg/openjpeg.h
similarity index 100%
rename from third_party/libopenjpeg20/openjpeg.h
rename to third_party/libopenjpeg/openjpeg.h
diff --git a/third_party/libopenjpeg20/opj_clock.c b/third_party/libopenjpeg/opj_clock.c
similarity index 100%
rename from third_party/libopenjpeg20/opj_clock.c
rename to third_party/libopenjpeg/opj_clock.c
diff --git a/third_party/libopenjpeg20/opj_clock.h b/third_party/libopenjpeg/opj_clock.h
similarity index 100%
rename from third_party/libopenjpeg20/opj_clock.h
rename to third_party/libopenjpeg/opj_clock.h
diff --git a/third_party/libopenjpeg20/opj_codec.h b/third_party/libopenjpeg/opj_codec.h
similarity index 100%
rename from third_party/libopenjpeg20/opj_codec.h
rename to third_party/libopenjpeg/opj_codec.h
diff --git a/third_party/libopenjpeg20/opj_common.h b/third_party/libopenjpeg/opj_common.h
similarity index 100%
rename from third_party/libopenjpeg20/opj_common.h
rename to third_party/libopenjpeg/opj_common.h
diff --git a/third_party/libopenjpeg20/opj_config.h b/third_party/libopenjpeg/opj_config.h
similarity index 100%
rename from third_party/libopenjpeg20/opj_config.h
rename to third_party/libopenjpeg/opj_config.h
diff --git a/third_party/libopenjpeg20/opj_config_private.h b/third_party/libopenjpeg/opj_config_private.h
similarity index 100%
rename from third_party/libopenjpeg20/opj_config_private.h
rename to third_party/libopenjpeg/opj_config_private.h
diff --git a/third_party/libopenjpeg20/opj_includes.h b/third_party/libopenjpeg/opj_includes.h
similarity index 100%
rename from third_party/libopenjpeg20/opj_includes.h
rename to third_party/libopenjpeg/opj_includes.h
diff --git a/third_party/libopenjpeg20/opj_intmath.h b/third_party/libopenjpeg/opj_intmath.h
similarity index 100%
rename from third_party/libopenjpeg20/opj_intmath.h
rename to third_party/libopenjpeg/opj_intmath.h
diff --git a/third_party/libopenjpeg20/opj_inttypes.h b/third_party/libopenjpeg/opj_inttypes.h
similarity index 100%
rename from third_party/libopenjpeg20/opj_inttypes.h
rename to third_party/libopenjpeg/opj_inttypes.h
diff --git a/third_party/libopenjpeg20/opj_malloc.cc b/third_party/libopenjpeg/opj_malloc.cc
similarity index 100%
rename from third_party/libopenjpeg20/opj_malloc.cc
rename to third_party/libopenjpeg/opj_malloc.cc
diff --git a/third_party/libopenjpeg20/opj_malloc.h b/third_party/libopenjpeg/opj_malloc.h
similarity index 100%
rename from third_party/libopenjpeg20/opj_malloc.h
rename to third_party/libopenjpeg/opj_malloc.h
diff --git a/third_party/libopenjpeg20/opj_stdint.h b/third_party/libopenjpeg/opj_stdint.h
similarity index 100%
rename from third_party/libopenjpeg20/opj_stdint.h
rename to third_party/libopenjpeg/opj_stdint.h
diff --git a/third_party/libopenjpeg20/pi.c b/third_party/libopenjpeg/pi.c
similarity index 100%
rename from third_party/libopenjpeg20/pi.c
rename to third_party/libopenjpeg/pi.c
diff --git a/third_party/libopenjpeg20/pi.h b/third_party/libopenjpeg/pi.h
similarity index 100%
rename from third_party/libopenjpeg20/pi.h
rename to third_party/libopenjpeg/pi.h
diff --git a/third_party/libopenjpeg20/sparse_array.c b/third_party/libopenjpeg/sparse_array.c
similarity index 100%
rename from third_party/libopenjpeg20/sparse_array.c
rename to third_party/libopenjpeg/sparse_array.c
diff --git a/third_party/libopenjpeg20/sparse_array.h b/third_party/libopenjpeg/sparse_array.h
similarity index 100%
rename from third_party/libopenjpeg20/sparse_array.h
rename to third_party/libopenjpeg/sparse_array.h
diff --git a/third_party/libopenjpeg20/t1.c b/third_party/libopenjpeg/t1.c
similarity index 100%
rename from third_party/libopenjpeg20/t1.c
rename to third_party/libopenjpeg/t1.c
diff --git a/third_party/libopenjpeg20/t1.h b/third_party/libopenjpeg/t1.h
similarity index 100%
rename from third_party/libopenjpeg20/t1.h
rename to third_party/libopenjpeg/t1.h
diff --git a/third_party/libopenjpeg20/t1_generate_luts.c b/third_party/libopenjpeg/t1_generate_luts.c
similarity index 100%
rename from third_party/libopenjpeg20/t1_generate_luts.c
rename to third_party/libopenjpeg/t1_generate_luts.c
diff --git a/third_party/libopenjpeg20/t1_ht_luts.h b/third_party/libopenjpeg/t1_ht_luts.h
similarity index 100%
rename from third_party/libopenjpeg20/t1_ht_luts.h
rename to third_party/libopenjpeg/t1_ht_luts.h
diff --git a/third_party/libopenjpeg20/t1_luts.h b/third_party/libopenjpeg/t1_luts.h
similarity index 100%
rename from third_party/libopenjpeg20/t1_luts.h
rename to third_party/libopenjpeg/t1_luts.h
diff --git a/third_party/libopenjpeg20/t2.c b/third_party/libopenjpeg/t2.c
similarity index 100%
rename from third_party/libopenjpeg20/t2.c
rename to third_party/libopenjpeg/t2.c
diff --git a/third_party/libopenjpeg20/t2.h b/third_party/libopenjpeg/t2.h
similarity index 100%
rename from third_party/libopenjpeg20/t2.h
rename to third_party/libopenjpeg/t2.h
diff --git a/third_party/libopenjpeg20/tcd.c b/third_party/libopenjpeg/tcd.c
similarity index 100%
rename from third_party/libopenjpeg20/tcd.c
rename to third_party/libopenjpeg/tcd.c
diff --git a/third_party/libopenjpeg20/tcd.h b/third_party/libopenjpeg/tcd.h
similarity index 100%
rename from third_party/libopenjpeg20/tcd.h
rename to third_party/libopenjpeg/tcd.h
diff --git a/third_party/libopenjpeg20/tgt.c b/third_party/libopenjpeg/tgt.c
similarity index 100%
rename from third_party/libopenjpeg20/tgt.c
rename to third_party/libopenjpeg/tgt.c
diff --git a/third_party/libopenjpeg20/tgt.h b/third_party/libopenjpeg/tgt.h
similarity index 100%
rename from third_party/libopenjpeg20/tgt.h
rename to third_party/libopenjpeg/tgt.h
diff --git a/third_party/libopenjpeg20/thread.c b/third_party/libopenjpeg/thread.c
similarity index 100%
rename from third_party/libopenjpeg20/thread.c
rename to third_party/libopenjpeg/thread.c
diff --git a/third_party/libopenjpeg20/thread.h b/third_party/libopenjpeg/thread.h
similarity index 100%
rename from third_party/libopenjpeg20/thread.h
rename to third_party/libopenjpeg/thread.h
diff --git a/third_party/libopenjpeg20/tls_keys.h b/third_party/libopenjpeg/tls_keys.h
similarity index 100%
rename from third_party/libopenjpeg20/tls_keys.h
rename to third_party/libopenjpeg/tls_keys.h
diff --git a/third_party/libopenjpeg20/0041-remove_opj_clock.patch b/third_party/libopenjpeg20/0041-remove_opj_clock.patch
deleted file mode 100644
index 02622f4..0000000
--- a/third_party/libopenjpeg20/0041-remove_opj_clock.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff --git a/third_party/libopenjpeg20/opj_includes.h b/third_party/libopenjpeg20/opj_includes.h
-index 0a8628c96..43c00a556 100644
---- a/third_party/libopenjpeg20/opj_includes.h
-+++ b/third_party/libopenjpeg20/opj_includes.h
-@@ -219,7 +219,6 @@ typedef unsigned int OPJ_BITFIELD;
- #define OPJ_UNUSED(x) (void)x
- 
- #include "opj_inttypes.h"
--#include "opj_clock.h"
- #include "opj_malloc.h"
- #include "event.h"
- #include "function_list.h"