Mercurial > libavformat.hg
changeset 4832:b367d80986b3 libavformat
move codec tag tables near corresponding code
author | bcoudurier |
---|---|
date | Tue, 07 Apr 2009 22:34:05 +0000 |
parents | 1c7db935f752 |
children | d607731c2cf8 |
files | movenc.c |
diffstat | 1 files changed, 34 insertions(+), 34 deletions(-) [+] |
line wrap: on
line diff
--- a/movenc.c Tue Apr 07 22:31:53 2009 +0000 +++ b/movenc.c Tue Apr 07 22:34:05 2009 +0000 @@ -546,40 +546,6 @@ return 0; } -static const AVCodecTag codec_3gp_tags[] = { - { CODEC_ID_H263, MKTAG('s','2','6','3') }, - { CODEC_ID_H264, MKTAG('a','v','c','1') }, - { CODEC_ID_MPEG4, MKTAG('m','p','4','v') }, - { CODEC_ID_AAC, MKTAG('m','p','4','a') }, - { CODEC_ID_AMR_NB, MKTAG('s','a','m','r') }, - { CODEC_ID_AMR_WB, MKTAG('s','a','w','b') }, - { CODEC_ID_MOV_TEXT, MKTAG('t','x','3','g') }, - { CODEC_ID_NONE, 0 }, -}; - -static const struct { - enum PixelFormat pix_fmt; - uint32_t tag; - unsigned bps; -} mov_pix_fmt_tags[] = { - { PIX_FMT_YUYV422, MKTAG('y','u','v','s'), 0 }, - { PIX_FMT_UYVY422, MKTAG('2','v','u','y'), 0 }, - { PIX_FMT_BGR555, MKTAG('r','a','w',' '), 16 }, - { PIX_FMT_RGB24, MKTAG('r','a','w',' '), 24 }, - { PIX_FMT_BGR32_1, MKTAG('r','a','w',' '), 32 }, -}; - -static const AVCodecTag codec_ipod_tags[] = { - { CODEC_ID_H264, MKTAG('a','v','c','1') }, - { CODEC_ID_MPEG4, MKTAG('m','p','4','v') }, - { CODEC_ID_AAC, MKTAG('m','p','4','a') }, - { CODEC_ID_ALAC, MKTAG('a','l','a','c') }, - { CODEC_ID_AC3, MKTAG('a','c','-','3') }, - { CODEC_ID_MOV_TEXT, MKTAG('t','x','3','g') }, - { CODEC_ID_MOV_TEXT, MKTAG('t','e','x','t') }, - { CODEC_ID_NONE, 0 }, -}; - static int mp4_get_codec_tag(AVFormatContext *s, MOVTrack *track) { int tag = track->enc->codec_tag; @@ -597,6 +563,17 @@ return tag; } +static const AVCodecTag codec_ipod_tags[] = { + { CODEC_ID_H264, MKTAG('a','v','c','1') }, + { CODEC_ID_MPEG4, MKTAG('m','p','4','v') }, + { CODEC_ID_AAC, MKTAG('m','p','4','a') }, + { CODEC_ID_ALAC, MKTAG('a','l','a','c') }, + { CODEC_ID_AC3, MKTAG('a','c','-','3') }, + { CODEC_ID_MOV_TEXT, MKTAG('t','x','3','g') }, + { CODEC_ID_MOV_TEXT, MKTAG('t','e','x','t') }, + { CODEC_ID_NONE, 0 }, +}; + static int ipod_get_codec_tag(AVFormatContext *s, MOVTrack *track) { int tag = track->enc->codec_tag; @@ -628,6 +605,18 @@ return tag; } +static const struct { + enum PixelFormat pix_fmt; + uint32_t tag; + unsigned bps; +} mov_pix_fmt_tags[] = { + { PIX_FMT_YUYV422, MKTAG('y','u','v','s'), 0 }, + { PIX_FMT_UYVY422, MKTAG('2','v','u','y'), 0 }, + { PIX_FMT_BGR555, MKTAG('r','a','w',' '), 16 }, + { PIX_FMT_RGB24, MKTAG('r','a','w',' '), 24 }, + { PIX_FMT_BGR32_1, MKTAG('r','a','w',' '), 32 }, +}; + static int mov_get_rawvideo_codec_tag(AVFormatContext *s, MOVTrack *track) { int tag = track->enc->codec_tag; @@ -681,6 +670,17 @@ return tag; } +static const AVCodecTag codec_3gp_tags[] = { + { CODEC_ID_H263, MKTAG('s','2','6','3') }, + { CODEC_ID_H264, MKTAG('a','v','c','1') }, + { CODEC_ID_MPEG4, MKTAG('m','p','4','v') }, + { CODEC_ID_AAC, MKTAG('m','p','4','a') }, + { CODEC_ID_AMR_NB, MKTAG('s','a','m','r') }, + { CODEC_ID_AMR_WB, MKTAG('s','a','w','b') }, + { CODEC_ID_MOV_TEXT, MKTAG('t','x','3','g') }, + { CODEC_ID_NONE, 0 }, +}; + static int mov_find_codec_tag(AVFormatContext *s, MOVTrack *track) { int tag = track->enc->codec_tag;