summaryrefslogtreecommitdiffstats
path: root/libmpcodecs
diff options
context:
space:
mode:
authoruau <uau@b3059339-0415-0410-9bf9-f77b7e298cf2>2008-09-08 17:02:32 +0000
committeruau <uau@b3059339-0415-0410-9bf9-f77b7e298cf2>2008-09-08 17:02:32 +0000
commit923f67082e60afc96d9efd2b88f75d992834c8a6 (patch)
tree6dffb6b669c79ff11095ac6e23d607db1514cc79 /libmpcodecs
parentb128f3e558af20ac6e7bbfedaf1c47c5860ec53c (diff)
downloadmpv-923f67082e60afc96d9efd2b88f75d992834c8a6.tar.bz2
mpv-923f67082e60afc96d9efd2b88f75d992834c8a6.tar.xz
Fix compilation after libavcodec major version 52 changes
Some symbols were dropped or renamed, requiring corresponding changes in MPlayer. - Use AVCodecContext->bits_per_coded_sample instead of ->bits_per_sample. - Use AVCodecContext->trellis instead of ->flags&CODEC_FLAG_TRELLIS_QUANT. - Don't set AVCodecContext->rtp_mode (already marked unused before). - Use ff_eval2() instead of ff_eval(). git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27548 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpcodecs')
-rw-r--r--libmpcodecs/ad_ffmpeg.c2
-rw-r--r--libmpcodecs/vd_ffmpeg.c2
-rw-r--r--libmpcodecs/ve_lavc.c11
-rw-r--r--libmpcodecs/vf_qp.c5
4 files changed, 11 insertions, 9 deletions
diff --git a/libmpcodecs/ad_ffmpeg.c b/libmpcodecs/ad_ffmpeg.c
index b04d5a5f35..64702f7825 100644
--- a/libmpcodecs/ad_ffmpeg.c
+++ b/libmpcodecs/ad_ffmpeg.c
@@ -63,7 +63,7 @@ static int init(sh_audio_t *sh_audio)
lavc_context->sample_rate = sh_audio->wf->nSamplesPerSec;
lavc_context->bit_rate = sh_audio->wf->nAvgBytesPerSec * 8;
lavc_context->block_align = sh_audio->wf->nBlockAlign;
- lavc_context->bits_per_sample = sh_audio->wf->wBitsPerSample;
+ lavc_context->bits_per_coded_sample = sh_audio->wf->wBitsPerSample;
}
lavc_context->request_channels = audio_output_channels;
lavc_context->codec_tag = sh_audio->format; //FOURCC
diff --git a/libmpcodecs/vd_ffmpeg.c b/libmpcodecs/vd_ffmpeg.c
index f50c5c69b6..da1350eee0 100644
--- a/libmpcodecs/vd_ffmpeg.c
+++ b/libmpcodecs/vd_ffmpeg.c
@@ -401,7 +401,7 @@ static int init(sh_video_t *sh){
}
if(sh->bih)
- avctx->bits_per_sample= sh->bih->biBitCount;
+ avctx->bits_per_coded_sample= sh->bih->biBitCount;
if(lavc_param_threads > 1)
avcodec_thread_init(avctx, lavc_param_threads);
diff --git a/libmpcodecs/ve_lavc.c b/libmpcodecs/ve_lavc.c
index 9b898fa236..3bf8353c46 100644
--- a/libmpcodecs/ve_lavc.c
+++ b/libmpcodecs/ve_lavc.c
@@ -240,7 +240,7 @@ m_option_t lavcopts_conf[]={
{"predia", &lavc_param_pre_dia_size, CONF_TYPE_INT, CONF_RANGE, -2000, 2000, NULL},
{"dia", &lavc_param_dia_size, CONF_TYPE_INT, CONF_RANGE, -2000, 2000, NULL},
{"qpel", &lavc_param_qpel, CONF_TYPE_FLAG, 0, 0, CODEC_FLAG_QPEL, NULL},
- {"trell", &lavc_param_trell, CONF_TYPE_FLAG, 0, 0, CODEC_FLAG_TRELLIS_QUANT, NULL},
+ {"trell", &lavc_param_trell, CONF_TYPE_FLAG, 0, 0, 1, NULL},
{"lowdelay", &lavc_param_lowdelay, CONF_TYPE_FLAG, 0, 0, CODEC_FLAG_LOW_DELAY, NULL},
{"last_pred", &lavc_param_last_pred, CONF_TYPE_INT, CONF_RANGE, 0, 2000, NULL},
{"preme", &lavc_param_pre_me, CONF_TYPE_INT, CONF_RANGE, 0, 2000, NULL},
@@ -369,7 +369,6 @@ static int config(struct vf_instance_s* vf,
lavc_venc_context->luma_elim_threshold= lavc_param_luma_elim_threshold;
lavc_venc_context->chroma_elim_threshold= lavc_param_chroma_elim_threshold;
lavc_venc_context->rtp_payload_size= lavc_param_packet_size;
- if(lavc_param_packet_size )lavc_venc_context->rtp_mode=1;
lavc_venc_context->strict_std_compliance= lavc_param_strict;
lavc_venc_context->i_quant_factor= lavc_param_vi_qfactor;
lavc_venc_context->i_quant_offset= (int)(FF_QP2LAMBDA * lavc_param_vi_qoffset + 0.5);
@@ -540,7 +539,7 @@ static int config(struct vf_instance_s* vf,
#endif
lavc_venc_context->dia_size= lavc_param_dia_size;
lavc_venc_context->flags|= lavc_param_qpel;
- lavc_venc_context->flags|= lavc_param_trell;
+ lavc_venc_context->trellis = lavc_param_trell;
lavc_venc_context->flags|= lavc_param_lowdelay;
lavc_venc_context->flags|= lavc_param_bit_exact;
lavc_venc_context->flags|= lavc_param_aic;
@@ -665,7 +664,7 @@ static int config(struct vf_instance_s* vf,
lavc_venc_context->flags &= ~CODEC_FLAG_QPEL;
lavc_venc_context->flags &= ~CODEC_FLAG_4MV;
- lavc_venc_context->flags &= ~CODEC_FLAG_TRELLIS_QUANT;
+ lavc_venc_context->trellis = 0;
lavc_venc_context->flags &= ~CODEC_FLAG_CBP_RD;
lavc_venc_context->flags &= ~CODEC_FLAG_QP_RD;
lavc_venc_context->flags &= ~CODEC_FLAG_MV0;
@@ -700,8 +699,8 @@ static int config(struct vf_instance_s* vf,
/* free second pass buffer, its not needed anymore */
av_freep(&lavc_venc_context->stats_in);
- if(lavc_venc_context->bits_per_sample)
- mux_v->bih->biBitCount= lavc_venc_context->bits_per_sample;
+ if(lavc_venc_context->bits_per_coded_sample)
+ mux_v->bih->biBitCount= lavc_venc_context->bits_per_coded_sample;
if(lavc_venc_context->extradata_size){
mux_v->bih= realloc(mux_v->bih, sizeof(BITMAPINFOHEADER) + lavc_venc_context->extradata_size);
memcpy(mux_v->bih + 1, lavc_venc_context->extradata, lavc_venc_context->extradata_size);
diff --git a/libmpcodecs/vf_qp.c b/libmpcodecs/vf_qp.c
index 00c67383e0..d8fcb57d97 100644
--- a/libmpcodecs/vf_qp.c
+++ b/libmpcodecs/vf_qp.c
@@ -75,7 +75,10 @@ static int config(struct vf_instance_s* vf,
NULL
};
- vf->priv->lut[i+129]= lrintf(ff_eval(vf->priv->eq, const_values, const_names, NULL, NULL, NULL, NULL, NULL));
+ const char *error = NULL;
+ vf->priv->lut[i+129]= lrintf(ff_eval2(vf->priv->eq, const_values, const_names, NULL, NULL, NULL, NULL, NULL, &error));
+ if (error)
+ mp_msg(MSGT_VFILTER, MSGL_ERR, "qp: Error evaluating \"%s\": %s\n", vf->priv->eq, error);
}
return vf_next_config(vf,width,height,d_width,d_height,flags,outfmt);