| OLD | NEW |
| 1 /* | 1 /* |
| 2 * RAW muxer and demuxer | 2 * RAW muxer and demuxer |
| 3 * Copyright (c) 2001 Fabrice Bellard | 3 * Copyright (c) 2001 Fabrice Bellard |
| 4 * Copyright (c) 2005 Alex Beregszaszi | 4 * Copyright (c) 2005 Alex Beregszaszi |
| 5 * | 5 * |
| 6 * This file is part of FFmpeg. | 6 * This file is part of FFmpeg. |
| 7 * | 7 * |
| 8 * FFmpeg is free software; you can redistribute it and/or | 8 * FFmpeg is free software; you can redistribute it and/or |
| 9 * modify it under the terms of the GNU Lesser General Public | 9 * modify it under the terms of the GNU Lesser General Public |
| 10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
| (...skipping 479 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 490 int i; | 490 int i; |
| 491 int valid_psc=0; | 491 int valid_psc=0; |
| 492 int invalid_psc=0; | 492 int invalid_psc=0; |
| 493 int next_gn=0; | 493 int next_gn=0; |
| 494 int src_fmt=0; | 494 int src_fmt=0; |
| 495 GetBitContext gb; | 495 GetBitContext gb; |
| 496 | 496 |
| 497 init_get_bits(&gb, p->buf, p->buf_size*8); | 497 init_get_bits(&gb, p->buf, p->buf_size*8); |
| 498 | 498 |
| 499 for(i=0; i<p->buf_size*8; i++){ | 499 for(i=0; i<p->buf_size*8; i++){ |
| 500 code = (code<<1) + get_bits1(&gb); | 500 if ((code & 0x01ff0000) || !(code & 0xff00)) { |
| 501 code = (code<<8) + get_bits(&gb, 8); |
| 502 i += 7; |
| 503 } else |
| 504 code = (code<<1) + get_bits1(&gb); |
| 501 if ((code & 0xffff0000) == 0x10000) { | 505 if ((code & 0xffff0000) == 0x10000) { |
| 502 int gn= (code>>12)&0xf; | 506 int gn= (code>>12)&0xf; |
| 503 if(!gn) | 507 if(!gn) |
| 504 src_fmt= code&8; | 508 src_fmt= code&8; |
| 505 if(gn != next_gn) invalid_psc++; | 509 if(gn != next_gn) invalid_psc++; |
| 506 else valid_psc++; | 510 else valid_psc++; |
| 507 | 511 |
| 508 if(src_fmt){ // CIF | 512 if(src_fmt){ // CIF |
| 509 next_gn= (gn+1 )%13; | 513 next_gn= (gn+1 )%13; |
| 510 }else{ //QCIF | 514 }else{ //QCIF |
| (...skipping 839 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1350 LE_DEF("uw"), CODEC_ID_PCM_U16LE) | 1354 LE_DEF("uw"), CODEC_ID_PCM_U16LE) |
| 1351 | 1355 |
| 1352 PCMDEF(u8, "PCM unsigned 8 bit format", | 1356 PCMDEF(u8, "PCM unsigned 8 bit format", |
| 1353 "ub", CODEC_ID_PCM_U8) | 1357 "ub", CODEC_ID_PCM_U8) |
| 1354 | 1358 |
| 1355 PCMDEF(alaw, "PCM A-law format", | 1359 PCMDEF(alaw, "PCM A-law format", |
| 1356 "al", CODEC_ID_PCM_ALAW) | 1360 "al", CODEC_ID_PCM_ALAW) |
| 1357 | 1361 |
| 1358 PCMDEF(mulaw, "PCM mu-law format", | 1362 PCMDEF(mulaw, "PCM mu-law format", |
| 1359 "ul", CODEC_ID_PCM_MULAW) | 1363 "ul", CODEC_ID_PCM_MULAW) |
| OLD | NEW |