{"id":2108,"date":"2026-03-15T20:28:36","date_gmt":"2026-03-15T12:28:36","guid":{"rendered":"https:\/\/xujiwei.com\/blog\/?p=2108"},"modified":"2026-03-15T20:28:36","modified_gmt":"2026-03-15T12:28:36","slug":"esp32-jpeg-decode-optimize","status":"publish","type":"post","link":"https:\/\/xujiwei.com\/blog\/2026\/03\/esp32-jpeg-decode-optimize\/","title":{"rendered":"ESP32-S3 JPEG \u5b9e\u6d4b\uff1a\u4ece\u89e3\u7801\u5e93\u5bf9\u6bd4\u5230 DMA \u4f18\u5316\uff0c\u6700\u7ec8\u649e\u4e0a SPI \u4e0a\u9650"},"content":{"rendered":"<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_65 ez-toc-wrap-right counter-hierarchy ez-toc-counter ez-toc-light-blue ez-toc-container-direction\">\n<p class=\"ez-toc-title\">\u6587\u7ae0\u76ee\u5f55<\/p>\n<label for=\"ez-toc-cssicon-toggle-item-69d1b92383fbe\" class=\"ez-toc-cssicon-toggle-label\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/label><input type=\"checkbox\"  id=\"ez-toc-cssicon-toggle-item-69d1b92383fbe\"  aria-label=\"Toggle\" \/><nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/xujiwei.com\/blog\/2026\/03\/esp32-jpeg-decode-optimize\/#%E5%89%8D%E8%A8%80\" title=\"\u524d\u8a00\">\u524d\u8a00<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/xujiwei.com\/blog\/2026\/03\/esp32-jpeg-decode-optimize\/#%E6%B5%8B%E8%AF%95%E8%A7%86%E9%A2%91\" title=\"\u6d4b\u8bd5\u89c6\u9891\">\u6d4b\u8bd5\u89c6\u9891<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/xujiwei.com\/blog\/2026\/03\/esp32-jpeg-decode-optimize\/#%E6%9C%80%E7%BB%88%E6%80%A7%E8%83%BD%E6%B5%8B%E8%AF%95%E8%A7%86%E9%A2%91\" title=\"\u6700\u7ec8\u6027\u80fd\u6d4b\u8bd5\u89c6\u9891\">\u6700\u7ec8\u6027\u80fd\u6d4b\u8bd5\u89c6\u9891<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/xujiwei.com\/blog\/2026\/03\/esp32-jpeg-decode-optimize\/#%E9%BB%98%E8%AE%A4_Block_%E4%B8%8A%E5%B1%8F%E6%B5%81%E7%A8%8B%E6%BC%94%E7%A4%BA\" title=\"\u9ed8\u8ba4 Block \u4e0a\u5c4f\u6d41\u7a0b\u6f14\u793a\">\u9ed8\u8ba4 Block \u4e0a\u5c4f\u6d41\u7a0b\u6f14\u793a<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/xujiwei.com\/blog\/2026\/03\/esp32-jpeg-decode-optimize\/#%E6%B5%8B%E8%AF%95%E6%96%B9%E6%A1%88\" title=\"\u6d4b\u8bd5\u65b9\u6848\">\u6d4b\u8bd5\u65b9\u6848<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/xujiwei.com\/blog\/2026\/03\/esp32-jpeg-decode-optimize\/#%E5%85%88%E6%90%9E%E6%B8%85%E6%A5%9A%EF%BC%9AMCU_%E6%98%AF%E4%BB%80%E4%B9%88\" title=\"\u5148\u641e\u6e05\u695a\uff1aMCU \u662f\u4ec0\u4e48\">\u5148\u641e\u6e05\u695a\uff1aMCU \u662f\u4ec0\u4e48<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/xujiwei.com\/blog\/2026\/03\/esp32-jpeg-decode-optimize\/#%E6%B5%8B%E8%AF%95%E7%BB%93%E6%9E%9C\" title=\"\u6d4b\u8bd5\u7ed3\u679c\">\u6d4b\u8bd5\u7ed3\u679c<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/xujiwei.com\/blog\/2026\/03\/esp32-jpeg-decode-optimize\/#%E4%B8%80%E3%80%81FULL_IMAGE_%E6%A8%A1%E5%BC%8F\" title=\"\u4e00\u3001FULL IMAGE \u6a21\u5f0f\">\u4e00\u3001FULL IMAGE \u6a21\u5f0f<\/a><ul class='ez-toc-list-level-4' ><li class='ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/xujiwei.com\/blog\/2026\/03\/esp32-jpeg-decode-optimize\/#FULL_IMAGE_%E6%A8%A1%E5%BC%8F%E5%B0%8F%E7%BB%93\" title=\"FULL IMAGE \u6a21\u5f0f\u5c0f\u7ed3\">FULL IMAGE \u6a21\u5f0f\u5c0f\u7ed3<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-10\" href=\"https:\/\/xujiwei.com\/blog\/2026\/03\/esp32-jpeg-decode-optimize\/#%E4%BA%8C%E3%80%81Block_DMA_%E4%B8%8D%E5%90%88%E5%B9%B6_Strip\" title=\"\u4e8c\u3001Block + DMA \u4e0d\u5408\u5e76 Strip\">\u4e8c\u3001Block + DMA \u4e0d\u5408\u5e76 Strip<\/a><ul class='ez-toc-list-level-4' ><li class='ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-11\" href=\"https:\/\/xujiwei.com\/blog\/2026\/03\/esp32-jpeg-decode-optimize\/#Block_DMA_%E4%B8%8D%E5%90%88%E5%B9%B6_Strip_%E5%B0%8F%E7%BB%93\" title=\"Block + DMA \u4e0d\u5408\u5e76 Strip \u5c0f\u7ed3\">Block + DMA \u4e0d\u5408\u5e76 Strip \u5c0f\u7ed3<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-12\" href=\"https:\/\/xujiwei.com\/blog\/2026\/03\/esp32-jpeg-decode-optimize\/#%E4%B8%89%E3%80%81Block_DMA_%E5%90%88%E5%B9%B6_Strip\" title=\"\u4e09\u3001Block + DMA \u5408\u5e76 Strip\">\u4e09\u3001Block + DMA \u5408\u5e76 Strip<\/a><ul class='ez-toc-list-level-4' ><li class='ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-13\" href=\"https:\/\/xujiwei.com\/blog\/2026\/03\/esp32-jpeg-decode-optimize\/#Block_DMA_%E5%90%88%E5%B9%B6_Strip_%E5%B0%8F%E7%BB%93\" title=\"Block + DMA \u5408\u5e76 Strip \u5c0f\u7ed3\">Block + DMA \u5408\u5e76 Strip \u5c0f\u7ed3<\/a><\/li><\/ul><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-14\" href=\"https:\/\/xujiwei.com\/blog\/2026\/03\/esp32-jpeg-decode-optimize\/#%E5%BD%93%E5%89%8D%E9%85%8D%E7%BD%AE%E4%B8%8B%E7%9A%84%E7%90%86%E8%AE%BA_FPS_%E4%B8%8A%E9%99%90\" title=\"\u5f53\u524d\u914d\u7f6e\u4e0b\u7684\u7406\u8bba FPS \u4e0a\u9650\">\u5f53\u524d\u914d\u7f6e\u4e0b\u7684\u7406\u8bba FPS \u4e0a\u9650<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-15\" href=\"https:\/\/xujiwei.com\/blog\/2026\/03\/esp32-jpeg-decode-optimize\/#%E6%B5%8B%E8%AF%95%E7%BB%93%E8%AE%BA\" title=\"\u6d4b\u8bd5\u7ed3\u8bba\">\u6d4b\u8bd5\u7ed3\u8bba<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-16\" href=\"https:\/\/xujiwei.com\/blog\/2026\/03\/esp32-jpeg-decode-optimize\/#%E4%BD%BF%E7%94%A8%E5%BB%BA%E8%AE%AE\" title=\"\u4f7f\u7528\u5efa\u8bae\">\u4f7f\u7528\u5efa\u8bae<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-17\" href=\"https:\/\/xujiwei.com\/blog\/2026\/03\/esp32-jpeg-decode-optimize\/#%E5%90%8E%E7%BB%AD%E6%89%93%E7%AE%97\" title=\"\u540e\u7eed\u6253\u7b97\">\u540e\u7eed\u6253\u7b97<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-18\" href=\"https:\/\/xujiwei.com\/blog\/2026\/03\/esp32-jpeg-decode-optimize\/#%E5%8F%82%E8%80%83%E8%B5%84%E6%96%99\" title=\"\u53c2\u8003\u8d44\u6599\">\u53c2\u8003\u8d44\u6599<\/a><\/li><\/ul><\/nav><\/div>\n<h2><span class=\"ez-toc-section\" id=\"%E5%89%8D%E8%A8%80\"><\/span>\u524d\u8a00<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>\u4e4b\u524d\u505a\u4e86 ESP32-S3 \u4e0a\u5e38\u89c1 JPEG \u89e3\u7801\u5e93\uff08Tjpg_Decoder\u3001JPEGDEC\u3001ESP_NEW_JPEG\uff09\u7684\u6027\u80fd\u6d4b\u8bd5\uff0c\u6700\u7ec8\u7ed3\u8bba\u662f ESP_NEW_JPEG \u5728\u6b64\u524d\u6d4b\u8bd5\u4e2d\u8868\u73b0\u6700\u5f3a\uff08\u89c1 <a href=\"https:\/\/mp.weixin.qq.com\/s\/cSaqb_5Q6BvhtLr2ifkcbw\">ESP32-S3 + Arduino \u5404\u79cd JPEG \u89e3\u7801\u5e93\u901f\u5ea6\u5bf9\u6bd4\uff0c\u5230\u5e95\u54ea\u4e2a\u624d\u662f\u6700\u5feb\u7684\uff1f<\/a>\u3001<a href=\"https:\/\/mp.weixin.qq.com\/s\/-qAOWthe8w_qdWJ88EZOeg\">\u52d8\u8bef\uff1aESP_NEW_JPEG \u66f4\u65b0\u5230\u6700\u65b0\u7248\u540e\uff0c\u6240\u6709\u5206\u8fa8\u7387\u90fd\u662f\u6700\u5feb\u7684<\/a>\uff09\u3002<\/p>\n<p>\u4f46\u662f<strong>\u4e0a\u6b21\u662f\u7528\u7684\u9759\u6001\u56fe\u7247<\/strong>\uff0c\u6bcf\u6b21\u89e3\u7801\u90fd\u662f\u540c\u6837\u56fe\u7247\u6570\u636e\uff0c\u4e0e\u771f\u5b9e\u4f7f\u7528\u573a\u666f\u4f1a\u6709\u5dee\u5f02\uff0c\u6bd5\u7adf\u5982\u679c\u662f\u4f7f\u7528 ESP32-S3 \u64ad\u653e\u89c6\u9891\uff0c\u6bcf\u4e00\u5e27\u7684\u5185\u5bb9\u90fd\u662f\u4e0d\u4e00\u6837\u7684\uff0c\u89e3\u7801\u65f6\u95f4\u4e5f\u4f1a\u6709\u6ce2\u52a8\u3002<\/p>\n<p>\u8fd9\u6b21\u76f4\u63a5\u4ece\u89c6\u9891\u91cc\u62bd\u5e27\uff0c\u6a21\u62df\u4e00\u4e0b\u771f\u5b9e\u89c6\u9891\u64ad\u653e\u573a\u666f\uff0c\u770b\u770b\u5728\u8fd9\u4e2a\u6761\u4ef6\u4e0b\u80fd\u628a FPS \u63a8\u5230\u591a\u9ad8\u3002<\/p>\n<p>\u53e6\u5916\u4e0a\u6b21\u6d4b\u8bd5\u65f6\u4e5f\u6ca1\u6709\u4f18\u5316\u89e3\u7801\u4e0e\u4f20\u8f93\u6b65\u9aa4\uff0c<strong>\u7406\u8bba\u4e0a\u53ef\u4ee5\u4f7f\u7528 DMA \u5b9e\u73b0 CPU \u65f6\u95f4\u66f4\u6709\u6548\u7684\u5229\u7528<\/strong>\uff0c\u8fd9\u6b21\u4e5f\u4f18\u5316\u4e00\u4e0b\u4ee3\u7801\uff0c\u5bf9\u6bd4\u770b\u770b\u6548\u679c\u3002<\/p>\n<p><strong>\u90a3\u4e48\u8fd9\u6b21\u6d4b\u8bd5\u5728\u4ee5\u4e0b\u4e24\u4e2a\u6761\u4ef6\u4e0b\uff0c\u6700\u7ec8\u7ed3\u679c\u4f1a\u5982\u4f55\uff1f<\/strong><\/p>\n<ol>\n<li>\u56fe\u7247\u6570\u636e\u4f7f\u7528\u771f\u5b9e\u89c6\u9891\u62bd\u5e27\uff0c\u6bcf\u5e27\u5185\u5bb9\u4e0d\u540c\uff0c\u66f4\u63a5\u8fd1\u64ad\u653e\u573a\u666f\uff1b<\/li>\n<li>\u52a0\u5165 DMA \u548c Block \u5408\u5e76\u7b56\u7565\uff0c\u6d4b\u8bd5\u201c\u89e3\u7801\u201d\u548c\u201c\u4e0a\u5c4f\u201d\u80fd\u5426\u771f\u6b63\u5e76\u884c\u3002<\/li>\n<\/ol>\n<p>\u5148\u8bf4\u7ed3\u8bba\uff1a<strong>\u5728 240\u00d7240 + RGB565 + SPI 40MHz \u7684\u914d\u7f6e\u4e0b\uff0c\u6700\u7ec8\u903c\u8fd1\u94fe\u8def\u4e0a\u9650\uff0c\u5b9e\u6d4b\u7ea6 40 FPS\uff0c\u518d\u5f80\u4e0a\u63d0\u5347\u7a7a\u95f4\u5f88\u5c0f\u4e86 \ud83d\ude03\u3002<\/strong><\/p>\n<hr \/>\n<h2><span class=\"ez-toc-section\" id=\"%E6%B5%8B%E8%AF%95%E8%A7%86%E9%A2%91\"><\/span>\u6d4b\u8bd5\u89c6\u9891<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<h3><span class=\"ez-toc-section\" id=\"%E6%9C%80%E7%BB%88%E6%80%A7%E8%83%BD%E6%B5%8B%E8%AF%95%E8%A7%86%E9%A2%91\"><\/span>\u6700\u7ec8\u6027\u80fd\u6d4b\u8bd5\u89c6\u9891<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<div style=\"width: 620px;\" class=\"wp-video\"><!--[if lt IE 9]><script>document.createElement('video');<\/script><![endif]-->\n<video class=\"wp-video-shortcode\" id=\"video-2108-1\" width=\"620\" height=\"349\" preload=\"metadata\" controls=\"controls\"><source type=\"video\/mp4\" src=\"https:\/\/xujiwei.com\/blog\/wp-content\/uploads\/2026\/03\/ESP32-JPEG-DMA-Demo.mp4?_=1\" \/><a href=\"https:\/\/xujiwei.com\/blog\/wp-content\/uploads\/2026\/03\/ESP32-JPEG-DMA-Demo.mp4\">https:\/\/xujiwei.com\/blog\/wp-content\/uploads\/2026\/03\/ESP32-JPEG-DMA-Demo.mp4<\/a><\/video><\/div>\n<h3><span class=\"ez-toc-section\" id=\"%E9%BB%98%E8%AE%A4_Block_%E4%B8%8A%E5%B1%8F%E6%B5%81%E7%A8%8B%E6%BC%94%E7%A4%BA\"><\/span>\u9ed8\u8ba4 Block \u4e0a\u5c4f\u6d41\u7a0b\u6f14\u793a<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<div style=\"width: 620px;\" class=\"wp-video\"><video class=\"wp-video-shortcode\" id=\"video-2108-2\" width=\"620\" height=\"349\" preload=\"metadata\" controls=\"controls\"><source type=\"video\/mp4\" src=\"https:\/\/xujiwei.com\/blog\/wp-content\/uploads\/2026\/03\/ESP32-JPEG-MCU-Demo.mp4?_=2\" \/><a href=\"https:\/\/xujiwei.com\/blog\/wp-content\/uploads\/2026\/03\/ESP32-JPEG-MCU-Demo.mp4\">https:\/\/xujiwei.com\/blog\/wp-content\/uploads\/2026\/03\/ESP32-JPEG-MCU-Demo.mp4<\/a><\/video><\/div>\n<hr \/>\n<h2><span class=\"ez-toc-section\" id=\"%E6%B5%8B%E8%AF%95%E6%96%B9%E6%A1%88\"><\/span>\u6d4b\u8bd5\u65b9\u6848<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p><img src=\"https:\/\/xujiwei.com\/blog\/wp-content\/uploads\/2026\/03\/esp32-jpeg-decode-optimize-2.jpg\" alt=\"esp32-jpeg-decode-optimize-2\" \/><\/p>\n<p><strong>\u6d4b\u8bd5\u786c\u4ef6\uff1a<\/strong><\/p>\n<ul>\n<li>ESP32-S3-Zero \u5f00\u53d1\u677f\uff0c\u53cc\u6838 240MHz\uff0c\u5f00\u542f PSRAM<\/li>\n<li>\u5c4f\u5e55\uff1aST7789 240\u00d7240\uff0cSPI \u63a5\u53e3<\/li>\n<li>PCB \u8bbe\u8ba1\u65f6\u8fde\u63a5\u5c4f\u5e55\u6ca1\u6709\u4f7f\u7528\u6807\u51c6 SPI \u5f15\u811a\uff0c\u4f7f\u7528\u4e86 GPIO Matrix\uff0c\u56e0\u6b64\u8fd9\u91cc SPI \u603b\u7ebf\u65f6\u949f\u914d\u7f6e 40 MHz<\/li>\n<\/ul>\n<p><strong>\u6d4b\u8bd5\u6570\u636e\uff1a<\/strong><\/p>\n<ul>\n<li>\u89c6\u9891\u62bd\u5e27\uff1a2 \u79d2\u5171 <strong>60 \u5e27<\/strong>\uff0c\u6bcf\u5e27\u5185\u5bb9\u5404\u4e0d\u76f8\u540c<\/li>\n<li>\u5bfc\u51fa\u683c\u5f0f\uff1aJPEG\uff0c\u8d28\u91cf 80<\/li>\n<li>\u5206\u8fa8\u7387\uff1a240\u00d7240<\/li>\n<\/ul>\n<p><strong>\u6d4b\u8bd5\u6a21\u5f0f\uff1a<\/strong><\/p>\n<p><strong>\u2460 FULL IMAGE + Sync SPI<\/strong><\/p>\n<ul>\n<li>\u89e3\u7801\u5b8c\u6210\u540e\uff0c\u4f7f\u7528\u540c\u6b65 SPI \u5c06\u50cf\u7d20\u6570\u636e\u4e0a\u5c4f\uff1b\u81f3\u4e8e\u89e3\u7801\u8f93\u51fa\u662f\u5206\u5757\u8fd8\u662f\u6574\u5e27\uff0c\u53d6\u51b3\u4e8e\u5404\u89e3\u7801\u5e93\u81ea\u8eab\u7684\u9ed8\u8ba4\u884c\u4e3a\u3002<\/li>\n<li>\u5355\u5e27\u6700\u5927\u5360\u7528\u5185\u5b58\uff1a<strong>240\u00d7240\u00d72 = 115,200 \u5b57\u8282<\/strong><\/li>\n<li>SPI \u963b\u585e\u4f20\u8f93\uff0c\u65e0 DMA<\/li>\n<\/ul>\n<p><strong>\u2461 Block + DMA<\/strong><\/p>\n<ul>\n<li>\u8fb9\u89e3\u7801\u8fb9\u7528 SPI + DMA \u63a8\u5c4f<\/li>\n<li>\u89e3\u7801\u5e93\u6bcf\u8f93\u51fa\u4e00\u4e2a Block\uff0c\u7acb\u523b DMA \u4f20\u8f93\uff0c\u89e3\u7801\u4e0e\u4f20\u8f93\u90e8\u5206\u91cd\u53e0<\/li>\n<li>\u7ec6\u5206\u4e3a\u4e24\u79cd\u5b50\u6a21\u5f0f\uff1a\n<ul>\n<li><strong>\u4e0d\u5408\u5e76 Strip<\/strong>\uff1a\u76f4\u63a5\u6309\u89e3\u7801\u5e93\u8f93\u51fa\u7684 Block \u5c3a\u5bf8\u53d1 DMA<\/li>\n<li><strong>\u5408\u5e76 Strip<\/strong>\uff1a\u628a\u591a\u4e2a Block \u5408\u5e76\u6210 240\u00d716 \u7684\u6574\u884c\u518d\u7edf\u4e00\u53d1<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<hr \/>\n<h2><span class=\"ez-toc-section\" id=\"%E5%85%88%E6%90%9E%E6%B8%85%E6%A5%9A%EF%BC%9AMCU_%E6%98%AF%E4%BB%80%E4%B9%88\"><\/span>\u5148\u641e\u6e05\u695a\uff1aMCU \u662f\u4ec0\u4e48<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>\u5728\u770b\u6570\u636e\u4e4b\u524d\uff0c\u6709\u4e2a\u6982\u5ff5\u8981\u8bf4\u660e\u4e00\u4e0b\u2014\u2014<strong>MCU\uff08Minimum Coded Unit\uff09<\/strong>\uff0cJPEG \u7f16\u7801\u7684\u6700\u5c0f\u5355\u5143\u3002<\/p>\n<p>\u4e3a\u4e86\u65b9\u4fbf\u7406\u89e3\uff0c\u672c\u6587\u8ba8\u8bba\u7684\u56fe\u7247\u5728\u5f53\u524d\u91c7\u6837\u914d\u7f6e\u4e0b\uff0c<strong>\u53ef\u628a MCU \u7406\u89e3\u4e3a\u5e38\u89c1\u7684 16\u00d716 \u8f93\u51fa\u5757\u3002<\/strong><\/p>\n<p><img src=\"https:\/\/xujiwei.com\/blog\/wp-content\/uploads\/2026\/03\/esp32-jpeg-decode-optimize-3.jpg\" alt=\"esp32-jpeg-decode-optimize-3\" \/><\/p>\n<p>\u4e09\u4e2a\u5e93\u5904\u7406 MCU \u7684\u65b9\u5f0f\u5dee\u522b\u633a\u5927\uff1a<\/p>\n<table>\n<thead>\n<tr>\n<th>Decoder<\/th>\n<th>MCU \u884c\u4e3a<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><strong>Tjpg_Decoder<\/strong><\/td>\n<td>\u56fa\u5b9a 16\u00d716\uff0c\u4efb\u4f55\u60c5\u51b5\u90fd\u4e0d\u5408\u5e76<\/td>\n<\/tr>\n<tr>\n<td><strong>JPEGDEC<\/strong><\/td>\n<td>\u6839\u636e\u6a21\u5f0f\u548c\u5206\u8fa8\u7387\u8ba1\u7b97\uff0c\u53ef\u4ee5\u5408\u5e76\u8f93\u51fa\u66f4\u5927\u7684 Strip<\/td>\n<\/tr>\n<tr>\n<td><strong>ESP_NEW_JPEG<\/strong><\/td>\n<td>\u81ea\u52a8\u5408\u5e76\u5230 240 \u5bbd\u5ea6\uff08\u6574\u884c\u8f93\u51fa\uff09<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u9700\u8981\u6ce8\u610f\u7684\u662f\uff1a<strong>JPEGDEC \u5355\u6b21\u8f93\u51fa Strip \u7684\u5c3a\u5bf8\uff0c\u4f9d\u8d56\u4e8e\u5185\u90e8\u7684 <code>iPitch<\/code> \u53c2\u6570<\/strong>\uff0c\u800c iPitch \u53c8\u53d7\u89e3\u7801\u5e93\u91cc <code>MAX_BUFFERED_PIXELS<\/code>\uff08\u9ed8\u8ba4 <strong>2048<\/strong>\uff09\u8fd9\u4e2a\u4e0a\u9650\u5f71\u54cd\u3002<\/p>\n<p>\u5bf9\u4e8e 240\u00d7240 \u56fe\u7247\uff0c\u5982\u679c\u60f3\u5355\u6b21\u8f93\u51fa\u6574\u884c\uff0815 \u4e2a MCU\uff09\uff0c\u9700\u8981\u7ea6 <strong>15 \u00d7 16 \u00d7 16 = 3840 \u50cf\u7d20<\/strong>\u7684\u7f13\u51b2\u2014\u2014\u5982\u679c\u6709\u8fd9\u4e2a\u9700\u6c42\uff0c\u8bb0\u5f97\u540c\u6b65\u4fee\u6539\u5e93\u91cc\u7684\u8fd9\u4e2a\u4e0a\u9650\u503c\u3002<\/p>\n<hr \/>\n<h2><span class=\"ez-toc-section\" id=\"%E6%B5%8B%E8%AF%95%E7%BB%93%E6%9E%9C\"><\/span>\u6d4b\u8bd5\u7ed3\u679c<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>\u6574\u4f53\u7ed3\u679c\u5bf9\u6bd4\u5982\u4e0b\uff1a<\/p>\n<p><img src=\"https:\/\/xujiwei.com\/blog\/wp-content\/uploads\/2026\/03\/esp32-jpeg-decode-optimize-4.jpg\" alt=\"esp32-jpeg-decode-optimize-4\" \/><\/p>\n<h3><span class=\"ez-toc-section\" id=\"%E4%B8%80%E3%80%81FULL_IMAGE_%E6%A8%A1%E5%BC%8F\"><\/span>\u4e00\u3001FULL IMAGE \u6a21\u5f0f<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<table>\n<thead>\n<tr>\n<th>Decoder<\/th>\n<th>MCU<\/th>\n<th>Blocks<\/th>\n<th>Decode Avg(ms)<\/th>\n<th>Draw Avg(ms)<\/th>\n<th>FPS Avg<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Tjpg_Decoder<\/td>\n<td>16\u00d716<\/td>\n<td>225<\/td>\n<td>29.49<\/td>\n<td>51.44<\/td>\n<td>12.36<\/td>\n<\/tr>\n<tr>\n<td>JPEGDEC<\/td>\n<td>128\u00d716<\/td>\n<td>30<\/td>\n<td>18.07<\/td>\n<td><strong>28.53<\/strong><\/td>\n<td>21.46<\/td>\n<\/tr>\n<tr>\n<td><strong>ESP_NEW_JPEG<\/strong><\/td>\n<td>240\u00d7240<\/td>\n<td>1<\/td>\n<td><strong>11.91<\/strong><\/td>\n<td>30.56<\/td>\n<td><strong>23.56<\/strong><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u8fd9\u4e2a\u6a21\u5f0f\u4e0b\uff0c<strong>ESP_NEW_JPEG \u89e3\u7801\u901f\u5ea6\u6700\u5feb\uff0811.91ms\uff09<\/strong>\uff0cJPEGDEC \u548c ESP_NEW_JPEG \u7684\u4e0a\u5c4f\u65f6\u95f4\u63a5\u8fd1\uff0c\u6700\u7ec8 FPS \u90fd\u4e0d\u9ad8\uff0c\u6700\u597d\u4e5f\u53ea\u6709 <strong>23.56 FPS<\/strong>\u3002<\/p>\n<p>\u539f\u56e0\u5f88\u660e\u663e\uff1aFULL IMAGE \u6a21\u5f0f\u6ca1\u6709 DMA\uff0cSPI \u662f\u963b\u585e\u7684\uff0cCPU \u5728\u7b49\u5f85 SPI \u4f20\u8f93\u671f\u95f4\u4ec0\u4e48\u90fd\u505a\u4e0d\u4e86\uff0c\u89e3\u7801\u518d\u5feb\u4e5f\u62c9\u4e0d\u5f00\u5dee\u8ddd\u3002<strong>\u4e0a\u5c4f\u65f6\u95f4\u660e\u663e\u9ad8\u4e8e\u89e3\u7801\u65f6\u95f4\uff0c\u5df2\u7ecf\u6210\u4e3a\u4e3b\u8981\u8017\u65f6\u6765\u6e90\u3002<\/strong><\/p>\n<p><strong>Tjpg_Decoder \u7684 Block \u6570\u9ad8\u8fbe 225 \u4e2a\uff08\u6bcf\u5e27\u8981\u56de\u8c03 225 \u6b21\uff09<\/strong>\uff0c\u867d\u7136\u89e3\u7801\u65f6\u95f4\u770b\u7740\u6b63\u5e38\uff0c\u4f46\u5927\u91cf\u5c0f\u5757\u7684\u8c03\u5ea6\u5f00\u9500\u4e5f\u662f\u7d2f\u79ef\u7684\u3002ESP_NEW_JPEG \u53ea\u9700\u8981\u56de\u8c03 1 \u6b21\uff08\u6574\u5e27\uff09\uff0c\u8c03\u5ea6\u5f00\u9500\u51e0\u4e4e\u4e3a\u96f6\u3002<\/p>\n<h4><span class=\"ez-toc-section\" id=\"FULL_IMAGE_%E6%A8%A1%E5%BC%8F%E5%B0%8F%E7%BB%93\"><\/span><strong>FULL IMAGE \u6a21\u5f0f\u5c0f\u7ed3<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h4>\n<p>\u8fd9\u8bf4\u660e\u5728\u540c\u6b65 SPI \u6a21\u5f0f\u4e0b\uff0c\u7cfb\u7edf\u74f6\u9888\u6839\u672c\u4e0d\u5728 JPEG \u89e3\u7801\uff0c\u800c\u5728\u4e0a\u5c4f\u963b\u585e\uff1b\u89e3\u7801\u5668\u518d\u5feb\uff0c\u4e5f\u53ea\u80fd\u7b49\u5f85 SPI\u3002<\/p>\n<hr \/>\n<h3><span class=\"ez-toc-section\" id=\"%E4%BA%8C%E3%80%81Block_DMA_%E4%B8%8D%E5%90%88%E5%B9%B6_Strip\"><\/span>\u4e8c\u3001Block + DMA \u4e0d\u5408\u5e76 Strip<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<table>\n<thead>\n<tr>\n<th>Decoder<\/th>\n<th>MCU<\/th>\n<th>DMA Send<\/th>\n<th>Decode Avg(ms)<\/th>\n<th>Draw Avg(ms)<\/th>\n<th>FPS Avg<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Tjpg_Decoder<\/td>\n<td>16\u00d716<\/td>\n<td>16\u00d716<\/td>\n<td>32.19<\/td>\n<td>27.93<\/td>\n<td>16.63<\/td>\n<\/tr>\n<tr>\n<td>JPEGDEC<\/td>\n<td>64\u00d716<\/td>\n<td>64\u00d716<\/td>\n<td>18.55<\/td>\n<td><strong>14.73<\/strong><\/td>\n<td>30.05<\/td>\n<\/tr>\n<tr>\n<td><strong>ESP_NEW_JPEG<\/strong><\/td>\n<td>240\u00d716<\/td>\n<td>240\u00d716<\/td>\n<td><strong>6.70<\/strong><\/td>\n<td>17.83<\/td>\n<td><strong>40.78<\/strong><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><strong>\u52a0\u4e86 DMA \u4e4b\u540e\u6548\u679c\u975e\u5e38\u660e\u663e\uff0cESP_NEW_JPEG \u76f4\u63a5\u8dd1\u5230\u4e86 40.78 FPS \ud83d\udd25<\/strong><\/p>\n<p><strong>ESP_NEW_JPEG \u89e3\u7801\u65f6\u95f4\u53ea\u6709 6.70ms<\/strong>\uff0c\u6bd4 Tjpg_Decoder \u5feb\u4e86\u5c06\u8fd1 5 \u500d\u3002\u4e0a\u5c4f\u65f6\u95f4 17.83ms \u770b\u7740\u591a\uff0c\u4f46\u8fd9\u91cc\u5176\u5b9e\u5df2\u7ecf\u662f\u5728\u7b49 DMA \u7a7a\u95f2\u2014\u2014SPI \u4f20\u8f93\u80fd\u529b\u5230\u9876\u4e86\u3002<\/p>\n<p><strong>\u503c\u5f97\u5173\u6ce8\u7684\u662f JPEGDEC<\/strong>\uff1a\u89e3\u7801\u65f6\u95f4 18.55ms \u4e0e FULL IMAGE \u6a21\u5f0f\u51e0\u4e4e\u76f8\u540c\uff0c\u4f46\u4e0a\u5c4f\u65f6\u95f4\u4ece 28.53ms \u964d\u5230\u4e86 <strong>14.73ms<\/strong>\uff0cDMA \u4f20\u8f93\u548c\u89e3\u7801\u7684\u5e76\u884c\u6548\u679c\u7acb\u7aff\u89c1\u5f71\u3002<\/p>\n<p><strong>Tjpg_Decoder \u5219\u56e0\u4e3a\u6bcf\u6b21\u53ea\u53d1 16\u00d716 \u7684\u5c0f\u5757<\/strong>\uff0cDMA \u542f\u52a8\u6b21\u6570\u592a\u591a\uff08\u6bcf\u5e27 225 \u6b21\uff09\uff0c\u5f00\u9500\u53cd\u800c\u6bd4 FULL IMAGE \u8fd8\u7565\u9ad8\uff0c\u6536\u76ca\u6709\u9650\u3002<\/p>\n<h4><span class=\"ez-toc-section\" id=\"Block_DMA_%E4%B8%8D%E5%90%88%E5%B9%B6_Strip_%E5%B0%8F%E7%BB%93\"><\/span><strong>Block + DMA \u4e0d\u5408\u5e76 Strip \u5c0f\u7ed3<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h4>\n<p>\u8fd9\u8bf4\u660e DMA \u7684\u4ef7\u503c\u4e0d\u53ea\u662f\u201c\u66f4\u5feb\u4f20\u8f93\u201d\uff0c\u800c\u662f\u8ba9\u201c\u89e3\u7801\u201d\u548c\u201c\u4f20\u8f93\u201d\u4e24\u6bb5\u6d41\u6c34\u7ebf\u91cd\u53e0\u8d77\u6765\uff0cCPU \u53ef\u4ee5\u66f4\u65e9\u5730\u8fdb\u5165\u4e0b\u4e00\u5e27\u7684\u56fe\u50cf\u89e3\u7801\u5de5\u4f5c\u3002<\/p>\n<p><img src=\"https:\/\/xujiwei.com\/blog\/wp-content\/uploads\/2026\/03\/esp32-jpeg-decode-optimize-5.jpg\" alt=\"esp32-jpeg-decode-optimize-5\" \/><\/p>\n<p>\u53ea\u8981 DMA \u4f20\u8f93\u65f6\u95f4\u4e0d\u8d85\u8fc7\u89e3\u7801\u65f6\u95f4\uff0cFPS \u5c31\u53ea\u4f1a\u53d7\u9650\u4e8e\u89e3\u7801\u901f\u5ea6\u4e86\u3002<\/p>\n<hr \/>\n<h3><span class=\"ez-toc-section\" id=\"%E4%B8%89%E3%80%81Block_DMA_%E5%90%88%E5%B9%B6_Strip\"><\/span>\u4e09\u3001Block + DMA \u5408\u5e76 Strip<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<table>\n<thead>\n<tr>\n<th>Decoder<\/th>\n<th>MCU<\/th>\n<th>DMA Send<\/th>\n<th>Decode Avg(ms)<\/th>\n<th>Draw Avg(ms)<\/th>\n<th>FPS Avg<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Tjpg_Decoder<\/td>\n<td>16\u00d716<\/td>\n<td>240\u00d716<\/td>\n<td>30.33<\/td>\n<td><strong>2.31<\/strong><\/td>\n<td>30.65<\/td>\n<\/tr>\n<tr>\n<td>JPEGDEC<\/td>\n<td>64\u00d716<\/td>\n<td>240\u00d716<\/td>\n<td>18.27<\/td>\n<td>7.44<\/td>\n<td>38.90<\/td>\n<\/tr>\n<tr>\n<td><strong>ESP_NEW_JPEG<\/strong><\/td>\n<td>240\u00d716<\/td>\n<td>240\u00d716<\/td>\n<td><strong>6.72<\/strong><\/td>\n<td>17.83<\/td>\n<td><strong>40.72<\/strong><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u2460 \u5408\u5e76 Strip \u5bf9 Tjpg_Decoder \u7684\u4e0a\u5c4f\u65f6\u95f4\u5f71\u54cd\u5de8\u5927\uff1a\u4ece 27.93ms \u76f4\u63a5\u964d\u5230 <strong>2.31ms<\/strong>\uff01DMA \u5355\u6b21\u4f20\u8f93\u6574\u884c\uff08240\u00d716\uff09\uff0c\u51cf\u5c11\u4e86\u5927\u91cf\u4f20\u8f93\u542f\u52a8\u5f00\u9500\u3002<\/p>\n<p>Tjpg_Decoder \u5408\u5e76 Strip \u540e\uff0c\u4e0a\u5c4f\u65f6\u95f4\u51e0\u4e4e\u53ef\u4ee5\u5ffd\u7565\u4e0d\u8ba1\uff0c\u89e3\u7801\u65f6\u95f4\uff0830.33ms\uff09\u624d\u662f\u74f6\u9888\u2014\u2014<strong>\u6574\u4f53 FPS \u4ece 16.63 \u8df3\u5230 30.65<\/strong>\uff0c\u63d0\u5347\u5c06\u8fd1\u4e00\u500d\uff0c\u8bf4\u660e\u4e4b\u524d DMA \u9891\u7e41\u542f\u52a8\u7684\u5f00\u9500\u6709\u591a\u5927\u3002<\/p>\n<p><strong>\u6ce8\u610f\uff1a\u8fd9\u91cc Tjpg_Decoder \u7684 2.31ms \u5bb9\u6613\u4ea7\u751f\u8bef\u89e3\uff0c\u5b9e\u9645\u4f20\u8f93\u65f6\u95f4\u5e76\u6ca1\u6709\u6d88\u5931\uff0c\u800c\u662f\u88ab\u6d41\u6c34\u7ebf\u91cd\u53e0\u540e\u201c\u5438\u6536\u201d\u8fdb\u4e86\u89e3\u7801\u9636\u6bb5\u3002<\/strong><\/p>\n<p>\u2461 <strong>JPEGDEC \u4ece 14.73ms \u964d\u5230 7.44ms\uff0cFPS \u6da8\u5230 38.90<\/strong>\uff0c\u5df2\u7ecf\u975e\u5e38\u63a5\u8fd1 40 FPS \u4e86\u3002<\/p>\n<p>\u2462 ESP_NEW_JPEG \u672c\u6765\u5c31\u662f\u6574\u884c\u8f93\u51fa\uff0c\u5408\u4e0d\u5408\u5e76\u5bf9\u5b83\u6ca1\u5f71\u54cd\uff0c\u4f9d\u7136\u7a33\u5728 <strong>40.72 FPS<\/strong>\u3002\u8fd9\u91cc\u7684 <strong>17.83ms \u4e0a\u5c4f\u65f6\u95f4\u672c\u8d28\u4e0a\u4e0d\u662f\u8f6f\u4ef6\u989d\u5916\u5f00\u9500<\/strong>\uff0c\u800c\u662f\u9664\u53bb\u89e3\u7801\u65f6\u95f4\u5916 SPI \u94fe\u8def\u672c\u8eab\u7684\u4f20\u8f93\u8017\u65f6\u3002\u8fd9\u610f\u5473\u7740\u4f18\u5316\u7a7a\u95f4\u5df2\u7ecf\u4e0d\u5728\u89e3\u7801\u4fa7\uff0c\u800c\u5728\u603b\u7ebf\u5e26\u5bbd\u4fa7\u3002<\/p>\n<h4><span class=\"ez-toc-section\" id=\"Block_DMA_%E5%90%88%E5%B9%B6_Strip_%E5%B0%8F%E7%BB%93\"><\/span><strong>Block + DMA \u5408\u5e76 Strip \u5c0f\u7ed3<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h4>\n<p>\u8fd9\u8bf4\u660e\u5f53 Block \u592a\u788e\u65f6\uff0cDMA \u542f\u52a8\u6210\u672c\u4f1a\u53cd\u8fc7\u6765\u541e\u566c\u6536\u76ca\u3002<strong>\u5408\u5e76 Strip \u7684\u672c\u8d28\uff0c\u662f\u51cf\u5c11\u4e8b\u52a1\u6b21\u6570\uff0c\u800c\u4e0d\u662f\u51cf\u5c11\u6570\u636e\u91cf\u3002<\/strong><\/p>\n<hr \/>\n<h2><span class=\"ez-toc-section\" id=\"%E5%BD%93%E5%89%8D%E9%85%8D%E7%BD%AE%E4%B8%8B%E7%9A%84%E7%90%86%E8%AE%BA_FPS_%E4%B8%8A%E9%99%90\"><\/span>\u5f53\u524d\u914d\u7f6e\u4e0b\u7684\u7406\u8bba FPS \u4e0a\u9650<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>\u6839\u636e\u524d\u9762\u7ed9\u51fa\u7684\u6d4b\u8bd5\u6761\u4ef6\uff1a<\/p>\n<ul>\n<li>\u5206\u8fa8\u7387 240\u00d7240<\/li>\n<li>RGB565\uff0c2 \u5b57\u8282\u6bcf\u50cf\u7d20<\/li>\n<li>\u5355\u5e27 115,200 \u5b57\u8282<\/li>\n<li>SPI 40MHz<\/li>\n<\/ul>\n<p>\u53ef\u4ee5\u8ba1\u7b97\u51fa\u6765\u7406\u8bba FPS \u4e0a\u9650\uff1a<\/p>\n<pre><code>240 \u00d7 240 \u00d7 2 = 115,200 Byte\/frame\n115,200 \u00d7 8 = 921,600 bit\/frame\n40,000,000 \/ 921,600 \u2248 43.4 frame\/s<\/code><\/pre>\n<p>\u4e5f\u5c31\u662f\u8bf4\uff0c\u5728\u4e0d\u8003\u8651\u547d\u4ee4\u5f00\u9500\u3001\u7a97\u53e3\u8bbe\u7f6e\u3001DMA \u8c03\u5ea6\u635f\u8017\u7684\u7406\u60f3\u60c5\u51b5\u4e0b\uff0c\u4e0a\u9650\u5927\u7ea6\u5c31\u662f 43 FPS\u3002<\/p>\n<p>\u5b9e\u6d4b ESP_NEW_JPEG \u8dd1\u5230 40.7 FPS\uff0c\u5df2\u7ecf\u975e\u5e38\u63a5\u8fd1 SPI \u94fe\u8def\u6781\u9650\u3002<\/p>\n<hr \/>\n<h2><span class=\"ez-toc-section\" id=\"%E6%B5%8B%E8%AF%95%E7%BB%93%E8%AE%BA\"><\/span>\u6d4b\u8bd5\u7ed3\u8bba<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>\u7ecf\u8fc7\u8fd9\u8f6e\u6d4b\u8bd5\uff0c\u51e0\u4e2a\u7ed3\u8bba\u6bd4\u8f83\u6e05\u6670\uff1a<\/p>\n<ol>\n<li><strong>DMA \u5f71\u54cd\u5de8\u5927<\/strong> \u2014 \u6709\u6ca1\u6709 DMA\uff0cFPS \u5dee\u8ddd\u53ef\u4ee5\u8d85\u8fc7\u4e00\u500d\u3002\u4e0d\u7528 DMA \u7684 FULL IMAGE \u6a21\u5f0f\uff0c\u518d\u5feb\u7684\u89e3\u7801\u5e93\u4e5f\u88ab\u4e0a\u5c4f\u62d6\u7d2f\u3002<\/li>\n<li><strong>\u5408\u5e76 Strip \u5f88\u91cd\u8981<\/strong> \u2014 \u7279\u522b\u662f Tjpg_Decoder\uff0c\u5408\u5e76\u540e\u4e0a\u5c4f\u65f6\u95f4\u4ece 27.93ms \u66b4\u964d\u5230 2.31ms\u3002\u51cf\u5c11 DMA \u542f\u52a8\u6b21\u6570\uff0c\u5f00\u9500\u5dee\u5f02\u6781\u5927\u3002<\/li>\n<li><strong>SPI \u662f\u6700\u7ec8\u74f6\u9888<\/strong> \u2014 ESP_NEW_JPEG \u7684\u4e0a\u5c4f\u65f6\u95f4 17.83ms \u4e0d\u662f\u5728\u7b49\u89e3\u7801\uff0c\u662f\u5728\u7b49 DMA \u4f20\u8f93\u5b8c\u6210\u3002240\u00d7240 RGB565 \u753b\u9762\uff0c\u6bcf\u5e27 115,200 \u5b57\u8282\uff0c40MHz SPI \u7406\u8bba\u6781\u9650\u5c31\u662f\u8fd9\u4e2a\u5e27\u7387\u4e86\u3002\u518d\u600e\u4e48\u4f18\u5316\u89e3\u7801\uff0cSPI \u8fd9\u5173\u8fc7\u4e0d\u53bb\u3002<\/li>\n<li><strong>ESP_NEW_JPEG \u7efc\u5408\u6700\u5f3a<\/strong> \u2014 \u89e3\u7801\u65f6\u95f4\u6700\u77ed\uff08<strong>6.70ms<\/strong>\uff09\uff0c\u81ea\u52a8\u6574\u884c\u8f93\u51fa\uff0c\u5728\u6709\u5176\u4ed6\u4efb\u52a1\u5360 CPU \u7684\u60c5\u51b5\u4e0b\u4f18\u52bf\u66f4\u660e\u663e\u3002<\/li>\n<li><strong>JPEGDEC \u6709\u6f5c\u529b\u4f46\u9700\u8981\u6539\u5e93<\/strong> \u2014 \u60f3\u8ba9\u5b83\u8f93\u51fa\u66f4\u5927\u7684 Strip\uff0c\u9700\u8981\u624b\u52a8\u4fee\u6539 <code>MAX_BUFFERED_PIXELS<\/code> \u4e0a\u9650\uff0c\u9ed8\u8ba4 2048 \u4e0d\u4e00\u5b9a\u7b26\u5408\u5b9e\u9645\u5de5\u4f5c\u573a\u666f\u3002<\/li>\n<\/ol>\n<hr \/>\n<h2><span class=\"ez-toc-section\" id=\"%E4%BD%BF%E7%94%A8%E5%BB%BA%E8%AE%AE\"><\/span>\u4f7f\u7528\u5efa\u8bae<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<ul>\n<li>DMA + Merge Strip \u6709\u4e00\u5b9a\u7f16\u7801\u6210\u672c\uff0c\u4e14\u7ade\u6001\u63a7\u5236\u6bd4\u8f83\u590d\u6742\uff0c\u9700\u8981\u6743\u8861\u5229\u5f0a\u540e\u518d\u4f7f\u7528<\/li>\n<li>\u53ea\u505a\u9759\u6001\u56fe\u7247\u663e\u793a\uff0c\u4f18\u5148\u9009\u89e3\u7801\u66f4\u5feb\u3001\u63a5\u5165\u66f4\u7b80\u5355\u7684\u65b9\u6848<\/li>\n<li>Block \u5f88\u788e\u65f6\uff0c\u4e00\u5b9a\u8981\u60f3\u529e\u6cd5<strong>\u5408\u5e76 Strip<\/strong>\uff0c\u5426\u5219 DMA \u542f\u52a8\u6210\u672c\u4f1a\u5403\u6389\u6536\u76ca<\/li>\n<li>\u5982\u679c\u5df2\u7ecf\u63a5\u8fd1 SPI \u7406\u8bba\u4e0a\u9650\uff0c\u8fd8\u6709\u66f4\u9ad8 FPS \u9700\u6c42\uff0c\u53ef\u4ee5\u66f4\u591a\u4ece SPI \u5e26\u5bbd\/\u6362\u63a5\u53e3\u65b9\u5411\u8003\u8651<\/li>\n<\/ul>\n<hr \/>\n<h2><span class=\"ez-toc-section\" id=\"%E5%90%8E%E7%BB%AD%E6%89%93%E7%AE%97\"><\/span>\u540e\u7eed\u6253\u7b97<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>\u76ee\u524d\u5728\u8fd9\u5957 SPI 40MHz \u914d\u7f6e\u4e0b\uff0c\u7ee7\u7eed\u63d0\u5347 FPS \u7684\u6536\u76ca\u5df2\u7ecf\u5f88\u6709\u9650\u4e86\u3002\u4e0d\u8fc7\u8fd8\u6709\u51e0\u4e2a\u65b9\u5411\u53ef\u4ee5\u7814\u7a76\uff1a<\/p>\n<ul>\n<li><strong>\u53cc\u6838\u5e76\u884c<\/strong>\uff1a\u5982\u679c\u8981\u505a\u5f69\u8272\u4e32\u6d41\u5c0f\u7535\u89c6\uff0c\u5c31\u8fd8\u6709\u7f51\u7edc\u4efb\u52a1\uff0c\u770b\u770b\u662f\u5426\u8fd8\u80fd\u8fbe\u5230 40 FPS\u3002<\/li>\n<li><strong>\u66f4\u9ad8 SPI \u65f6\u949f<\/strong>\uff1a\u4f7f\u7528 ESP32-S3 \u539f\u751f SPI \u5f15\u811a\uff0c\u603b\u7ebf\u901f\u5ea6\u7406\u8bba\u4e0a\u53ef\u4ee5\u5230 80MHz\uff0cFPS \u4e0a\u9650\u53ef\u4ee5\u518d\u63d0\u9ad8\u4e00\u4e9b\u3002<\/li>\n<li><strong>\u89c6\u9891\u89e3\u7801\u6d4b\u8bd5<\/strong>\uff1a\u62ff\u771f\u5b9e\u89c6\u9891\u6587\u4ef6\u76f4\u63a5\u6d4b\u8bd5\uff0c\u64ad\u653e\u65f6 FPS \u53ef\u4ee5\u5230\u591a\u5c11\u3002<\/li>\n<\/ul>\n<p>\u5148\u8fd9\u6837\uff0c\u4e0b\u6b21\u518d\u6298\u817e \ud83d\ude02<\/p>\n<h2><span class=\"ez-toc-section\" id=\"%E5%8F%82%E8%80%83%E8%B5%84%E6%96%99\"><\/span>\u53c2\u8003\u8d44\u6599<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<ul>\n<li><a href=\"https:\/\/mp.weixin.qq.com\/s\/cSaqb_5Q6BvhtLr2ifkcbw\">ESP32-S3 + Arduino \u5404\u79cd JPEG \u89e3\u7801\u5e93\u901f\u5ea6\u5bf9\u6bd4\uff0c\u5230\u5e95\u54ea\u4e2a\u624d\u662f\u6700\u5feb\u7684\uff1f<\/a><\/li>\n<li><a href=\"https:\/\/mp.weixin.qq.com\/s\/-qAOWthe8w_qdWJ88EZOeg\">\u52d8\u8bef\uff1aESP_NEW_JPEG \u66f4\u65b0\u5230\u6700\u65b0\u7248\u540e\uff0c\u6240\u6709\u5206\u8fa8\u7387\u90fd\u662f\u6700\u5feb\u7684<\/a><\/li>\n<li><a href=\"https:\/\/docs.espressif.com\/projects\/esp-idf\/zh_CN\/latest\/esp32\/api-reference\/peripherals\/spi_master.html#gpio-io-mux\">https:\/\/docs.espressif.com\/projects\/esp-idf\/zh_CN\/latest\/esp32\/api-reference\/peripherals\/spi_master.html#gpio-io-mux<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>\u524d\u8a00 \u4e4b\u524d\u505a\u4e86 ESP32-S3 \u4e0a\u5e38\u89c1 JPEG \u89e3\u7801\u5e93\uff08Tjpg_Decod &hellip;<\/p>\n<p class=\"read-more\"><a href=\"https:\/\/xujiwei.com\/blog\/2026\/03\/esp32-jpeg-decode-optimize\/\">\u7ee7\u7eed\u9605\u8bfb &raquo;<\/a><\/p>\n","protected":false},"author":2,"featured_media":2103,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[402],"tags":[262,505,328,500],"_links":{"self":[{"href":"https:\/\/xujiwei.com\/blog\/wp-json\/wp\/v2\/posts\/2108"}],"collection":[{"href":"https:\/\/xujiwei.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/xujiwei.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/xujiwei.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/xujiwei.com\/blog\/wp-json\/wp\/v2\/comments?post=2108"}],"version-history":[{"count":0,"href":"https:\/\/xujiwei.com\/blog\/wp-json\/wp\/v2\/posts\/2108\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/xujiwei.com\/blog\/wp-json\/wp\/v2\/media\/2103"}],"wp:attachment":[{"href":"https:\/\/xujiwei.com\/blog\/wp-json\/wp\/v2\/media?parent=2108"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/xujiwei.com\/blog\/wp-json\/wp\/v2\/categories?post=2108"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/xujiwei.com\/blog\/wp-json\/wp\/v2\/tags?post=2108"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}