I420VideoFrame.CreateFrame: Removed unnecessary buffer size arguments.
R=magjed@webrtc.org, tommi@webrtc.org Review URL: https://webrtc-codereview.appspot.com/45629004 Cr-Commit-Position: refs/heads/master@{#8732} git-svn-id: http://webrtc.googlecode.com/svn/trunk@8732 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
@ -185,9 +185,9 @@ bool VideoProcessorImpl::ProcessFrame(int frame_number) {
|
||||
int half_width = (config_.codec_settings->width + 1) / 2;
|
||||
int half_height = (config_.codec_settings->height + 1) / 2;
|
||||
int size_uv = half_width * half_height;
|
||||
source_frame_.CreateFrame(size_y, source_buffer_,
|
||||
size_uv, source_buffer_ + size_y,
|
||||
size_uv, source_buffer_ + size_y + size_uv,
|
||||
source_frame_.CreateFrame(source_buffer_,
|
||||
source_buffer_ + size_y,
|
||||
source_buffer_ + size_y + size_uv,
|
||||
config_.codec_settings->width,
|
||||
config_.codec_settings->height,
|
||||
config_.codec_settings->width,
|
||||
|
||||
@ -1333,13 +1333,10 @@ int VP8DecoderImpl::ReturnFrame(const vpx_image_t* img,
|
||||
last_frame_width_ = img->d_w;
|
||||
last_frame_height_ = img->d_h;
|
||||
// Allocate memory for decoded image.
|
||||
int size_y = img->stride[VPX_PLANE_Y] * img->d_h;
|
||||
int size_u = img->stride[VPX_PLANE_U] * (img->d_h + 1) / 2;
|
||||
int size_v = img->stride[VPX_PLANE_V] * (img->d_h + 1) / 2;
|
||||
// TODO(mikhal): This does a copy - need to SwapBuffers.
|
||||
decoded_image_.CreateFrame(size_y, img->planes[VPX_PLANE_Y],
|
||||
size_u, img->planes[VPX_PLANE_U],
|
||||
size_v, img->planes[VPX_PLANE_V],
|
||||
decoded_image_.CreateFrame(img->planes[VPX_PLANE_Y],
|
||||
img->planes[VPX_PLANE_U],
|
||||
img->planes[VPX_PLANE_V],
|
||||
img->d_w, img->d_h,
|
||||
img->stride[VPX_PLANE_Y],
|
||||
img->stride[VPX_PLANE_U],
|
||||
|
||||
@ -472,13 +472,9 @@ int VP9DecoderImpl::ReturnFrame(const vpx_image_t* img, uint32_t timestamp) {
|
||||
// Decoder OK and NULL image => No show frame.
|
||||
return WEBRTC_VIDEO_CODEC_NO_OUTPUT;
|
||||
}
|
||||
int half_height = (img->d_h + 1) / 2;
|
||||
int size_y = img->stride[VPX_PLANE_Y] * img->d_h;
|
||||
int size_u = img->stride[VPX_PLANE_U] * half_height;
|
||||
int size_v = img->stride[VPX_PLANE_V] * half_height;
|
||||
decoded_image_.CreateFrame(size_y, img->planes[VPX_PLANE_Y],
|
||||
size_u, img->planes[VPX_PLANE_U],
|
||||
size_v, img->planes[VPX_PLANE_V],
|
||||
decoded_image_.CreateFrame(img->planes[VPX_PLANE_Y],
|
||||
img->planes[VPX_PLANE_U],
|
||||
img->planes[VPX_PLANE_V],
|
||||
img->d_w, img->d_h,
|
||||
img->stride[VPX_PLANE_Y],
|
||||
img->stride[VPX_PLANE_U],
|
||||
|
||||
Reference in New Issue
Block a user