|
|
|
@ -29,6 +29,7 @@ |
|
|
|
|
|
|
|
|
|
#include "libavutil/intmath.h" |
|
|
|
|
#include "libavutil/mathematics.h" |
|
|
|
|
#include "libavutil/pixdesc.h" |
|
|
|
|
#include "libavutil/opt.h" |
|
|
|
|
#include "avcodec.h" |
|
|
|
|
#include "dsputil.h" |
|
|
|
@ -601,8 +602,8 @@ av_cold int ff_MPV_encode_init(AVCodecContext *avctx) |
|
|
|
|
if (avctx->inter_quant_bias != FF_DEFAULT_QUANT_BIAS) |
|
|
|
|
s->inter_quant_bias = avctx->inter_quant_bias; |
|
|
|
|
|
|
|
|
|
avcodec_get_chroma_sub_sample(avctx->pix_fmt, &chroma_h_shift, |
|
|
|
|
&chroma_v_shift); |
|
|
|
|
av_pix_fmt_get_chroma_sub_sample(avctx->pix_fmt, &chroma_h_shift, |
|
|
|
|
&chroma_v_shift); |
|
|
|
|
|
|
|
|
|
if (avctx->codec_id == AV_CODEC_ID_MPEG4 && |
|
|
|
|
s->avctx->time_base.den > (1 << 16) - 1) { |
|
|
|
@ -994,8 +995,9 @@ static int load_input_picture(MpegEncContext *s, AVFrame *pic_arg) |
|
|
|
|
// empty
|
|
|
|
|
} else { |
|
|
|
|
int h_chroma_shift, v_chroma_shift; |
|
|
|
|
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++) { |
|
|
|
|
int src_stride = pic_arg->linesize[i]; |
|
|
|
|