-static void update_lru(int *lru, int current, int count){
- int i;
-
- for(i=0; i<count-1; i++){
- if(lru[i] == current)
- break;
- }
-
- for(; i; i--){
- lru[i]= lru[i-1];
- }
-
- lru[0]= current;
-}
-
-static void update(NUTContext *nut, int stream_index, int64_t frame_start, int frame_type, int frame_code, int key_frame, int size, int64_t pts){
- StreamContext *stream= &nut->stream[stream_index];
- const int flags=nut->frame_code[frame_code].flags;
-
- stream->last_key_frame= key_frame;
- nut->last_frame_start[ frame_type ]= frame_start;
- if(frame_type == 0)
- update_lru(stream->lru_pts_delta, pts - stream->last_pts, 3);
- update_lru(stream->lru_size, size, 2);
- stream->last_pts= pts;
- if((flags & FLAG_PTS) && (flags & FLAG_FULL_PTS))
- stream->last_full_pts= pts;
-}
-
-static void reset(AVFormatContext *s/*, int frame_type*/){
- NUTContext *nut = s->priv_data;
- int i;
-
- for(i=0; i<s->nb_streams; i++){
- StreamContext *stream= &nut->stream[i];
-
- stream->last_key_frame= 1;
- memcpy(stream->lru_pts_delta, stream->initial_pts_predictor, sizeof(int)*MAX_PTS_LRU);
- memcpy(stream->lru_size, stream->initial_size_predictor, sizeof(int)*MAX_SIZE_LRU);
- }
-}
-
-static void build_frame_code(AVFormatContext *s){
- NUTContext *nut = s->priv_data;
- int key_frame, frame_type, full_pts, index, pred, stream_id;
- int start=0;
- int end= 255;
- int keyframe_0_esc= s->nb_streams > 2;
-
- if(keyframe_0_esc){
- /* keyframe = 0 escapes, 3 codes */
- for(frame_type=0; frame_type<2; frame_type++){
- for(full_pts=frame_type; full_pts<2; full_pts++){
- FrameCode *ft= &nut->frame_code[start];
- ft->flags= FLAG_FRAME_TYPE*frame_type + FLAG_FULL_PTS*full_pts;
- ft->flags|= FLAG_DATA_SIZE | FLAG_PTS;
- ft->stream_id_plus1= 0;
- ft->size_mul=1;
- start++;
- }
- }
- }
-
- for(stream_id= 0; stream_id<s->nb_streams; stream_id++){
- int start2= start + (end-start)*stream_id / s->nb_streams;
- int end2 = start + (end-start)*(stream_id+1) / s->nb_streams;
- AVCodecContext *codec = &s->streams[stream_id]->codec;
- int is_audio= codec->codec_type == CODEC_TYPE_AUDIO;
- int intra_only= /*codec->intra_only || */is_audio;
- int pred_count;
-
- for(key_frame=0; key_frame<2; key_frame++){
- if(intra_only && keyframe_0_esc && key_frame==0)
- continue;
-
- for(frame_type=0; frame_type<2; frame_type++){
- for(full_pts=frame_type; full_pts<2; full_pts++){
- FrameCode *ft= &nut->frame_code[start2];
- ft->flags= FLAG_FRAME_TYPE*frame_type + FLAG_FULL_PTS*full_pts + FLAG_KEY_FRAME*key_frame;
- ft->flags|= FLAG_DATA_SIZE | FLAG_PTS;
- ft->stream_id_plus1= stream_id + 1;
- ft->size_mul=1;
- start2++;
- }
- }
- }
-
- key_frame= intra_only;
-#if 1
- if(is_audio){
- int frame_bytes= codec->frame_size*(int64_t)codec->bit_rate / (8*codec->sample_rate);
- for(pred=0; pred<MAX_SIZE_LRU; pred++){
- for(frame_type=0; frame_type<1; frame_type++){
- FrameCode *ft= &nut->frame_code[start2];
- ft->flags= FLAG_KEY_FRAME*key_frame + (FLAG_FULL_PTS+FLAG_PTS+FLAG_FRAME_TYPE)*frame_type;
- ft->stream_id_plus1= stream_id + 1;
- ft->size_mul=1;
- ft->size_lsb=1 + pred;
- start2++;
- }
- nut->stream[stream_id].initial_size_predictor[pred]= frame_bytes + pred;
- }
- }else{
- FrameCode *ft= &nut->frame_code[start2];
- ft->flags= FLAG_KEY_FRAME | FLAG_DATA_SIZE;
- ft->stream_id_plus1= stream_id + 1;
- ft->size_mul=1;
- start2++;
- }
-#endif
- pred_count= 2 + codec->has_b_frames + (codec->codec_id == CODEC_ID_VORBIS);
- for(pred=0; pred<pred_count; pred++){
- int start3= start2 + (end2-start2)*pred / pred_count;
- int end3 = start2 + (end2-start2)*(pred+1) / pred_count;
-
- for(index=start3; index<end3; index++){
- FrameCode *ft= &nut->frame_code[index];
- ft->flags= FLAG_KEY_FRAME*key_frame + pred*4;
- ft->flags|= FLAG_DATA_SIZE;
- ft->stream_id_plus1= stream_id + 1;
-//FIXME use single byte size and pred from last
- ft->size_mul= end3-start3;
- ft->size_lsb= index - start3;
- }
- nut->stream[stream_id].initial_pts_predictor[pred]= pred+1;
- }
- }
- memmove(&nut->frame_code['N'+1], &nut->frame_code['N'], sizeof(FrameCode)*(255-'N'));
- nut->frame_code['N'].flags= 1;
-}
-
-static uint64_t get_v(ByteIOContext *bc)
-{
- uint64_t val = 0;
-
- for(;;)
- {
- int tmp = get_byte(bc);
-
- if (tmp&0x80)
- val= (val<<7) + tmp - 0x80;
- else
- return (val<<7) + tmp;
- }
- return -1;
-}
-
-static int get_str(ByteIOContext *bc, char *string, int maxlen){
- int len= get_v(bc);
-
- if(len && maxlen)
- get_buffer(bc, string, FFMIN(len, maxlen));
- while(len > maxlen){
- get_byte(bc);
- len--;
- }
-
- if(maxlen)
- string[FFMIN(len, maxlen-1)]= 0;
-
- if(maxlen == len)
- return -1;
- else
- return 0;
-}
-
-static uint64_t get_vb(ByteIOContext *bc){
- uint64_t val=0;
- int i= get_v(bc);
-
- if(i>8)
- return UINT64_MAX;
-
- while(i--)
- val = (val<<8) + get_byte(bc);
-
- return val;
-}
-
-static int get_packetheader(NUTContext *nut, ByteIOContext *bc, int prefix_length, int calculate_checksum)
-{
- int64_t start, size, last_size;
- start= url_ftell(bc) - prefix_length;
-
- if(nut->written_packet_size >= 0 && start != nut->packet_start + nut->written_packet_size){
- av_log(nut->avf, AV_LOG_ERROR, "get_packetheader called at weird position\n");
- if(prefix_length<8)
- return -1;
- }
-
- init_checksum(bc, calculate_checksum ? update_adler32 : NULL, 0);
-
- size= get_v(bc);
- last_size= get_v(bc);
- if(nut->written_packet_size >= 0 && nut->written_packet_size != last_size){
- av_log(nut->avf, AV_LOG_ERROR, "packet size missmatch %d != %lld at %lld\n", nut->written_packet_size, last_size, start);
- if(prefix_length<8)
- return -1;
- }
-
- nut->last_packet_start = nut->packet_start;
- nut->packet_start = start;
- nut->written_packet_size= size;
-
- return size;
-}
-
-static int check_checksum(ByteIOContext *bc){
- unsigned long checksum= get_checksum(bc);
- return checksum != get_be32(bc);
-}
-
-/**
- *
- */
-static int get_length(uint64_t val){
- int i;
-
- for (i=7; val>>i; i+=7);
-
- return i;
-}
-
-static uint64_t find_any_startcode(ByteIOContext *bc, int64_t pos){
- uint64_t state=0;
-
- if(pos >= 0)
- url_fseek(bc, pos, SEEK_SET); //note, this may fail if the stream isnt seekable, but that shouldnt matter, as in this case we simply start where we are currently
-
- while(!url_feof(bc)){
- state= (state<<8) | get_byte(bc);
- if((state>>56) != 'N')
- continue;
- switch(state){
- case MAIN_STARTCODE:
- case STREAM_STARTCODE:
- case KEYFRAME_STARTCODE:
- case INFO_STARTCODE:
- case INDEX_STARTCODE:
- return state;
- }
- }
-
- return 0;
-}
-
-/**
- * find the given startcode.
- * @param code the startcode
- * @param pos the start position of the search, or -1 if the current position
- * @returns the position of the startcode or -1 if not found
- */
-static int64_t find_startcode(ByteIOContext *bc, uint64_t code, int64_t pos){
- for(;;){
- uint64_t startcode= find_any_startcode(bc, pos);
- if(startcode == code)
- return url_ftell(bc) - 8;
- else if(startcode == 0)
- return -1;
- pos=-1;
- }
-}
-
-#ifdef CONFIG_ENCODERS
-static void put_v(ByteIOContext *bc, uint64_t val)
-{
- int i;
-
- val &= 0x7FFFFFFFFFFFFFFFULL; // FIXME can only encode upto 63 bits currently
- i= get_length(val);
-
- for (i-=7; i>0; i-=7){
- put_byte(bc, 0x80 | (val>>i));
- }
-
- put_byte(bc, val&0x7f);
-}
-
-/**
- * stores a string as vb.
- */
-static void put_str(ByteIOContext *bc, const char *string){
- int len= strlen(string);
-
- put_v(bc, len);
- put_buffer(bc, string, len);
-}
-
-static void put_vb(ByteIOContext *bc, uint64_t val){
- int i;
-
- for (i=8; val>>i; i+=8);
-
- put_v(bc, i>>3);
- for(i-=8; i>=0; i-=8)
- put_byte(bc, (val>>i)&0xFF);
-}
-
-static int put_packetheader(NUTContext *nut, ByteIOContext *bc, int max_size, int calculate_checksum)
-{
- put_flush_packet(bc);
- nut->last_packet_start= nut->packet_start;
- nut->packet_start+= nut->written_packet_size;
- nut->packet_size_pos = url_ftell(bc);
- nut->written_packet_size = max_size;
-
- if(calculate_checksum)
- init_checksum(bc, update_adler32, 0);
-
- /* packet header */
- put_v(bc, nut->written_packet_size); /* forward ptr */
- put_v(bc, nut->packet_start - nut->last_packet_start); /* backward ptr */
-
- return 0;
-}
-
-static int update_packetheader(NUTContext *nut, ByteIOContext *bc, int additional_size, int calculate_checksum){
- int64_t start= nut->packet_start;
- int64_t cur= url_ftell(bc);
- int size= cur - start + additional_size;
-
- if(calculate_checksum)
- size += 4;
-
- if(size != nut->written_packet_size){
- int i;
-
- assert( size <= nut->written_packet_size );
-
- url_fseek(bc, nut->packet_size_pos, SEEK_SET);
- for(i=get_length(size); i < get_length(nut->written_packet_size); i+=7)
- put_byte(bc, 0x80);
- put_v(bc, size);
-
- url_fseek(bc, cur, SEEK_SET);
- nut->written_packet_size= size; //FIXME may fail if multiple updates with differing sizes, as get_length may differ
-
- if(calculate_checksum)
- put_be32(bc, get_checksum(bc));
- }
-
- return 0;
-}
-
-static int nut_write_header(AVFormatContext *s)
-{
- NUTContext *nut = s->priv_data;
- ByteIOContext *bc = &s->pb;
- AVCodecContext *codec;
- int i, j;
-
- nut->avf= s;
-
- nut->stream =
- av_mallocz(sizeof(StreamContext)*s->nb_streams);
-
- av_set_pts_info(s, 60, 1, AV_TIME_BASE);
-
- /* main header */
- put_be64(bc, MAIN_STARTCODE);
- put_packetheader(nut, bc, 120+5*256, 1);
- put_v(bc, 1); /* version */
- put_v(bc, s->nb_streams);
- put_v(bc, 3);
-
- build_frame_code(s);
- assert(nut->frame_code['N'].flags == 1);
- for(i=0; i<256;){
- int tmp_flags = nut->frame_code[i].flags;
- int tmp_stream= nut->frame_code[i].stream_id_plus1;
- int tmp_mul = nut->frame_code[i].size_mul;
- int tmp_size = nut->frame_code[i].size_lsb;
- put_v(bc, tmp_flags);
- put_v(bc, tmp_stream);
- put_v(bc, tmp_mul);
- put_v(bc, tmp_size);
-
- for(j=0; i<256; j++,i++){
- if(nut->frame_code[i].flags != tmp_flags ) break;
- if(nut->frame_code[i].stream_id_plus1 != tmp_stream) break;
- if(nut->frame_code[i].size_mul != tmp_mul ) break;
- if(nut->frame_code[i].size_lsb != tmp_size ) break;
- if(++tmp_size >= tmp_mul){
- tmp_size=0;
- tmp_stream++;
- }
- }
- put_v(bc, j);
- }
-
- update_packetheader(nut, bc, 0, 1);
-
- /* stream headers */
- for (i = 0; i < s->nb_streams; i++)
- {
- int nom, denom, gcd;
-
- codec = &s->streams[i]->codec;
-
- put_be64(bc, STREAM_STARTCODE);
- put_packetheader(nut, bc, 120 + codec->extradata_size, 1);
- put_v(bc, i /*s->streams[i]->index*/);
- put_v(bc, (codec->codec_type == CODEC_TYPE_AUDIO) ? 32 : 0);
- if (codec->codec_tag)
- put_vb(bc, codec->codec_tag);
- else if (codec->codec_type == CODEC_TYPE_VIDEO)
- {
- put_vb(bc, codec_get_bmp_tag(codec->codec_id));
- }
- else if (codec->codec_type == CODEC_TYPE_AUDIO)
- {
- put_vb(bc, codec_get_wav_tag(codec->codec_id));
- }
- else
- put_vb(bc, 0);
-
- if (codec->codec_type == CODEC_TYPE_VIDEO)
- {
- nom = codec->frame_rate;
- denom = codec->frame_rate_base;
- }
- else
- {
- nom = codec->sample_rate;
- if(codec->frame_size>0)
- denom= codec->frame_size;
- else
- denom= 1; //unlucky
- }
- gcd= ff_gcd(nom, denom);
- nom /= gcd;
- denom /= gcd;
- nut->stream[i].rate_num= nom;
- nut->stream[i].rate_den= denom;
-
- put_v(bc, codec->bit_rate);
- put_vb(bc, 0); /* no language code */
- put_v(bc, nom);
- put_v(bc, denom);
- if(nom / denom < 1000)
- nut->stream[i].msb_timestamp_shift = 7;
- else
- nut->stream[i].msb_timestamp_shift = 14;
- put_v(bc, nut->stream[i].msb_timestamp_shift);
- for(j=0; j<3; j++)
- put_v(bc, nut->stream[i].initial_pts_predictor[j]);
- for(j=0; j<2; j++)
- put_v(bc, nut->stream[i].initial_size_predictor[j]);
- put_byte(bc, 0); /* flags: 0x1 - fixed_fps, 0x2 - index_present */
-
- if(codec->extradata_size){
- put_v(bc, 1);
- put_v(bc, codec->extradata_size);
- put_buffer(bc, codec->extradata, codec->extradata_size);
- }
- put_v(bc, 0); /* end of codec specific headers */
-
- switch(codec->codec_type)
- {
- case CODEC_TYPE_AUDIO:
- put_v(bc, (codec->sample_rate * denom) / nom);
- put_v(bc, codec->channels);
- break;
- case CODEC_TYPE_VIDEO:
- put_v(bc, codec->width);
- put_v(bc, codec->height);
- put_v(bc, codec->sample_aspect_ratio.num);
- put_v(bc, codec->sample_aspect_ratio.den);
- put_v(bc, 0); /* csp type -- unknown */
- break;
- default:
- break;
- }
- update_packetheader(nut, bc, 0, 1);
- }
-
- /* info header */
- put_be64(bc, INFO_STARTCODE);
- put_packetheader(nut, bc, 30+strlen(s->author)+strlen(s->title)+
- strlen(s->comment)+strlen(s->copyright)+strlen(LIBAVFORMAT_IDENT), 1);
- if (s->author[0])
- {
- put_v(bc, 9); /* type */
- put_str(bc, s->author);
- }
- if (s->title[0])
- {
- put_v(bc, 10); /* type */
- put_str(bc, s->title);
- }
- if (s->comment[0])
- {
- put_v(bc, 11); /* type */
- put_str(bc, s->comment);
- }
- if (s->copyright[0])
- {
- put_v(bc, 12); /* type */
- put_str(bc, s->copyright);
- }
- /* encoder */
- put_v(bc, 13); /* type */
- put_str(bc, LIBAVFORMAT_IDENT);
-
- put_v(bc, 0); /* eof info */
- update_packetheader(nut, bc, 0, 1);
-
- put_flush_packet(bc);
-
- return 0;
-}
-
-static int nut_write_packet(AVFormatContext *s, int stream_index,
- const uint8_t *buf, int size, int64_t pts)
-{
- NUTContext *nut = s->priv_data;
- StreamContext *stream= &nut->stream[stream_index];
- ByteIOContext *bc = &s->pb;
- int key_frame = 0, full_pts=0;
- AVCodecContext *enc;
- int64_t lsb_pts, delta_pts;
- int frame_type, best_length, frame_code, flags, i, size_mul, size_lsb;
- const int64_t frame_start= url_ftell(bc);
-
- if (stream_index > s->nb_streams)
- return 1;
-
- pts= (av_rescale(pts, stream->rate_num, stream->rate_den) + AV_TIME_BASE/2) / AV_TIME_BASE;
-
- enc = &s->streams[stream_index]->codec;
- key_frame = enc->coded_frame->key_frame;
- delta_pts= pts - stream->last_pts;
-
- frame_type=0;
- if(frame_start + size + 20 - FFMAX(nut->last_frame_start[1], nut->last_frame_start[2]) > MAX_TYPE1_DISTANCE)
- frame_type=1;
- if(key_frame){
- if(frame_type==1 && frame_start + size - nut->last_frame_start[2] > MAX_TYPE2_DISTANCE)
- frame_type=2;
- if(!stream->last_key_frame)
- frame_type=2;
- }
-
- if(frame_type>0){
- update_packetheader(nut, bc, 0, 0);
- reset(s);
- full_pts=1;
- }
- //FIXME ensure that the timestamp can be represented by either delta or lsb or full_pts=1
-
- lsb_pts = pts & ((1 << stream->msb_timestamp_shift)-1);
-
- best_length=INT_MAX;
- frame_code= -1;
- for(i=0; i<256; i++){
- int stream_id_plus1= nut->frame_code[i].stream_id_plus1;
- int fc_key_frame= stream->last_key_frame;
- int length=0;
- size_mul= nut->frame_code[i].size_mul;
- size_lsb= nut->frame_code[i].size_lsb;
- flags= nut->frame_code[i].flags;
-
- if(stream_id_plus1 == 0) length+= get_length(stream_index);
- else if(stream_id_plus1 - 1 != stream_index)
- continue;
- if(flags & FLAG_PRED_KEY_FRAME){
- if(flags & FLAG_KEY_FRAME)
- fc_key_frame= !fc_key_frame;
- }else{
- fc_key_frame= !!(flags & FLAG_KEY_FRAME);
- }
- assert(key_frame==0 || key_frame==1);
- if(fc_key_frame != key_frame)
- continue;
-
- if((!!(flags & FLAG_FRAME_TYPE)) != (frame_type > 0))
- continue;
-
- if(size_mul <= size_lsb){
- int p= stream->lru_size[size_lsb - size_mul];
- if(p != size)
- continue;
- }else{
- if(size % size_mul != size_lsb)
- continue;
- if(flags & FLAG_DATA_SIZE)
- length += get_length(size / size_mul);
- else if(size/size_mul)
- continue;
- }
-
- if(full_pts != ((flags & FLAG_PTS) && (flags & FLAG_FULL_PTS)))
- continue;
-
- if(flags&FLAG_PTS){
- if(flags&FLAG_FULL_PTS){
- length += get_length(pts);
- }else{
- length += get_length(lsb_pts);
- }
- }else{
- int delta= stream->lru_pts_delta[(flags & 12)>>2];
- if(delta != pts - stream->last_pts)
- continue;
- assert(frame_type == 0);
- }
-
- if(length < best_length){
- best_length= length;
- frame_code=i;
- }
-// av_log(s, AV_LOG_DEBUG, "%d %d %d %d %d %d %d %d %d %d\n", key_frame, frame_type, full_pts, size, stream_index, flags, size_mul, size_lsb, stream_id_plus1, length);
- }
-
- assert(frame_code != -1);
- flags= nut->frame_code[frame_code].flags;
- size_mul= nut->frame_code[frame_code].size_mul;
- size_lsb= nut->frame_code[frame_code].size_lsb;
-#if 0
- best_length /= 7;
- best_length ++; //frame_code
- if(frame_type>0){
- best_length += 4; //packet header
- if(frame_type>1)
- best_length += 8; // startcode
- }
- av_log(s, AV_LOG_DEBUG, "kf:%d ft:%d pt:%d fc:%2X len:%2d size:%d stream:%d flag:%d mul:%d lsb:%d s+1:%d pts_delta:%d\n", key_frame, frame_type, full_pts ? 2 : ((flags & FLAG_PTS) ? 1 : 0), frame_code, best_length, size, stream_index, flags, size_mul, size_lsb, nut->frame_code[frame_code].stream_id_plus1,(int)(pts - stream->last_pts));
-#endif
-
- if (frame_type==2)
- put_be64(bc, KEYFRAME_STARTCODE);
- put_byte(bc, frame_code);
-
- if(frame_type>0)
- put_packetheader(nut, bc, FFMAX(size+20, MAX_TYPE1_DISTANCE), 0);
- if(nut->frame_code[frame_code].stream_id_plus1 == 0)
- put_v(bc, stream_index);
- if (flags & FLAG_PTS){
- if (flags & FLAG_FULL_PTS)
- put_v(bc, pts);
- else
- put_v(bc, lsb_pts);
- }
- if(flags & FLAG_DATA_SIZE)
- put_v(bc, size / size_mul);
- if(size > MAX_TYPE1_DISTANCE){
- assert(frame_type > 0);
- update_packetheader(nut, bc, size, 0);
- }
-
- put_buffer(bc, buf, size);
-
- update(nut, stream_index, frame_start, frame_type, frame_code, key_frame, size, pts);
-
- return 0;
-}
-
-static int nut_write_trailer(AVFormatContext *s)
-{
- NUTContext *nut = s->priv_data;
- ByteIOContext *bc = &s->pb;
-
- update_packetheader(nut, bc, 0, 0);
+const AVCodecTag ff_nut_video_tags[] = {
+ { CODEC_ID_RAWVIDEO, MKTAG('R', 'G', 'B', 15 ) },
+ { CODEC_ID_RAWVIDEO, MKTAG('B', 'G', 'R', 15 ) },
+ { CODEC_ID_RAWVIDEO, MKTAG('R', 'G', 'B', 16 ) },
+ { CODEC_ID_RAWVIDEO, MKTAG('B', 'G', 'R', 16 ) },
+ { CODEC_ID_RAWVIDEO, MKTAG(15 , 'B', 'G', 'R') },
+ { CODEC_ID_RAWVIDEO, MKTAG(15 , 'R', 'G', 'B') },
+ { CODEC_ID_RAWVIDEO, MKTAG(16 , 'B', 'G', 'R') },
+ { CODEC_ID_RAWVIDEO, MKTAG(16 , 'R', 'G', 'B') },
+ { CODEC_ID_RAWVIDEO, MKTAG('R', 'G', 'B', 12 ) },
+ { CODEC_ID_RAWVIDEO, MKTAG('B', 'G', 'R', 12 ) },
+ { CODEC_ID_RAWVIDEO, MKTAG(12 , 'B', 'G', 'R') },
+ { CODEC_ID_RAWVIDEO, MKTAG(12 , 'R', 'G', 'B') },
+ { CODEC_ID_RAWVIDEO, MKTAG('R', 'G', 'B', 'A') },
+ { CODEC_ID_RAWVIDEO, MKTAG('B', 'G', 'R', 'A') },
+ { CODEC_ID_RAWVIDEO, MKTAG('A', 'B', 'G', 'R') },
+ { CODEC_ID_RAWVIDEO, MKTAG('A', 'R', 'G', 'B') },
+ { CODEC_ID_RAWVIDEO, MKTAG('R', 'G', 'B', 24 ) },
+ { CODEC_ID_RAWVIDEO, MKTAG('B', 'G', 'R', 24 ) },
+ { CODEC_ID_RAWVIDEO, MKTAG('4', '1', '1', 'P') },
+ { CODEC_ID_RAWVIDEO, MKTAG('4', '2', '2', 'P') },
+ { CODEC_ID_RAWVIDEO, MKTAG('4', '2', '2', 'P') },
+ { CODEC_ID_RAWVIDEO, MKTAG('4', '4', '0', 'P') },
+ { CODEC_ID_RAWVIDEO, MKTAG('4', '4', '0', 'P') },
+ { CODEC_ID_RAWVIDEO, MKTAG('4', '4', '4', 'P') },
+ { CODEC_ID_RAWVIDEO, MKTAG('4', '4', '4', 'P') },
+ { CODEC_ID_RAWVIDEO, MKTAG('B', '1', 'W', '0') },
+ { CODEC_ID_RAWVIDEO, MKTAG('B', '0', 'W', '1') },
+ { CODEC_ID_RAWVIDEO, MKTAG('B', 'G', 'R', 8 ) },
+ { CODEC_ID_RAWVIDEO, MKTAG('R', 'G', 'B', 8 ) },
+ { CODEC_ID_RAWVIDEO, MKTAG('B', 'G', 'R', 4 ) },
+ { CODEC_ID_RAWVIDEO, MKTAG('R', 'G', 'B', 4 ) },
+ { CODEC_ID_RAWVIDEO, MKTAG('B', '4', 'B', 'Y') },
+ { CODEC_ID_RAWVIDEO, MKTAG('R', '4', 'B', 'Y') },
+ { CODEC_ID_RAWVIDEO, MKTAG('B', 'G', 'R', 48 ) },
+ { CODEC_ID_RAWVIDEO, MKTAG('R', 'G', 'B', 48 ) },
+ { CODEC_ID_RAWVIDEO, MKTAG(48 , 'B', 'G', 'R') },
+ { CODEC_ID_RAWVIDEO, MKTAG(48 , 'R', 'G', 'B') },
+ { CODEC_ID_RAWVIDEO, MKTAG('Y', '1', 0 , 16 ) },
+ { CODEC_ID_RAWVIDEO, MKTAG(16 , 0 , '1', 'Y') },
+ { CODEC_ID_RAWVIDEO, MKTAG('Y', '3', 11 , 16 ) },
+ { CODEC_ID_RAWVIDEO, MKTAG(16 , 11 , '3', 'Y') },
+ { CODEC_ID_RAWVIDEO, MKTAG('Y', '3', 10 , 16 ) },
+ { CODEC_ID_RAWVIDEO, MKTAG(16 , 10 , '3', 'Y') },
+ { CODEC_ID_RAWVIDEO, MKTAG('Y', '3', 0 , 16 ) },
+ { CODEC_ID_RAWVIDEO, MKTAG(16 , 0 , '3', 'Y') },
+ { CODEC_ID_RAWVIDEO, MKTAG('Y', '4', 11 , 8 ) },
+ { CODEC_ID_RAWVIDEO, MKTAG('Y', '2', 0 , 8 ) },
+ { CODEC_ID_NONE , 0 }
+};