{"id":10530,"date":"2023-10-12T15:55:27","date_gmt":"2023-10-12T07:55:27","guid":{"rendered":"http:\/\/xinyiworld.top\/wordpress_it\/?p=10530"},"modified":"2023-10-12T17:39:44","modified_gmt":"2023-10-12T09:39:44","slug":"%e5%85%b3%e4%ba%8e%e6%8b%bc%e5%a4%9a%e5%a4%9a%e5%95%86%e5%ae%b6%e7%89%88%e7%9b%b4%e6%92%ad%e5%ae%a2%e6%88%b7%e7%ab%af%e6%92%ad%e6%94%be%e7%bb%bf%e5%b1%8f%e7%9a%84%e9%97%ae%e9%a2%98%e6%8e%92%e6%9f%a5","status":"publish","type":"post","link":"http:\/\/xinyiworld.top\/wordpress_it\/?p=10530","title":{"rendered":"\u5173\u4e8e\u62fc\u591a\u591a\u5546\u5bb6\u7248\u76f4\u64ad\u5ba2\u6237\u7aef\u64ad\u653e\u7eff\u5c4f\u7684\u95ee\u9898\u6392\u67e5"},"content":{"rendered":"<p>\u901a\u8fc7\u65e5\u5fd7\u53ef\u4ee5\u53d1\u73b0\uff0c\u4e00\u65e6\u62fc\u591a\u591a\u5f00\u542f\u76f4\u64ad\u5c31\u4f1a\u62a5<code>RgaBlit fail<\/code>\u4ee5\u53ca\u989c\u8272\u683c\u5f0f\u9519\u8bef\uff1a<\/p>\n<h3>\u95ee\u9898\u8ffd\u8e2a<\/h3>\n<blockquote>\n<p>\u8ffd\u8e2aRgaBlit\u65b9\u6cd5\u8c03\u7528<\/p>\n<\/blockquote>\n<p>\uff08hardware\/rockchip\/omx_il\/osal\/Rockchip_OSAL_RGA_Process.c-&gt;rga_rgb2nv12-&gt;RgaBlit\uff09,<code>RgaBlit<\/code>\u65b9\u6cd5\u5b9e\u73b0\u4e8ehardware\/rockchip\/librga\/normal\/NormalRga.cpp\u7c7b\u4e2d,\u7136\u540e\u53c8\u8c03\u7528\u4e86NormalRgaApi.cpp\u7c7b\u7684checkRectForRga\u65b9\u6cd5\uff0c\u5f53width\u65e0\u6cd5\u88ab8\u6574\u9664\u5c31\u4f1a\u62a5\u9519\uff0c\u800c\u8fd9\u4e2awidth\u4e3a540\uff0c\u6070\u597d\u65e0\u6cd5\u88ab8\u6574\u9664\u3002<\/p>\n<blockquote>\n<p>\u8ffd\u8e2arga_rgb2nv12\u65b9\u6cd5\u8c03\u7528<\/p>\n<\/blockquote>\n<p><code>hardware\/rockchip\/omx_il\/component\/video\/enc\/Rkvpu_OMX_Venc.c<\/code>-&gt;Rkvpu_ProcessStoreMetaData\uff0c\u6b64\u65b9\u6cd5\u4f1a\u88ab\u6b64\u7c7b\u4e2d\u7684UpdateFrameSize\u65b9\u6cd5\u8c03\u7528\uff0cUpdateFrameSize\u65b9\u6cd5\u53c8\u4f1a\u88ab<code>hardware\/rockchip\/omx_il\/component\/video\/enc\/Rkvpu_OMX_VencControl.c<\/code>\u4e2d\u7684Rkvpu_OMX_SetParameter\u65b9\u6cd5\u8c03\u7528\uff0c\u6b64\u65b9\u6cd5\u53c8\u4f1a\u88ab<code>hardware\/rockchip\/omx_il\/component\/video\/enc\/Rkvpu_OMX_Venc.c<\/code>\u901a\u8fc7<code>pOMXComponent-&gt;SetParameter           = &amp;Rkvpu_OMX_SetParameter;<\/code>\u8d4b\u503c\u7ed9omx\u7ec4\u4ef6<\/p>\n<blockquote>\n<p>\u7ee7\u7eed\u5f80\u4e0a\u8ffd\u8e2a<\/p>\n<\/blockquote>\n<p>\u5176\u5b9e\u8ffd\u8e2a\u5230\u4e0a\u9762\uff0c\u51e0\u4e4e\u5df2\u7ecf\u8ff7\u832b\u4e86\u3002\u610f\u5916\u7684\u767e\u5ea6\u65f6\u770b\u5230MediaCodec\u7684\u4f7f\u7528\uff0c\u4f1a\u8bbe\u7f6ewidth\uff0cdebug\u4e86\u4e00\u4e0b\uff0c\u53d1\u73b0\u786e\u5b9e\u62fc\u591a\u591a\u76f4\u64ad\u65f6\u4f1a\u901a\u8fc7MediaCodec\u8fdb\u884c\u7f16\u7801\u3002\u7136\u540e\u624d\u53d1\u73b0\u8fd9\u4e2a540\u7adf\u7136\u662f\u62fc\u591a\u591a\u5e94\u7528\u8bbe\u7f6e\u7684\u3002<\/p>\n<p><a href=\"https:\/\/mp.weixin.qq.com\/s\/gBI6Tz5VmXJF9AZ9HPVUiQ\">https:\/\/mp.weixin.qq.com\/s\/gBI6Tz5VmXJF9AZ9HPVUiQ<\/a> \uff08MediaCodec\u4e0eopenmax\u7684\u8c03\u7528\u5173\u7cfb\u5206\u6790\uff09<\/p>\n<h3>\u89e3\u51b3\u65b9\u6848<\/h3>\n<p>\u4fee\u6539MediaFormat.java\u7c7b\uff0c\u5f3a\u5236\u4fee\u6539\u7528\u6237\u7684\u53c2\u6570\u8bbe\u5b9a\u3002<\/p>\n<pre><code class=\"language-java\">public final void setInteger(String name, int value) {\n        Log.i(&quot;MediaFormat set,name=&quot; + name + &quot;,value=&quot; + value);\n        if(name == KEY_WIDTH){\n            if(value == 540){\n                value = 544;\n            }\n        }\n\n        if(name == KEY_COLOR_FORMAT){\n            if(value == 2130708361){\n                value = MediaCodecInfo.CodecCapabilities.COLOR_FormatSurface;\n            }\n        }\n        mMap.put(name, Integer.valueOf(value));\n    }<\/code><\/pre>\n<button class=\"simplefavorite-button\" data-postid=\"10530\" data-siteid=\"1\" data-groupid=\"1\" data-favoritecount=\"0\" style=\"\">\u6536\u85cf <i class=\"sf-icon-star-empty\"><\/i><\/button>","protected":false},"excerpt":{"rendered":"<p>\u901a\u8fc7\u65e5\u5fd7\u53ef\u4ee5\u53d1\u73b0\uff0c\u4e00\u65e6\u62fc\u591a\u591a\u5f00\u542f\u76f4\u64ad\u5c31\u4f1a\u62a5RgaBlit fail\u4ee5\u53ca\u989c\u8272\u683c\u5f0f\u9519\u8bef\uff1a \u95ee\u9898\u8ffd\u8e2a \u8ffd\u8e2a [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[836],"tags":[],"_links":{"self":[{"href":"http:\/\/xinyiworld.top\/wordpress_it\/index.php?rest_route=\/wp\/v2\/posts\/10530"}],"collection":[{"href":"http:\/\/xinyiworld.top\/wordpress_it\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/xinyiworld.top\/wordpress_it\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/xinyiworld.top\/wordpress_it\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/xinyiworld.top\/wordpress_it\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=10530"}],"version-history":[{"count":6,"href":"http:\/\/xinyiworld.top\/wordpress_it\/index.php?rest_route=\/wp\/v2\/posts\/10530\/revisions"}],"predecessor-version":[{"id":10536,"href":"http:\/\/xinyiworld.top\/wordpress_it\/index.php?rest_route=\/wp\/v2\/posts\/10530\/revisions\/10536"}],"wp:attachment":[{"href":"http:\/\/xinyiworld.top\/wordpress_it\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=10530"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/xinyiworld.top\/wordpress_it\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=10530"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/xinyiworld.top\/wordpress_it\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=10530"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}