66 |
******************************************************************************/ |
******************************************************************************/ |
67 |
|
|
68 |
|
|
69 |
|
#include <string.h> |
70 |
#include "bitstream.h" |
#include "bitstream.h" |
71 |
#include "zigzag.h" |
#include "zigzag.h" |
72 |
#include "../quant/quant_matrix.h" |
#include "../quant/quant_matrix.h" |
848 |
return coding_type; |
return coding_type; |
849 |
|
|
850 |
} else if (start_code == USERDATA_START_CODE) { |
} else if (start_code == USERDATA_START_CODE) { |
851 |
|
char tmp[256]; |
852 |
DPRINTF(DPRINTF_STARTCODE, "<user_data>"); |
int i; |
853 |
|
|
854 |
BitstreamSkip(bs, 32); // user_data_start_code |
BitstreamSkip(bs, 32); // user_data_start_code |
855 |
|
|
856 |
|
tmp[0] = BitstreamShowBits(bs, 8); |
857 |
|
|
858 |
|
for(i = 1; i < 256; i++){ |
859 |
|
tmp[i] = (BitstreamShowBits(bs, 16) & 0xFF); |
860 |
|
|
861 |
|
if(tmp[i] == 0) |
862 |
|
break; |
863 |
|
|
864 |
|
BitstreamSkip(bs, 8); |
865 |
|
} |
866 |
|
|
867 |
|
DPRINTF(DPRINTF_STARTCODE, "<user_data>: %s\n", tmp); |
868 |
|
|
869 |
|
if(strncmp(tmp, "DivX501b481p", 12) == 0) { |
870 |
|
dec->packed_mode = 1; |
871 |
|
DPRINTF(DPRINTF_STARTCODE, "packed_mode = %d\n", dec->packed_mode); |
872 |
|
|
873 |
|
} |
874 |
} else // start_code == ? |
} else // start_code == ? |
875 |
{ |
{ |
876 |
if (BitstreamShowBits(bs, 24) == 0x000001) { |
if (BitstreamShowBits(bs, 24) == 0x000001) { |