*/
int ff_match_2uint16(const uint16_t (*tab)[2], int size, int a, int b);
+unsigned int ff_toupper4(unsigned int x);
+
#endif /* AVCODEC_INTERNAL_H */
#include "libavutil/intmath.h"
#include "avcodec.h"
#include "dsputil.h"
+#include "internal.h"
#include "mpegvideo.h"
#include "mpegvideo_common.h"
#include "mjpegenc.h"
yc_size = y_size + 2 * c_size;
/* convert fourcc to upper case */
- s->codec_tag= toupper( s->avctx->codec_tag &0xFF)
- + (toupper((s->avctx->codec_tag>>8 )&0xFF)<<8 )
- + (toupper((s->avctx->codec_tag>>16)&0xFF)<<16)
- + (toupper((s->avctx->codec_tag>>24)&0xFF)<<24);
-
- s->stream_codec_tag= toupper( s->avctx->stream_codec_tag &0xFF)
- + (toupper((s->avctx->stream_codec_tag>>8 )&0xFF)<<8 )
- + (toupper((s->avctx->stream_codec_tag>>16)&0xFF)<<16)
- + (toupper((s->avctx->stream_codec_tag>>24)&0xFF)<<24);
+ s->codec_tag = ff_toupper4(s->avctx->codec_tag);
+
+ s->stream_codec_tag = ff_toupper4(s->avctx->stream_codec_tag);
s->avctx->coded_frame= (AVFrame*)&s->current_picture;
}
return 0;
}
+
+unsigned int ff_toupper4(unsigned int x)
+{
+ return toupper( x &0xFF)
+ + (toupper((x>>8 )&0xFF)<<8 )
+ + (toupper((x>>16)&0xFF)<<16)
+ + (toupper((x>>24)&0xFF)<<24);
+}
*/
#include "avformat.h"
#include "internal.h"
+#include "libavcodec/internal.h"
#include "libavcodec/opt.h"
#include "metadata.h"
#include "libavutil/avstring.h"
return tags[i].id;
}
for(i=0; tags[i].id != CODEC_ID_NONE; i++) {
- if( toupper((tag >> 0)&0xFF) == toupper((tags[i].tag >> 0)&0xFF)
- && toupper((tag >> 8)&0xFF) == toupper((tags[i].tag >> 8)&0xFF)
- && toupper((tag >>16)&0xFF) == toupper((tags[i].tag >>16)&0xFF)
- && toupper((tag >>24)&0xFF) == toupper((tags[i].tag >>24)&0xFF))
+ if (ff_toupper4(tag) == ff_toupper4(tags[i].tag))
return tags[i].id;
}
return CODEC_ID_NONE;