// B-frame info
s->max_b_frames = s1->max_b_frames;
s->low_delay = s1->low_delay;
- s->dropable = s1->dropable;
+ s->droppable = s1->droppable;
// DivX handling (doesn't work)
s->divx_packed = s1->divx_packed;
if (s->width && s->height) {
/* set chroma shifts */
- avcodec_get_chroma_sub_sample(s->avctx->pix_fmt, &s->chroma_x_shift,
- &s->chroma_y_shift);
+ av_pix_fmt_get_chroma_sub_sample(s->avctx->pix_fmt,
+ &s->chroma_x_shift,
+ &s->chroma_y_shift);
/* convert fourcc to upper case */
s->codec_tag = avpriv_toupper4(s->avctx->codec_tag);
for (i = 0; i < 3; i++)
av_freep(&s->visualization_buffer[i]);
- if (!(s->avctx->active_thread_type & FF_THREAD_FRAME))
- avcodec_default_free_buffers(s->avctx);
-
return 0;
}
free_context_frame(s);
+ if (!(s->avctx->active_thread_type & FF_THREAD_FRAME))
+ avcodec_default_free_buffers(s->avctx);
+
s->context_initialized = 0;
s->last_picture_ptr =
s->next_picture_ptr =
{
if (pic->f.data[0] == NULL)
return 1;
- if (pic->needs_realloc)
+ if (pic->needs_realloc && !(pic->f.reference & DELAYED_PIC_REF))
if (!pic->owner2 || pic->owner2 == s)
return 1;
return 0;
}
pic->f.reference = 0;
- if (!s->dropable) {
+ if (!s->droppable) {
if (s->codec_id == AV_CODEC_ID_H264)
pic->f.reference = s->picture_structure;
else if (s->pict_type != AV_PICTURE_TYPE_B)
if (s->pict_type != AV_PICTURE_TYPE_B) {
s->last_picture_ptr = s->next_picture_ptr;
- if (!s->dropable)
+ if (!s->droppable)
s->next_picture_ptr = s->current_picture_ptr;
}
av_dlog(s->avctx, "L%p N%p C%p L%p N%p C%p type:%d drop:%d\n",
s->last_picture_ptr ? s->last_picture_ptr->f.data[0] : NULL,
s->next_picture_ptr ? s->next_picture_ptr->f.data[0] : NULL,
s->current_picture_ptr ? s->current_picture_ptr->f.data[0] : NULL,
- s->pict_type, s->dropable);
+ s->pict_type, s->droppable);
if (s->codec_id != AV_CODEC_ID_H264) {
if ((s->last_picture_ptr == NULL ||
if (s->next_picture_ptr)
ff_copy_picture(&s->next_picture, s->next_picture_ptr);
- if (HAVE_THREADS && (avctx->active_thread_type & FF_THREAD_FRAME) &&
- (s->out_format != FMT_H264 || s->codec_id == AV_CODEC_ID_SVQ3)) {
+ if (HAVE_THREADS && (avctx->active_thread_type & FF_THREAD_FRAME)) {
if (s->next_picture_ptr)
s->next_picture_ptr->owner2 = s;
if (s->last_picture_ptr)
(s->codec_id == AV_CODEC_ID_H264 ? 0 : 1);
s->low_delay = 0; // needed to see the vectors without trashing the buffers
- avcodec_get_chroma_sub_sample(s->avctx->pix_fmt,
- &h_chroma_shift, &v_chroma_shift);
+ av_pix_fmt_get_chroma_sub_sample(s->avctx->pix_fmt,
+ &h_chroma_shift, &v_chroma_shift);
for (i = 0; i < 3; i++) {
memcpy(s->visualization_buffer[i], pict->data[i],
(i == 0) ? pict->linesize[i] * height:
int my_max = INT_MIN, my_min = INT_MAX, qpel_shift = !s->quarter_sample;
int my, off, i, mvs;
- if (s->picture_structure != PICT_FRAME) goto unhandled;
+ if (s->picture_structure != PICT_FRAME || s->mcsel)
+ goto unhandled;
switch (s->mv_type) {
case MV_TYPE_16X16: