mirror of https://bitbucket.org/ausocean/av.git
codec/mjpeg: renamed putBuffer.putBuf to putBytes
This commit is contained in:
parent
4c04cc033a
commit
423a5c12c4
|
@ -263,7 +263,7 @@ func writeHeader(p *putBuffer, _type, width, height, nbqTab, dri int, qtable []b
|
||||||
mark(p, codeAPP0)
|
mark(p, codeAPP0)
|
||||||
p.put16(16)
|
p.put16(16)
|
||||||
const jfifLabel = "JFIF\000"
|
const jfifLabel = "JFIF\000"
|
||||||
p.putBuf([]byte(jfifLabel))
|
p.putBytes([]byte(jfifLabel))
|
||||||
p.put16(0x0201)
|
p.put16(0x0201)
|
||||||
p.put8(0)
|
p.put8(0)
|
||||||
p.put16(1)
|
p.put16(1)
|
||||||
|
@ -287,7 +287,7 @@ func writeHeader(p *putBuffer, _type, width, height, nbqTab, dri int, qtable []b
|
||||||
|
|
||||||
for i := 0; i < nbqTab; i++ {
|
for i := 0; i < nbqTab; i++ {
|
||||||
p.put8(uint8(i))
|
p.put8(uint8(i))
|
||||||
p.putBuf(qtable[64*i : (64*i)+64])
|
p.putBytes(qtable[64*i : (64*i)+64])
|
||||||
}
|
}
|
||||||
|
|
||||||
// Define huffman table.
|
// Define huffman table.
|
||||||
|
@ -360,8 +360,8 @@ func writeHuffman(p *putBuffer, class, id int, bits, values []byte) {
|
||||||
n += int(bits[i])
|
n += int(bits[i])
|
||||||
}
|
}
|
||||||
|
|
||||||
p.putBuf(bits[1:17])
|
p.putBytes(bits[1:17])
|
||||||
p.putBuf(values[0:n])
|
p.putBytes(values[0:n])
|
||||||
}
|
}
|
||||||
|
|
||||||
// defaultQTable returns a default quantization table.
|
// defaultQTable returns a default quantization table.
|
||||||
|
|
|
@ -58,7 +58,7 @@ func (p *putBuffer) put8(v uint8) {
|
||||||
p.len++
|
p.len++
|
||||||
}
|
}
|
||||||
|
|
||||||
func (p *putBuffer) putBuf(src []byte) {
|
func (p *putBuffer) putBytes(src []byte) {
|
||||||
copy(p.bytes[p.len:], src)
|
copy(p.bytes[p.len:], src)
|
||||||
p.len += len(src)
|
p.len += len(src)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue