• Home
  • Raw
  • Download

Lines Matching refs:binarydata

28 def convertto24bit(binarydata):  argument
30 if (binarydata[14]==2):
32 binarydata[14]=4
33 elif (binarydata[14]==4):
43 if (binarydata[i]==2):
44 binarydata[i]=4
45 elif (binarydata[14]==4):
52 for i in range(21,len(binarydata)-1):
53 if (binarydata[i]==17):
54 if (binarydata[i+1]==0):
55 binarydata[i]=53
56 if (binarydata[i+1]==1):
57 binarydata[i]=53
58 if (binarydata[i+1]==2):
59 binarydata[i]=53
60 if (binarydata[i+1]==3):
61 binarydata[i]=53
62 if (binarydata[i]==16):
63 if (binarydata[i+1]==5):
64 binarydata[i]=52
65 if (binarydata[i+1]==4):
66 binarydata[i]=52
68 crc=Generate_CRC(binarydata)
69 binarydata[len(binarydata)-1]=crc
73 def detectbitpersample(binarydata): argument
75 if (binarydata[14]==4):
77 elif (binarydata[14]==2):
82 def convertto16bit(binarydata): argument
84 if (binarydata[14]==4):
86 binarydata[14]=2
87 elif (binarydata[14]==2):
97 if (binarydata[i]==4):
98 binarydata[i]=2
99 elif (binarydata[14]==2):
106 for i in range(21,len(binarydata)-1):
107 if (binarydata[i]==53):
108 if (binarydata[i+1]==0):
109 binarydata[i]=17
110 if (binarydata[i+1]==1):
111 binarydata[i]=17
112 if (binarydata[i+1]==2):
113 binarydata[i]=17
114 if (binarydata[i+1]==3):
115 binarydata[i]=17
116 if (binarydata[i]==52):
117 if (binarydata[i+1]==5):
118 binarydata[i]=16
119 if (binarydata[i+1]==4):
120 binarydata[i]=16
122 crc=Generate_CRC(binarydata)
123 binarydata[len(binarydata)-1]=crc
128 binarydata=array.array(arrayelementsize)
137 binarydata.fromfile(file,arraysize)
155 detectbitpersample(binarydata)
158 result=convertto16bit(binarydata)
164 result=convertto24bit(binarydata)
177 for i in range(len(binarydata)-1):
178 fileo.write(str(binarydata[i])+', ')
180 fileo.write(str(binarydata[len(binarydata)-1])+'\n\n\n\n')
198 binarydata.tofile(fileo)