summaryrefslogtreecommitdiff
path: root/libavcodec
diff options
context:
space:
mode:
authorAurelien Jacobs <aurel@gnuage.org>2009-01-17 12:21:01 +0000
committerAurelien Jacobs <aurel@gnuage.org>2009-01-17 12:21:01 +0000
commit2bb6eba21d1843d67127be031aab7576dbe4c200 (patch)
tree58da36fa398f13d1c6916e14af466f28ea735ce4 /libavcodec
parent9ce6c1387988bf3cdb631f3844e99a0c9bea43f2 (diff)
remove ff_get_fourcc() and use AV_RL32() instead
Originally committed as revision 16654 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/4xm.c12
-rw-r--r--libavcodec/asv1.c2
-rw-r--r--libavcodec/h263.c8
-rw-r--r--libavcodec/h263dec.c14
-rw-r--r--libavcodec/libxvidff.c2
-rw-r--r--libavcodec/mjpega_dump_header_bsf.c2
-rw-r--r--libavcodec/mjpegdec.c10
-rw-r--r--libavcodec/mpeg12.c2
-rw-r--r--libavcodec/shorten.c2
-rw-r--r--libavcodec/tta.c4
10 files changed, 29 insertions, 29 deletions
diff --git a/libavcodec/4xm.c b/libavcodec/4xm.c
index 3f1af194e4..6e22fda656 100644
--- a/libavcodec/4xm.c
+++ b/libavcodec/4xm.c
@@ -689,7 +689,7 @@ static int decode_frame(AVCodecContext *avctx,
av_log(f->avctx, AV_LOG_ERROR, "size mismatch %d %d\n", buf_size, AV_RL32(buf+4));
}
- if(frame_4cc == ff_get_fourcc("cfrm")){
+ if(frame_4cc == AV_RL32("cfrm")){
int free_index=-1;
const int data_size= buf_size - 20;
const int id= AV_RL32(buf+12);
@@ -730,7 +730,7 @@ static int decode_frame(AVCodecContext *avctx,
}
cfrm->size= cfrm->id= 0;
- frame_4cc= ff_get_fourcc("pfrm");
+ frame_4cc= AV_RL32("pfrm");
}else
return buf_size;
}else{
@@ -756,19 +756,19 @@ static int decode_frame(AVCodecContext *avctx,
return -1;
}
- if(frame_4cc == ff_get_fourcc("ifr2")){
+ if(frame_4cc == AV_RL32("ifr2")){
p->pict_type= FF_I_TYPE;
if(decode_i2_frame(f, buf-4, frame_size) < 0)
return -1;
- }else if(frame_4cc == ff_get_fourcc("ifrm")){
+ }else if(frame_4cc == AV_RL32("ifrm")){
p->pict_type= FF_I_TYPE;
if(decode_i_frame(f, buf, frame_size) < 0)
return -1;
- }else if(frame_4cc == ff_get_fourcc("pfrm") || frame_4cc == ff_get_fourcc("pfr2")){
+ }else if(frame_4cc == AV_RL32("pfrm") || frame_4cc == AV_RL32("pfr2")){
p->pict_type= FF_P_TYPE;
if(decode_p_frame(f, buf, frame_size) < 0)
return -1;
- }else if(frame_4cc == ff_get_fourcc("snd_")){
+ }else if(frame_4cc == AV_RL32("snd_")){
av_log(avctx, AV_LOG_ERROR, "ignoring snd_ chunk length:%d\n", buf_size);
}else{
av_log(avctx, AV_LOG_ERROR, "ignoring unknown chunk length:%d\n", buf_size);
diff --git a/libavcodec/asv1.c b/libavcodec/asv1.c
index 7e8699bcc7..ee91f61f47 100644
--- a/libavcodec/asv1.c
+++ b/libavcodec/asv1.c
@@ -584,7 +584,7 @@ static av_cold int encode_init(AVCodecContext *avctx){
avctx->extradata= av_mallocz(8);
avctx->extradata_size=8;
((uint32_t*)avctx->extradata)[0]= le2me_32(a->inv_qscale);
- ((uint32_t*)avctx->extradata)[1]= le2me_32(ff_get_fourcc("ASUS"));
+ ((uint32_t*)avctx->extradata)[1]= le2me_32(AV_RL32("ASUS"));
for(i=0; i<64; i++){
int q= 32*scale*ff_mpeg1_default_intra_matrix[i];
diff --git a/libavcodec/h263.c b/libavcodec/h263.c
index 41b4f11eff..5f151bfd71 100644
--- a/libavcodec/h263.c
+++ b/libavcodec/h263.c
@@ -114,7 +114,7 @@ max run: 29/41
static uint8_t static_rl_table_store[5][2][2*MAX_RUN + MAX_LEVEL + 3];
#if 0 //3IV1 is quite rare and it slows things down a tiny bit
-#define IS_3IV1 s->codec_tag == ff_get_fourcc("3IV1")
+#define IS_3IV1 s->codec_tag == AV_RL32("3IV1")
#else
#define IS_3IV1 0
#endif
@@ -5223,7 +5223,7 @@ int h263_decode_picture_header(MpegEncContext *s)
show_pict_info(s);
}
#if 1
- if (s->pict_type == FF_I_TYPE && s->codec_tag == ff_get_fourcc("ZYGO")){
+ if (s->pict_type == FF_I_TYPE && s->codec_tag == AV_RL32("ZYGO")){
int i,j;
for(i=0; i<85; i++) av_log(s->avctx, AV_LOG_DEBUG, "%d", get_bits1(&s->gb));
av_log(s->avctx, AV_LOG_DEBUG, "\n");
@@ -5548,7 +5548,7 @@ static int decode_vol_header(MpegEncContext *s, GetBitContext *gb){
skip_bits1(gb); /* marker */
height = get_bits(gb, 13);
skip_bits1(gb); /* marker */
- if(width && height && !(s->width && s->codec_tag == ff_get_fourcc("MP4S"))){ /* they should be non zero but who knows ... */
+ if(width && height && !(s->width && s->codec_tag == AV_RL32("MP4S"))){ /* they should be non zero but who knows ... */
s->width = width;
s->height = height;
// printf("width/height: %d %d\n", width, height);
@@ -6062,7 +6062,7 @@ int ff_mpeg4_decode_picture_header(MpegEncContext * s, GetBitContext *gb)
/* search next start code */
align_get_bits(gb);
- if(s->codec_tag == ff_get_fourcc("WV1F") && show_bits(gb, 24) == 0x575630){
+ if(s->codec_tag == AV_RL32("WV1F") && show_bits(gb, 24) == 0x575630){
skip_bits(gb, 24);
if(get_bits(gb, 8) == 0xF0)
goto end;
diff --git a/libavcodec/h263dec.c b/libavcodec/h263dec.c
index 557124e172..2792ba26f4 100644
--- a/libavcodec/h263dec.c
+++ b/libavcodec/h263dec.c
@@ -421,19 +421,19 @@ retry:
avctx->has_b_frames= !s->low_delay;
if(s->xvid_build==0 && s->divx_version==0 && s->lavc_build==0){
- if(s->stream_codec_tag == ff_get_fourcc("XVID") ||
- s->codec_tag == ff_get_fourcc("XVID") || s->codec_tag == ff_get_fourcc("XVIX") ||
- s->codec_tag == ff_get_fourcc("RMP4"))
+ if(s->stream_codec_tag == AV_RL32("XVID") ||
+ s->codec_tag == AV_RL32("XVID") || s->codec_tag == AV_RL32("XVIX") ||
+ s->codec_tag == AV_RL32("RMP4"))
s->xvid_build= -1;
#if 0
- if(s->codec_tag == ff_get_fourcc("DIVX") && s->vo_type==0 && s->vol_control_parameters==1
+ if(s->codec_tag == AV_RL32("DIVX") && s->vo_type==0 && s->vol_control_parameters==1
&& s->padding_bug_score > 0 && s->low_delay) // XVID with modified fourcc
s->xvid_build= -1;
#endif
}
if(s->xvid_build==0 && s->divx_version==0 && s->lavc_build==0){
- if(s->codec_tag == ff_get_fourcc("DIVX") && s->vo_type==0 && s->vol_control_parameters==0)
+ if(s->codec_tag == AV_RL32("DIVX") && s->vo_type==0 && s->vol_control_parameters==0)
s->divx_version= 400; //divx 4
}
@@ -443,10 +443,10 @@ retry:
}
if(s->workaround_bugs&FF_BUG_AUTODETECT){
- if(s->codec_tag == ff_get_fourcc("XVIX"))
+ if(s->codec_tag == AV_RL32("XVIX"))
s->workaround_bugs|= FF_BUG_XVID_ILACE;
- if(s->codec_tag == ff_get_fourcc("UMP4")){
+ if(s->codec_tag == AV_RL32("UMP4")){
s->workaround_bugs|= FF_BUG_UMP4;
}
diff --git a/libavcodec/libxvidff.c b/libavcodec/libxvidff.c
index 35104c37cd..63933c7bdf 100644
--- a/libavcodec/libxvidff.c
+++ b/libavcodec/libxvidff.c
@@ -335,7 +335,7 @@ av_cold int ff_xvid_encode_init(AVCodecContext *avctx) {
/* We are claiming to be Xvid */
x->quicktime_format = 0;
if(!avctx->codec_tag)
- avctx->codec_tag = ff_get_fourcc("xvid");
+ avctx->codec_tag = AV_RL32("xvid");
}
/* Bframes */
diff --git a/libavcodec/mjpega_dump_header_bsf.c b/libavcodec/mjpega_dump_header_bsf.c
index fb27efbf77..c27927aede 100644
--- a/libavcodec/mjpega_dump_header_bsf.c
+++ b/libavcodec/mjpega_dump_header_bsf.c
@@ -73,7 +73,7 @@ static int mjpega_dump_header(AVBitStreamFilterContext *bsfc, AVCodecContext *av
*poutbuf_size = poutbufp - *poutbuf;
return 1;
case APP1:
- if (i + 8 < buf_size && AV_RL32(buf + i + 8) == ff_get_fourcc("mjpg")) {
+ if (i + 8 < buf_size && AV_RL32(buf + i + 8) == AV_RL32("mjpg")) {
av_log(avctx, AV_LOG_ERROR, "bitstream already formatted\n");
memcpy(*poutbuf, buf, buf_size);
*poutbuf_size = buf_size;
diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c
index feb6abf2d8..08c64a173d 100644
--- a/libavcodec/mjpegdec.c
+++ b/libavcodec/mjpegdec.c
@@ -1040,7 +1040,7 @@ static int mjpeg_decode_app(MJpegDecodeContext *s)
/* buggy AVID, it puts EOI only at every 10th frame */
/* also this fourcc is used by non-avid files too, it holds some
informations, but it's always present in AVID creates files */
- if (id == ff_get_fourcc("AVI1"))
+ if (id == AV_RL32("AVI1"))
{
/* structure:
4bytes AVI1
@@ -1068,7 +1068,7 @@ static int mjpeg_decode_app(MJpegDecodeContext *s)
// len -= 2;
- if (id == ff_get_fourcc("JFIF"))
+ if (id == AV_RL32("JFIF"))
{
int t_w, t_h, v1, v2;
skip_bits(&s->gb, 8); /* the trailing zero-byte */
@@ -1098,7 +1098,7 @@ static int mjpeg_decode_app(MJpegDecodeContext *s)
goto out;
}
- if (id == ff_get_fourcc("Adob") && (get_bits(&s->gb, 8) == 'e'))
+ if (id == AV_RL32("Adob") && (get_bits(&s->gb, 8) == 'e'))
{
if (s->avctx->debug & FF_DEBUG_PICT_INFO)
av_log(s->avctx, AV_LOG_INFO, "mjpeg: Adobe header found\n");
@@ -1110,7 +1110,7 @@ static int mjpeg_decode_app(MJpegDecodeContext *s)
goto out;
}
- if (id == ff_get_fourcc("LJIF")){
+ if (id == AV_RL32("LJIF")){
if (s->avctx->debug & FF_DEBUG_PICT_INFO)
av_log(s->avctx, AV_LOG_INFO, "Pegasus lossless jpeg header found\n");
skip_bits(&s->gb, 16); /* version ? */
@@ -1139,7 +1139,7 @@ static int mjpeg_decode_app(MJpegDecodeContext *s)
id = (get_bits(&s->gb, 16) << 16) | get_bits(&s->gb, 16);
id = be2me_32(id);
len -= 4;
- if (id == ff_get_fourcc("mjpg")) /* Apple MJPEG-A */
+ if (id == AV_RL32("mjpg")) /* Apple MJPEG-A */
{
#if 0
skip_bits(&s->gb, 32); /* field size */
diff --git a/libavcodec/mpeg12.c b/libavcodec/mpeg12.c
index 6f2a49e9a6..92eef72870 100644
--- a/libavcodec/mpeg12.c
+++ b/libavcodec/mpeg12.c
@@ -2278,7 +2278,7 @@ static int mpeg_decode_frame(AVCodecContext *avctx,
}
#endif
- if(s->mpeg_enc_ctx_allocated==0 && avctx->codec_tag == ff_get_fourcc("VCR2"))
+ if(s->mpeg_enc_ctx_allocated==0 && avctx->codec_tag == AV_RL32("VCR2"))
vcr2_init_sequence(avctx);
s->slice_count= 0;
diff --git a/libavcodec/shorten.c b/libavcodec/shorten.c
index 6d0aace596..eda91c26f8 100644
--- a/libavcodec/shorten.c
+++ b/libavcodec/shorten.c
@@ -305,7 +305,7 @@ static int shorten_decode_frame(AVCodecContext *avctx,
{
int maxnlpc = 0;
/* shorten signature */
- if (get_bits_long(&s->gb, 32) != bswap_32(ff_get_fourcc("ajkg"))) {
+ if (get_bits_long(&s->gb, 32) != bswap_32(AV_RL32("ajkg"))) {
av_log(s->avctx, AV_LOG_ERROR, "missing shorten magic 'ajkg'\n");
return -1;
}
diff --git a/libavcodec/tta.c b/libavcodec/tta.c
index adf48b2997..2400acbb75 100644
--- a/libavcodec/tta.c
+++ b/libavcodec/tta.c
@@ -209,11 +209,11 @@ static av_cold int tta_decode_init(AVCodecContext * avctx)
return -1;
init_get_bits(&s->gb, avctx->extradata, avctx->extradata_size);
- if (show_bits_long(&s->gb, 32) == ff_get_fourcc("TTA1"))
+ if (show_bits_long(&s->gb, 32) == AV_RL32("TTA1"))
{
/* signature */
skip_bits(&s->gb, 32);
-// if (get_bits_long(&s->gb, 32) != bswap_32(ff_get_fourcc("TTA1"))) {
+// if (get_bits_long(&s->gb, 32) != bswap_32(AV_RL32("TTA1"))) {
// av_log(s->avctx, AV_LOG_ERROR, "Missing magic\n");
// return -1;
// }