feat(libwebrtc): implement webrtc::I420Buffer::MutableDataY, MutableDataU and MutableDataV #15277
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/15277"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by alvaroelpob on 2026-11-02T22:37:33Z.
What
Implements
webrtc::I420Buffer::MutableDataY(),MutableDataU()andMutableDataV()in libwebrtc, which threw and were declared without parameters.The module's WebRTC revision lies between M127 and M134, as recorded in the debt file.
i420_buffer.his identical at both, and so are theData*andMutableData*bodies ini420_buffer.cc(M127, M134).src/I420Buffer.cppstarts with that file's WebRTC notice and the BSD licence.WebRtcI420Bufferis the layout:Y is the data, U starts
stride_y * heightbytes in, and V anotherstride_u * ((height + 1) / 2)after that. Upstream reaches the planes through the virtualData*getters, which onlyI420Bufferdefines, so this reads the fields directly; the debt entry says so. A null buffer throws. It removes 3 exports from the inventory.Tested
Ubuntu 26.04 (WSL2, kernel 6.18), GCC 15.2.0, Release, full build with
BUILD_TESTING=ON.guest_webrtc_i420_buffertest: the three plane pointers for 640×480, odd 641×361, 1×1, padded 1920×1080 strides and an empty buffer; a null buffer throws.ctest -j16on head 16b1f6b53d: 3596/3596 pass.check_conventions.py --base upstream/mainpasses.pr_overlap.py: no open pull request implements these functions. The shared lines are the pending-export count indocs/dev/debt/libwebrtc.mdand the source, test and declaration lists inCMakeLists.txtandApi.hpp.main4f41f4c375, head b3148d55a4, to resolve the conflicts on the sharedCMakeLists.txt,Export.cppand debt-file lines; both sides are kept and the debt count is recomputed fromExport.cpp. Full build andctest -j16: 3796/3800 pass;guest_sce_net,guest_poll,guest_select_waitandguest_memoryfailed under that load, pass when run alone, andmain4f41f4c375passes all 3799 with-j16on the same machine.check_conventions.py --base upstream/mainpasses.MutableDataY,MutableDataUandMutableDataVcall the object'sDataY,DataUandDataVthrough vtable slots 17 to 19, the declaration order ofref_count.handvideo_frame_buffer.h(the same at M127, M134 and 8d78f5de). The plain-buffer and stride cases now use a vtable withI420Buffer's getters, and a new case with overridden getters fails against the previous field reads (line 80) and passes here. Full build andctest -j16: 3800/3800 pass.check_conventions.py --base upstream/mainpasses.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)