summaryrefslogtreecommitdiff
path: root/libavcodec/h263dec.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavcodec/h263dec.c')
-rw-r--r--libavcodec/h263dec.c50
1 files changed, 25 insertions, 25 deletions
diff --git a/libavcodec/h263dec.c b/libavcodec/h263dec.c
index 6dba8ce1a0..6bb6204d97 100644
--- a/libavcodec/h263dec.c
+++ b/libavcodec/h263dec.c
@@ -63,43 +63,43 @@ av_cold int ff_h263_decode_init(AVCodecContext *avctx)
/* select sub codec */
switch(avctx->codec->id) {
- case CODEC_ID_H263:
+ case AV_CODEC_ID_H263:
s->unrestricted_mv= 0;
avctx->chroma_sample_location = AVCHROMA_LOC_CENTER;
break;
- case CODEC_ID_MPEG4:
+ case AV_CODEC_ID_MPEG4:
break;
- case CODEC_ID_MSMPEG4V1:
+ case AV_CODEC_ID_MSMPEG4V1:
s->h263_pred = 1;
s->msmpeg4_version=1;
break;
- case CODEC_ID_MSMPEG4V2:
+ case AV_CODEC_ID_MSMPEG4V2:
s->h263_pred = 1;
s->msmpeg4_version=2;
break;
- case CODEC_ID_MSMPEG4V3:
+ case AV_CODEC_ID_MSMPEG4V3:
s->h263_pred = 1;
s->msmpeg4_version=3;
break;
- case CODEC_ID_WMV1:
+ case AV_CODEC_ID_WMV1:
s->h263_pred = 1;
s->msmpeg4_version=4;
break;
- case CODEC_ID_WMV2:
+ case AV_CODEC_ID_WMV2:
s->h263_pred = 1;
s->msmpeg4_version=5;
break;
- case CODEC_ID_VC1:
- case CODEC_ID_WMV3:
- case CODEC_ID_VC1IMAGE:
- case CODEC_ID_WMV3IMAGE:
+ case AV_CODEC_ID_VC1:
+ case AV_CODEC_ID_WMV3:
+ case AV_CODEC_ID_VC1IMAGE:
+ case AV_CODEC_ID_WMV3IMAGE:
s->h263_pred = 1;
s->msmpeg4_version=6;
avctx->chroma_sample_location = AVCHROMA_LOC_LEFT;
break;
- case CODEC_ID_H263I:
+ case AV_CODEC_ID_H263I:
break;
- case CODEC_ID_FLV1:
+ case AV_CODEC_ID_FLV1:
s->h263_flv = 1;
break;
default:
@@ -109,7 +109,7 @@ av_cold int ff_h263_decode_init(AVCodecContext *avctx)
avctx->hwaccel= ff_find_hwaccel(avctx->codec->id, avctx->pix_fmt);
/* for h263, we allocate the images after having read the header */
- if (avctx->codec->id != CODEC_ID_H263 && avctx->codec->id != CODEC_ID_MPEG4)
+ if (avctx->codec->id != AV_CODEC_ID_H263 && avctx->codec->id != AV_CODEC_ID_MPEG4)
if (ff_MPV_common_init(s) < 0)
return -1;
@@ -168,7 +168,7 @@ static int decode_slice(MpegEncContext *s){
if(s->partitioned_frame){
const int qscale= s->qscale;
- if(CONFIG_MPEG4_DECODER && s->codec_id==CODEC_ID_MPEG4){
+ if(CONFIG_MPEG4_DECODER && s->codec_id==AV_CODEC_ID_MPEG4){
if(ff_mpeg4_decode_partitions(s) < 0)
return -1;
}
@@ -260,7 +260,7 @@ static int decode_slice(MpegEncContext *s){
assert(s->mb_x==0 && s->mb_y==s->mb_height);
- if(s->codec_id==CODEC_ID_MPEG4
+ if(s->codec_id==AV_CODEC_ID_MPEG4
&& (s->workaround_bugs&FF_BUG_AUTODETECT)
&& get_bits_left(&s->gb) >= 48
&& show_bits(&s->gb, 24)==0x4010
@@ -268,7 +268,7 @@ static int decode_slice(MpegEncContext *s){
s->padding_bug_score+=32;
/* try to detect the padding bug */
- if( s->codec_id==CODEC_ID_MPEG4
+ if( s->codec_id==AV_CODEC_ID_MPEG4
&& (s->workaround_bugs&FF_BUG_AUTODETECT)
&& get_bits_left(&s->gb) >=0
&& get_bits_left(&s->gb) < 48
@@ -367,9 +367,9 @@ uint64_t time= rdtsc();
if(s->flags&CODEC_FLAG_TRUNCATED){
int next;
- if(CONFIG_MPEG4_DECODER && s->codec_id==CODEC_ID_MPEG4){
+ if(CONFIG_MPEG4_DECODER && s->codec_id==AV_CODEC_ID_MPEG4){
next= ff_mpeg4_find_frame_end(&s->parse_context, buf, buf_size);
- }else if(CONFIG_H263_DECODER && s->codec_id==CODEC_ID_H263){
+ }else if(CONFIG_H263_DECODER && s->codec_id==AV_CODEC_ID_H263){
next= ff_h263_find_frame_end(&s->parse_context, buf, buf_size);
}else{
av_log(s->avctx, AV_LOG_ERROR, "this codec does not support truncated bitstreams\n");
@@ -416,7 +416,7 @@ retry:
ret = ff_mpeg4_decode_picture_header(s, &gb);
}
ret = ff_mpeg4_decode_picture_header(s, &s->gb);
- } else if (CONFIG_H263I_DECODER && s->codec_id == CODEC_ID_H263I) {
+ } else if (CONFIG_H263I_DECODER && s->codec_id == AV_CODEC_ID_H263I) {
ret = ff_intel_h263_decode_picture_header(s);
} else if (CONFIG_FLV_DECODER && s->h263_flv) {
ret = ff_flv_decode_picture_header(s);
@@ -531,7 +531,7 @@ retry:
* Let us hope this at least works.
*/
if( s->resync_marker==0 && s->data_partitioning==0 && s->divx_version==-1
- && s->codec_id==CODEC_ID_MPEG4 && s->vo_type==0)
+ && s->codec_id==AV_CODEC_ID_MPEG4 && s->vo_type==0)
s->workaround_bugs|= FF_BUG_NO_PADDING;
if(s->lavc_build<4609U) //FIXME not sure about the version num but a 4609 file seems ok
@@ -561,7 +561,7 @@ retry:
s->divx_packed ? "p" : "");
#if HAVE_MMX
- if (s->codec_id == CODEC_ID_MPEG4 && s->xvid_build>=0 && avctx->idct_algo == FF_IDCT_AUTO && (av_get_cpu_flags() & AV_CPU_FLAG_MMX)) {
+ if (s->codec_id == AV_CODEC_ID_MPEG4 && s->xvid_build>=0 && avctx->idct_algo == FF_IDCT_AUTO && (av_get_cpu_flags() & AV_CPU_FLAG_MMX)) {
avctx->idct_algo= FF_IDCT_XVIDMMX;
ff_dct_common_init(s);
s->picture_number=0;
@@ -588,7 +588,7 @@ retry:
goto retry;
}
- if((s->codec_id==CODEC_ID_H263 || s->codec_id==CODEC_ID_H263P || s->codec_id == CODEC_ID_H263I))
+ if((s->codec_id==AV_CODEC_ID_H263 || s->codec_id==AV_CODEC_ID_H263P || s->codec_id == AV_CODEC_ID_H263I))
s->gob_index = ff_h263_get_gob_height(s);
// for skipping the frame
@@ -676,7 +676,7 @@ retry:
assert(s->bitstream_buffer_size==0);
frame_end:
/* divx 5.01+ bistream reorder stuff */
- if(s->codec_id==CODEC_ID_MPEG4 && s->divx_packed){
+ if(s->codec_id==AV_CODEC_ID_MPEG4 && s->divx_packed){
int current_pos= get_bits_count(&s->gb)>>3;
int startcode_found=0;
@@ -739,7 +739,7 @@ av_log(avctx, AV_LOG_DEBUG, "%"PRId64"\n", rdtsc()-time);
AVCodec ff_h263_decoder = {
.name = "h263",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_H263,
+ .id = AV_CODEC_ID_H263,
.priv_data_size = sizeof(MpegEncContext),
.init = ff_h263_decode_init,
.close = ff_h263_decode_end,