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

Unified Diff: webrtc/common_video/libyuv/webrtc_libyuv.cc

Issue 2021843002: Delete unused code in webrtc_libyuv.cc. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Copy Calc16ByteAlignedStride. Created 4 years, 7 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 | « webrtc/common_video/libyuv/libyuv_unittest.cc ('k') | webrtc/modules/video_capture/video_capture_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/common_video/libyuv/webrtc_libyuv.cc
diff --git a/webrtc/common_video/libyuv/webrtc_libyuv.cc b/webrtc/common_video/libyuv/webrtc_libyuv.cc
index 7f5e3300c13be481b6e8a9e7793c08264f974bcf..298c4960b1f90d972bdcfcd1dad34a28f2e32bff 100644
--- a/webrtc/common_video/libyuv/webrtc_libyuv.cc
+++ b/webrtc/common_video/libyuv/webrtc_libyuv.cc
@@ -18,8 +18,6 @@
namespace webrtc {
-const int k16ByteAlignment = 16;
-
VideoType RawVideoTypeToCommonVideoVideoType(RawVideoType type) {
switch (type) {
case kVideoI420:
@@ -56,16 +54,6 @@ VideoType RawVideoTypeToCommonVideoVideoType(RawVideoType type) {
return kUnknown;
}
-int AlignInt(int value, int alignment) {
- assert(!((alignment - 1) & alignment));
- return ((value + alignment - 1) & ~(alignment - 1));
-}
-
-void Calc16ByteAlignedStride(int width, int* stride_y, int* stride_uv) {
- *stride_y = AlignInt(width, k16ByteAlignment);
- *stride_uv = AlignInt((width + 1) / 2, k16ByteAlignment);
-}
-
size_t CalcBufferSize(VideoType type, int width, int height) {
assert(width >= 0);
assert(height >= 0);
@@ -297,24 +285,6 @@ int ConvertFromI420(const VideoFrame& src_frame,
ConvertVideoType(dst_video_type));
}
-// TODO(mikhal): Create a designated VideoFrame for non I420.
-int ConvertFromYV12(const VideoFrame& src_frame,
- VideoType dst_video_type,
- int dst_sample_size,
- uint8_t* dst_frame) {
- // YV12 = Y, V, U
- return libyuv::ConvertFromI420(
- src_frame.video_frame_buffer()->DataY(),
- src_frame.video_frame_buffer()->StrideY(),
- src_frame.video_frame_buffer()->DataV(),
- src_frame.video_frame_buffer()->StrideV(),
- src_frame.video_frame_buffer()->DataU(),
- src_frame.video_frame_buffer()->StrideU(),
- dst_frame, dst_sample_size,
- src_frame.width(), src_frame.height(),
- ConvertVideoType(dst_video_type));
-}
-
// Compute PSNR for an I420 frame (all planes)
double I420PSNR(const VideoFrame* ref_frame, const VideoFrame* test_frame) {
if (!ref_frame || !test_frame)
« no previous file with comments | « webrtc/common_video/libyuv/libyuv_unittest.cc ('k') | webrtc/modules/video_capture/video_capture_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698