int width = s->fragment_width[!!plane];
int height = s->fragment_height[!!plane];
int fragment = s->fragment_start [plane] + ystart * width;
- int stride = s->current_frame.f->linesize[plane];
+ ptrdiff_t stride = s->current_frame.f->linesize[plane];
uint8_t *plane_data = s->current_frame.f->data [plane];
if (!s->flipped_image) stride = -stride;
plane_data += s->data_offset[plane] + 8*ystart*stride;
uint8_t *output_plane = s->current_frame.f->data [plane] + s->data_offset[plane];
uint8_t * last_plane = s-> last_frame.f->data [plane] + s->data_offset[plane];
uint8_t *golden_plane = s-> golden_frame.f->data [plane] + s->data_offset[plane];
- int stride = s->current_frame.f->linesize[plane];
+ ptrdiff_t stride = s->current_frame.f->linesize[plane];
int plane_width = s->width >> (plane && s->chroma_x_shift);
int plane_height = s->height >> (plane && s->chroma_y_shift);
int8_t (*motion_val)[2] = s->motion_val[!!plane];
uint8_t *temp= s->edge_emu_buffer;
if(stride<0) temp -= 8*stride;
- s->vdsp.emulated_edge_mc(temp, motion_source, stride, 9, 9, src_x, src_y, plane_width, plane_height);
+ s->vdsp.emulated_edge_mc(temp, motion_source,
+ stride, stride,
+ 9, 9, src_x, src_y,
+ plane_width,
+ plane_height);
motion_source= temp;
}
}
Vp3DecodeContext *s = avctx->priv_data;
int visible_width, visible_height, colorspace;
int offset_x = 0, offset_y = 0;
+ int ret;
AVRational fps, aspect;
s->theora = get_bits_long(gb, 24);
visible_width = s->width = get_bits(gb, 16) << 4;
visible_height = s->height = get_bits(gb, 16) << 4;
- if(av_image_check_size(s->width, s->height, 0, avctx)){
- av_log(avctx, AV_LOG_ERROR, "Invalid dimensions (%dx%d)\n", s->width, s->height);
- s->width= s->height= 0;
- return -1;
- }
-
if (s->theora >= 0x030200) {
visible_width = get_bits_long(gb, 24);
visible_height = get_bits_long(gb, 24);
if ( visible_width <= s->width && visible_width > s->width-16
&& visible_height <= s->height && visible_height > s->height-16
&& !offset_x && (offset_y == s->height - visible_height))
- avcodec_set_dimensions(avctx, visible_width, visible_height);
+ ret = ff_set_dimensions(avctx, visible_width, visible_height);
else
- avcodec_set_dimensions(avctx, s->width, s->height);
+ ret = ff_set_dimensions(avctx, s->width, s->height);
+ if (ret < 0)
+ return ret;
if (colorspace == 1) {
avctx->color_primaries = AVCOL_PRI_BT470M;
AVCodec ff_theora_decoder = {
.name = "theora",
+ .long_name = NULL_IF_CONFIG_SMALL("Theora"),
.type = AVMEDIA_TYPE_VIDEO,
.id = AV_CODEC_ID_THEORA,
.priv_data_size = sizeof(Vp3DecodeContext),
.capabilities = CODEC_CAP_DR1 | CODEC_CAP_DRAW_HORIZ_BAND |
CODEC_CAP_FRAME_THREADS,
.flush = vp3_decode_flush,
- .long_name = NULL_IF_CONFIG_SMALL("Theora"),
.init_thread_copy = ONLY_IF_THREADS_ENABLED(vp3_init_thread_copy),
.update_thread_context = ONLY_IF_THREADS_ENABLED(vp3_update_thread_context)
};
AVCodec ff_vp3_decoder = {
.name = "vp3",
+ .long_name = NULL_IF_CONFIG_SMALL("On2 VP3"),
.type = AVMEDIA_TYPE_VIDEO,
.id = AV_CODEC_ID_VP3,
.priv_data_size = sizeof(Vp3DecodeContext),
.capabilities = CODEC_CAP_DR1 | CODEC_CAP_DRAW_HORIZ_BAND |
CODEC_CAP_FRAME_THREADS,
.flush = vp3_decode_flush,
- .long_name = NULL_IF_CONFIG_SMALL("On2 VP3"),
.init_thread_copy = ONLY_IF_THREADS_ENABLED(vp3_init_thread_copy),
.update_thread_context = ONLY_IF_THREADS_ENABLED(vp3_update_thread_context),
};