@@ -693,12 +693,10 @@ frame_end:
if ((ret = av_frame_ref(pict, s->current_picture_ptr->f)) < 0)
return ret;
ff_print_debug_info(s, s->current_picture_ptr, pict);
- ff_mpv_export_qp_table(s, pict, s->current_picture_ptr, FF_QSCALE_TYPE_MPEG1);
} else if (s->last_picture_ptr) {
if ((ret = av_frame_ref(pict, s->last_picture_ptr->f)) < 0)
return ret;
ff_print_debug_info(s, s->last_picture_ptr, pict);
- ff_mpv_export_qp_table(s, pict, s->last_picture_ptr, FF_QSCALE_TYPE_MPEG1);
}
if (s->last_picture_ptr || s->low_delay) {
@@ -2062,7 +2062,6 @@ static int slice_end(AVCodecContext *avctx, AVFrame *pict)
if (ret < 0)
return ret;
ff_print_debug_info(s, s->current_picture_ptr, pict);
- ff_mpv_export_qp_table(s, pict, s->current_picture_ptr, FF_QSCALE_TYPE_MPEG2);
} else {
if (avctx->active_thread_type & FF_THREAD_FRAME)
s->picture_number++;
@@ -2073,7 +2072,6 @@ static int slice_end(AVCodecContext *avctx, AVFrame *pict)
if (ret < 0)
return ret;
ff_print_debug_info(s, s->last_picture_ptr, pict);
- ff_mpv_export_qp_table(s, pict, s->last_picture_ptr, FF_QSCALE_TYPE_MPEG2);
}
}
@@ -1443,18 +1443,6 @@ void ff_print_debug_info(MpegEncContext *s, Picture *p, AVFrame *pict)
s->mb_width, s->mb_height, s->mb_stride, s->quarter_sample);
}
-int ff_mpv_export_qp_table(MpegEncContext *s, AVFrame *f, Picture *p, int qp_type)
-{
- AVBufferRef *ref = av_buffer_ref(p->qscale_table_buf);
- int offset = 2*s->mb_stride + 1;
- if(!ref)
- return AVERROR(ENOMEM);
- av_assert0(ref->size >= offset + s->mb_stride * ((f->height+15)/16));
- ref->size -= offset;
- ref->data += offset;
- return av_frame_set_qp_table(f, ref, s->mb_stride, qp_type);
-}
-
static inline int hpel_motion_lowres(MpegEncContext *s,
uint8_t *dest, uint8_t *src,
int field_based, int field_select,
@@ -713,8 +713,6 @@ void ff_mpeg_flush(AVCodecContext *avctx);
void ff_print_debug_info(MpegEncContext *s, Picture *p, AVFrame *pict);
-int ff_mpv_export_qp_table(MpegEncContext *s, AVFrame *f, Picture *p, int qp_type);
-
void ff_write_quant_matrix(PutBitContext *pb, uint16_t *matrix);
int ff_update_duplicate_context(MpegEncContext *dst, MpegEncContext *src);
@@ -772,12 +772,10 @@ static int rv10_decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
if ((ret = av_frame_ref(pict, s->current_picture_ptr->f)) < 0)
return ret;
ff_print_debug_info(s, s->current_picture_ptr, pict);
- ff_mpv_export_qp_table(s, pict, s->current_picture_ptr, FF_QSCALE_TYPE_MPEG1);
} else if (s->last_picture_ptr) {
if ((ret = av_frame_ref(pict, s->last_picture_ptr->f)) < 0)
return ret;
ff_print_debug_info(s, s->last_picture_ptr, pict);
- ff_mpv_export_qp_table(s, pict,s->last_picture_ptr, FF_QSCALE_TYPE_MPEG1);
}
if (s->last_picture_ptr || s->low_delay) {
@@ -1617,13 +1617,11 @@ static int finish_frame(AVCodecContext *avctx, AVFrame *pict)
if ((ret = av_frame_ref(pict, s->current_picture_ptr->f)) < 0)
return ret;
ff_print_debug_info(s, s->current_picture_ptr, pict);
- ff_mpv_export_qp_table(s, pict, s->current_picture_ptr, FF_QSCALE_TYPE_MPEG1);
got_picture = 1;
} else if (s->last_picture_ptr) {
if ((ret = av_frame_ref(pict, s->last_picture_ptr->f)) < 0)
return ret;
ff_print_debug_info(s, s->last_picture_ptr, pict);
- ff_mpv_export_qp_table(s, pict, s->last_picture_ptr, FF_QSCALE_TYPE_MPEG1);
got_picture = 1;
}