Commit 41febd92 authored by johannkoenig's avatar johannkoenig Committed by Commit bot

Use VPX_IMG_FMT_*/VPX_PLANE_* defines

The compatibility layer has been removed upstream:
https://gerrit.chromium.org/gerrit/gitweb?p=webm%2Flibvpx.git;a=commit;h=9cdaa3d72eade9ad162ef8f78a93bd8f85c6de10

BUG=webrtc:3839

Review URL: https://codereview.chromium.org/590363002

Cr-Commit-Position: refs/heads/master@{#296098}
parent d377fd41
......@@ -57,7 +57,7 @@ void Vp8Encoder::Initialize() {
// pointer will be set during encode. Setting align to 1, as it is
// meaningless (actual memory is not allocated).
raw_image_ = vpx_img_wrap(
NULL, IMG_FMT_I420, cast_config_.width, cast_config_.height, 1, NULL);
NULL, VPX_IMG_FMT_I420, cast_config_.width, cast_config_.height, 1, NULL);
for (int i = 0; i < kNumberOfVp8VideoBuffers; ++i) {
buffer_state_[i].frame_id = kStartFrameId;
......@@ -123,11 +123,11 @@ bool Vp8Encoder::Encode(const scoped_refptr<media::VideoFrame>& video_frame,
DCHECK(thread_checker_.CalledOnValidThread());
// Image in vpx_image_t format.
// Input image is const. VP8's raw image is not defined as const.
raw_image_->planes[PLANE_Y] =
raw_image_->planes[VPX_PLANE_Y] =
const_cast<uint8*>(video_frame->data(VideoFrame::kYPlane));
raw_image_->planes[PLANE_U] =
raw_image_->planes[VPX_PLANE_U] =
const_cast<uint8*>(video_frame->data(VideoFrame::kUPlane));
raw_image_->planes[PLANE_V] =
raw_image_->planes[VPX_PLANE_V] =
const_cast<uint8*>(video_frame->data(VideoFrame::kVPlane));
raw_image_->stride[VPX_PLANE_Y] = video_frame->stride(VideoFrame::kYPlane);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment