Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions vp8/vp8_dx_iface.c
Original file line number Diff line number Diff line change
Expand Up @@ -606,6 +606,11 @@ static vpx_codec_err_t vp8_set_reference(vpx_codec_alg_priv_t *ctx,
if (data) {
vpx_ref_frame_t *frame = (vpx_ref_frame_t *)data;
YV12_BUFFER_CONFIG sd;
if (frame->img.planes[VPX_PLANE_Y] == NULL ||
frame->img.planes[VPX_PLANE_U] == NULL ||
frame->img.planes[VPX_PLANE_V] == NULL) {
return VPX_CODEC_INVALID_PARAM;
}

image2yuvconfig(&frame->img, &sd);

Expand All @@ -625,6 +630,11 @@ static vpx_codec_err_t vp8_get_reference(vpx_codec_alg_priv_t *ctx,
if (data) {
vpx_ref_frame_t *frame = (vpx_ref_frame_t *)data;
YV12_BUFFER_CONFIG sd;
if (frame->img.planes[VPX_PLANE_Y] == NULL ||
frame->img.planes[VPX_PLANE_U] == NULL ||
frame->img.planes[VPX_PLANE_V] == NULL) {
return VPX_CODEC_INVALID_PARAM;
}

image2yuvconfig(&frame->img, &sd);

Expand Down
10 changes: 10 additions & 0 deletions vp9/vp9_cx_iface.c
Original file line number Diff line number Diff line change
Expand Up @@ -1736,6 +1736,11 @@ static vpx_codec_err_t ctrl_set_reference(vpx_codec_alg_priv_t *ctx,

if (frame != NULL) {
YV12_BUFFER_CONFIG sd;
if (frame->img.planes[VPX_PLANE_Y] == NULL ||
frame->img.planes[VPX_PLANE_U] == NULL ||
frame->img.planes[VPX_PLANE_V] == NULL) {
return VPX_CODEC_INVALID_PARAM;
}

image2yuvconfig(&frame->img, &sd);
vp9_set_reference_enc(ctx->cpi, ref_frame_to_vp9_reframe(frame->frame_type),
Expand All @@ -1751,6 +1756,11 @@ static vpx_codec_err_t ctrl_copy_reference(vpx_codec_alg_priv_t *ctx,

if (frame != NULL) {
YV12_BUFFER_CONFIG sd;
if (frame->img.planes[VPX_PLANE_Y] == NULL ||
frame->img.planes[VPX_PLANE_U] == NULL ||
frame->img.planes[VPX_PLANE_V] == NULL) {
return VPX_CODEC_INVALID_PARAM;
}

image2yuvconfig(&frame->img, &sd);
vp9_copy_reference_enc(ctx->cpi,
Expand Down
10 changes: 10 additions & 0 deletions vp9/vp9_dx_iface.c
Original file line number Diff line number Diff line change
Expand Up @@ -454,6 +454,11 @@ static vpx_codec_err_t ctrl_set_reference(vpx_codec_alg_priv_t *ctx,
if (data) {
vpx_ref_frame_t *const frame = (vpx_ref_frame_t *)data;
YV12_BUFFER_CONFIG sd;
if (frame->img.planes[VPX_PLANE_Y] == NULL ||
frame->img.planes[VPX_PLANE_U] == NULL ||
frame->img.planes[VPX_PLANE_V] == NULL) {
return VPX_CODEC_INVALID_PARAM;
}
image2yuvconfig(&frame->img, &sd);
if (!ctx->pbi) return VPX_CODEC_ERROR;
return vp9_set_reference_dec(
Expand All @@ -470,6 +475,11 @@ static vpx_codec_err_t ctrl_copy_reference(vpx_codec_alg_priv_t *ctx,
if (data) {
vpx_ref_frame_t *frame = (vpx_ref_frame_t *)data;
YV12_BUFFER_CONFIG sd;
if (frame->img.planes[VPX_PLANE_Y] == NULL ||
frame->img.planes[VPX_PLANE_U] == NULL ||
frame->img.planes[VPX_PLANE_V] == NULL) {
return VPX_CODEC_INVALID_PARAM;
}
image2yuvconfig(&frame->img, &sd);
if (!ctx->pbi) return VPX_CODEC_ERROR;
return vp9_copy_reference_dec(ctx->pbi, (VP9_REFFRAME)frame->frame_type,
Expand Down
Loading