mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-28 15:23:51 +00:00
Bug 1836826 - Apply local patches to libvpx r=webrtc-reviewers,dbaker
Apply local patches by running `./mach vendor media/libvpx/moz.yaml --patch-mode-only` Differential Revision: https://phabricator.services.mozilla.com/D180015
This commit is contained in:
parent
e90e3c9c27
commit
89a9394c74
@ -948,10 +948,19 @@ static vpx_codec_err_t vp8e_encode(vpx_codec_alg_priv_t *ctx,
|
|||||||
if (img != NULL) {
|
if (img != NULL) {
|
||||||
res = image2yuvconfig(img, &sd);
|
res = image2yuvconfig(img, &sd);
|
||||||
|
|
||||||
if (vp8_receive_raw_frame(ctx->cpi, ctx->next_frame_flag | lib_flags, &sd,
|
if (sd.y_width != ctx->cfg.g_w || sd.y_height != ctx->cfg.g_h) {
|
||||||
dst_time_stamp, dst_end_time_stamp)) {
|
/* from vpx_encoder.h for g_w/g_h:
|
||||||
VP8_COMP *cpi = (VP8_COMP *)ctx->cpi;
|
"Note that the frames passed as input to the encoder must have this
|
||||||
res = update_error_state(ctx, &cpi->common.error);
|
resolution"
|
||||||
|
*/
|
||||||
|
ctx->base.err_detail = "Invalid input frame resolution";
|
||||||
|
res = VPX_CODEC_INVALID_PARAM;
|
||||||
|
} else {
|
||||||
|
if (vp8_receive_raw_frame(ctx->cpi, ctx->next_frame_flag | lib_flags,
|
||||||
|
&sd, dst_time_stamp, dst_end_time_stamp)) {
|
||||||
|
VP8_COMP *cpi = (VP8_COMP *)ctx->cpi;
|
||||||
|
res = update_error_state(ctx, &cpi->common.error);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* reset for next frame */
|
/* reset for next frame */
|
||||||
|
@ -1381,13 +1381,22 @@ static vpx_codec_err_t encoder_encode(vpx_codec_alg_priv_t *ctx,
|
|||||||
timebase_units_to_ticks(timestamp_ratio, pts + duration);
|
timebase_units_to_ticks(timestamp_ratio, pts + duration);
|
||||||
res = image2yuvconfig(img, &sd);
|
res = image2yuvconfig(img, &sd);
|
||||||
|
|
||||||
// Store the original flags in to the frame buffer. Will extract the
|
if (sd.y_width != ctx->cfg.g_w || sd.y_height != ctx->cfg.g_h) {
|
||||||
// key frame flag when we actually encode this frame.
|
/* from vpx_encoder.h for g_w/g_h:
|
||||||
if (vp9_receive_raw_frame(cpi, flags | ctx->next_frame_flags, &sd,
|
"Note that the frames passed as input to the encoder must have this
|
||||||
|
resolution"
|
||||||
|
*/
|
||||||
|
ctx->base.err_detail = "Invalid input frame resolution";
|
||||||
|
res = VPX_CODEC_INVALID_PARAM;
|
||||||
|
} else {
|
||||||
|
// Store the original flags in to the frame buffer. Will extract the
|
||||||
|
// key frame flag when we actually encode this frame.
|
||||||
|
if (vp9_receive_raw_frame(cpi, flags | ctx->next_frame_flags, &sd,
|
||||||
dst_time_stamp, dst_end_time_stamp)) {
|
dst_time_stamp, dst_end_time_stamp)) {
|
||||||
res = update_error_state(ctx, &cpi->common.error);
|
res = update_error_state(ctx, &cpi->common.error);
|
||||||
|
}
|
||||||
|
ctx->next_frame_flags = 0;
|
||||||
}
|
}
|
||||||
ctx->next_frame_flags = 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
cx_data = ctx->cx_data;
|
cx_data = ctx->cx_data;
|
||||||
|
Loading…
Reference in New Issue
Block a user