1 use nihav_core::codecs::*;
2 use nihav_core::io::byteio::*;
3 use nihav_core::io::bitreader::*;
4 use nihav_core::io::intcode::*;
6 const MAX_SAMPLES: usize = 32768;
8 #[derive(Clone,Copy,PartialEq)]
26 residues: [Vec<i32>; 8],
29 fn decode_partition(br: &mut BitReader, dst: &mut [i32], k: u8) -> DecoderResult<()> {
30 for el in dst.iter_mut() {
31 let val = br.read_code(UintCodeType::Rice(k))?;
33 *el = (val >> 1) as i32;
35 *el = -(((val + 1) >> 1) as i32);
41 fn decode_residual(br: &mut BitReader, dst: &mut [i32], order: usize) -> DecoderResult<()> {
42 let mode = br.read(2)?;
44 let rice_k = if mode == 0 { 4 } else { 5 };
45 let esc = (1 << rice_k) - 1;
47 let num_partitions = 1 << br.read(4)?;
48 let tot_size = dst.len() + order;
49 validate!((tot_size % num_partitions) == 0);
50 let psize = tot_size / num_partitions;
51 validate!(psize >= order);
52 let mut off = psize - order;
53 let k = br.read(rice_k)? as u8;
55 decode_partition(br, &mut dst[..off], k)?;
57 let bits = br.read(5)? as u8;
58 for el in dst.iter_mut().take(off) {
59 *el = br.read_s(bits)?;
62 for _ in 1..num_partitions {
63 let k = br.read(rice_k)? as u8;
65 decode_partition(br, &mut dst[off..][..psize], k)?;
67 let bits = br.read(5)? as u8;
68 for el in dst[off..].iter_mut().take(psize) {
69 *el = br.read_s(bits)?;
78 fn apply_fixed_predictor(dst: &mut [i32], order: usize) {
81 let mut last = dst[0];
82 for el in dst.iter_mut().skip(1) {
88 let mut last0 = dst[1];
89 let mut last1 = last0 - dst[0];
90 for el in dst.iter_mut().skip(2) {
97 let mut last0 = dst[2];
98 let mut last1 = last0 - dst[1];
99 let mut last2 = last1 - dst[1] + dst[0];
100 for el in dst.iter_mut().skip(3) {
108 let mut last0 = dst[3];
109 let mut last1 = last0 - dst[2];
110 let mut last2 = last1 - dst[2] + dst[1];
111 let mut last3 = last2 - dst[2] + 2 * dst[1] - dst[0];
112 for el in dst.iter_mut().skip(4) {
124 fn apply_lpc(dst: &mut [i32], filt: &[i32; 32], order: usize, shift: u8) {
125 for i in order..dst.len() {
127 for (coef, filt) in dst[i - order..].iter().take(order).zip(filt.iter()) {
128 sum += i64::from(*coef) * i64::from(*filt);
130 dst[i] += (sum >> shift) as i32;
137 ainfo: NAAudioInfo::new(0, 1, SND_S16P_FORMAT, 0),
138 chmap: NAChannelMap::new(),
146 residues: [vec![0; MAX_SAMPLES], vec![0; MAX_SAMPLES],
147 vec![0; MAX_SAMPLES], vec![0; MAX_SAMPLES],
148 vec![0; MAX_SAMPLES], vec![0; MAX_SAMPLES],
149 vec![0; MAX_SAMPLES], vec![0; MAX_SAMPLES]],
152 fn apply_chmod(&mut self, blocksize: usize, chmod: StereoMode) {
154 StereoMode::Normal => {},
155 StereoMode::LeftSide => {
156 for i in 0..blocksize {
157 self.residues[1][i] = self.residues[0][i].wrapping_sub(self.residues[1][i]);
160 StereoMode::SideRight => {
161 for i in 0..blocksize {
162 self.residues[0][i] = self.residues[0][i].wrapping_add(self.residues[1][i]);
165 StereoMode::MidSide => {
166 for i in 0..blocksize {
167 let r = self.residues[0][i].wrapping_sub(self.residues[1][i] >> 1);
168 self.residues[0][i] = self.residues[1][i].wrapping_add(r);
169 self.residues[1][i] = r;
174 fn decode_subframe(&mut self, br: &mut BitReader, channel: usize, blocksize: usize, mut samp_bits: u8) -> DecoderResult<()> {
175 let marker = br.read(1)?;
176 validate!(marker == 0);
177 let sftype = br.read(6)?;
180 let nbits = br.read_code(UintCodeType::UnaryZeroes)?;
181 validate!(nbits < 32 && samp_bits > nbits as u8);
182 samp_bits -= nbits as u8;
185 let dst = &mut self.residues[channel][..blocksize];
188 let val = br.read_s(samp_bits)?;
189 for el in dst.iter_mut() {
194 for el in dst.iter_mut() {
195 *el = br.read_s(samp_bits)?;
199 let order = (sftype - 0x08) as usize;
200 for el in dst.iter_mut().take(order) {
201 *el = br.read_s(samp_bits)?;
203 decode_residual(br, &mut dst[order..], order)?;
205 apply_fixed_predictor(dst, order);
209 let order = (sftype - 0x20) as usize + 1;
210 for el in dst.iter_mut().take(order) {
211 *el = br.read_s(samp_bits)?;
213 let precision = br.read(4)? as u8 + 1;
214 validate!(precision < 16);
215 let shift = br.read(5)? as u8;
216 let mut filter = [0i32; 32];
217 for el in filter[..order].iter_mut().rev() {
218 *el = br.read_s(precision)?;
220 decode_residual(br, &mut dst[order..], order)?;
221 apply_lpc(dst, &filter, order, shift);
223 _ => return Err(DecoderError::InvalidData),
230 impl NADecoder for FlacDecoder {
231 fn init(&mut self, _supp: &mut NADecoderSupport, info: NACodecInfoRef) -> DecoderResult<()> {
232 const DEFAULT_CHANNEL_MAPS: [&str; 8] = [
239 "L,R,C,LFE,Cs,Ls,Rs",
240 "L,R,C,LFE,Ls,Rs,Lss,Rss"
242 if let NACodecTypeInfo::Audio(_ainfo) = info.get_properties() {
243 if let Some(buf) = info.get_extradata() {
244 validate!(buf.len() >= 22);
246 let mut mr = MemoryReader::new_read(&buf);
247 let mut br = ByteReader::new(&mut mr);
249 self.min_blk_size = br.read_u16be()? as usize;
250 self.max_blk_size = br.read_u16be()? as usize;
251 self.min_frm_size = br.read_u24be()? as usize;
252 self.max_frm_size = br.read_u24be()? as usize;
253 let tmp = br.read_u64be()?;
254 self.srate = (tmp >> 44) as u32;
255 self.channels = (((tmp >> 41) & 7) + 1) as u8;
256 self.bits = (((tmp >> 36) & 0x1F) + 1) as u8;
257 //let tot_samples = tmp & ((1 << 36) - 1);
259 self.chmap = NAChannelMap::from_str(DEFAULT_CHANNEL_MAPS[(self.channels - 1) as usize]).unwrap();
260 let fmt = match self.bits {
261 8 | 12 | 16 => SND_S16P_FORMAT,
262 24 => SND_S32P_FORMAT,
263 _ => return Err(DecoderError::NotImplemented),
266 self.ainfo = NAAudioInfo::new(self.srate, self.channels as u8, fmt, self.max_blk_size.max(1));
269 Err(DecoderError::InvalidData)
272 Err(DecoderError::InvalidData)
275 fn decode(&mut self, _supp: &mut NADecoderSupport, pkt: &NAPacket) -> DecoderResult<NAFrameRef> {
276 let info = pkt.get_stream().get_info();
277 if let NACodecTypeInfo::Audio(_) = info.get_properties() {
278 let pktbuf = pkt.get_buffer();
279 validate!(pktbuf.len() >= 9.max(self.min_frm_size));
281 let ref_crc = read_u16be(&pktbuf[pktbuf.len() - 2..]).unwrap_or(0);
283 for el in pktbuf.iter().take(pktbuf.len() - 2) {
284 crc = update_crc16(crc, *el);
287 return Err(DecoderError::ChecksumError);
290 let mut br = BitReader::new(&pktbuf, BitReaderMode::BE);
292 let sync = br.read(14)?;
293 validate!(sync == 0x3FFE);
295 let _blocking = br.read(1)?;
296 let bsize_idx = br.read(4)?;
297 let srate_idx = br.read(4)?;
298 let chan_idx = br.read(4)?;
299 let bits_idx = br.read(3)?;
301 // UTF-8 encoded block or sample number
302 let byte = br.read(8)? as u8;
303 let len = (!byte).leading_zeros();
304 validate!(len <= 5 && len != 1);
307 let byte = br.read(8)?;
308 validate!((byte & 0xC0) == 0x80);
311 let blocksize = match bsize_idx {
312 0 => return Err(DecoderError::InvalidData),
314 2..=5 => 576 << (bsize_idx - 2),
315 6 => br.read(8)? as usize + 1,
316 7 => br.read(16)? as usize + 1,
317 _ => 256 << (bsize_idx - 8),
319 let srate = match srate_idx {
332 12 => br.read(8)? * 1000,
334 14 => br.read(16)? * 10,
335 _ => return Err(DecoderError::InvalidData),
337 validate!(srate != 0 && srate == self.srate);
338 let (channels, chmod) = match chan_idx {
339 0..=7 => (chan_idx as u8 + 1, StereoMode::Normal),
340 8 => (2, StereoMode::LeftSide),
341 9 => (2, StereoMode::SideRight),
342 10 => (2, StereoMode::MidSide),
343 _ => return Err(DecoderError::InvalidData),
345 validate!(channels == self.channels);
346 let bits = match bits_idx {
353 _ => return Err(DecoderError::InvalidData),
355 validate!(bits == self.bits);
357 let end = br.tell() / 8;
358 let ref_crc = br.read(8)? as u8;
360 for el in pktbuf.iter().take(end) {
361 crc = update_crc8(crc, *el);
364 return Err(DecoderError::ChecksumError);
367 for ch in 0..(channels as usize) {
368 let samp_bits = match (chmod, ch) {
369 (StereoMode::LeftSide, 1) |
370 (StereoMode::SideRight, 0) |
371 (StereoMode::MidSide, 1) => self.bits + 1,
374 validate!(samp_bits <= 32);
375 self.decode_subframe(&mut br, ch, blocksize, samp_bits)?;
378 self.apply_chmod(blocksize, chmod);
381 let mut abuf = alloc_audio_buffer(self.ainfo, blocksize, self.chmap.clone())?;
382 let postshift = if self.bits == 24 { 8 } else { 16 - self.bits };
384 NABufferType::AudioI16(ref mut adata) => {
385 let stride = adata.get_stride();
386 let dst = adata.get_data_mut().unwrap();
388 for residues in self.residues.iter().take(channels as usize) {
389 let dst = &mut dst[off..][..blocksize];
390 for (dst, src) in dst.iter_mut().zip(residues.iter()) {
391 *dst = (*src << postshift) as i16;
396 NABufferType::AudioI32(ref mut adata) => {
397 let stride = adata.get_stride();
398 let dst = adata.get_data_mut().unwrap();
400 for residues in self.residues.iter().take(channels as usize) {
401 let dst = &mut dst[off..][..blocksize];
402 for (dst, src) in dst.iter_mut().zip(residues.iter()) {
403 *dst = *src << postshift;
411 let mut frm = NAFrame::new_from_pkt(pkt, info, abuf);
412 frm.set_duration(Some(blocksize as u64));
415 Err(DecoderError::InvalidData)
418 fn flush(&mut self) {
422 impl NAOptionHandler for FlacDecoder {
423 fn get_supported_options(&self) -> &[NAOptionDefinition] { &[] }
424 fn set_options(&mut self, _options: &[NAOption]) { }
425 fn query_option_value(&self, _name: &str) -> Option<NAValue> { None }
428 pub fn get_decoder() -> Box<dyn NADecoder + Send> {
429 Box::new(FlacDecoder::new())
432 #[derive(Clone,Copy,Default)]
443 struct FLACPacketiser {
452 fn read_utf8(br: &mut BitReader) -> DecoderResult<u64> {
453 let byte = br.read(8)? as u8;
454 let len = (!byte).leading_zeros();
455 if (len == 1) || (len > 5) {
456 return Err(DecoderError::InvalidData);
459 let mut val = u64::from(byte << len >> len);
461 let byte = br.read(8)?;
462 if (byte & 0xC0) != 0x80 {
463 return Err(DecoderError::InvalidData);
465 val = (val << 6) | u64::from(byte & 0x3F);
473 impl FLACPacketiser {
474 fn new() -> Self { Self::default() }
475 fn parse_header(&self) -> DecoderResult<FrameHeader> {
476 if self.buf.len() < 5 {
477 return Err(DecoderError::ShortData);
479 let mut br = BitReader::new(&self.buf, BitReaderMode::BE);
480 let sync_code = br.read(14)?;
481 if sync_code != 0x3FFE {
482 return Err(DecoderError::InvalidData);
484 let marker = br.read(1)?;
486 return Err(DecoderError::InvalidData);
488 let blk_strat = br.read_bool()?;
489 let bsize = br.read(4)?;
490 let srate_idx = br.read(4)? as u8;
491 let chan_idx = br.read(4)? as u8;
492 let bits = match br.read(3)? {
499 _ => return Err(DecoderError::InvalidData),
501 let marker = br.read(1)?;
503 return Err(DecoderError::InvalidData);
506 let time = read_utf8(&mut br)?;
508 let blocksize = match bsize {
510 2..=5 => 576 << (bsize - 2),
511 6 => br.read(8)? + 1,
512 7 => br.read(16)? + 1,
513 8..=15 => 256 << (bsize - 8),
514 _ => return Err(DecoderError::InvalidData),
516 let srate = match srate_idx {
529 12 => br.read(8)? * 1000,
531 14 => br.read(16)? * 10,
532 _ => return Err(DecoderError::InvalidData),
534 let channels = match chan_idx {
535 0..=7 => chan_idx + 1,
537 _ => return Err(DecoderError::InvalidData),
540 let hdr_size = br.tell() / 8;
541 let ref_crc = br.read(8)? as u8;
543 for &b in self.buf[..hdr_size].iter() {
544 crc = update_crc8(crc, b);
547 return Err(DecoderError::ChecksumError);
550 Ok(FrameHeader{ blk_strat, time, srate, channels, bits, blocksize })
554 impl NAPacketiser for FLACPacketiser {
555 fn add_data(&mut self, src: &[u8]) -> bool {
556 self.buf.extend_from_slice(src);
557 self.buf.len() < 4096
559 fn parse_stream(&mut self, id: u32) -> DecoderResult<NAStreamRef> {
560 let hdr = self.parse_header()?;
561 let ainfo = NAAudioInfo::new(hdr.srate, hdr.channels, if hdr.bits <= 16 { SND_S16P_FORMAT } else { SND_S32P_FORMAT }, hdr.blocksize as usize);
562 let info = NACodecInfo::new("flac", NACodecTypeInfo::Audio(ainfo), None);
563 Ok(NAStream::new(StreamType::Audio, id, info, 1, hdr.srate, 0).into_ref())
565 fn skip_junk(&mut self) -> DecoderResult<usize> {
566 Err(DecoderError::NotImplemented)
568 fn get_packet(&mut self, stream: NAStreamRef) -> DecoderResult<Option<NAPacket>> {
569 if self.end == self.buf.len() || self.buf.len() < 5 {
570 return Err(DecoderError::ShortData);
573 self.hdr = self.parse_header()?;
577 self.cur_crc = update_crc16(self.cur_crc, self.buf[i]);
581 while self.end < self.buf.len() {
582 let b = self.buf[self.end];
585 0..=5 => unreachable!(),
586 6 => self.ref_crc = u16::from(b),
587 7 => self.ref_crc = (self.ref_crc << 8) | u16::from(b),
589 let bbb = (self.ref_crc >> 8) as u8;
590 self.ref_crc = (self.ref_crc << 8) | u16::from(b);
591 self.cur_crc = update_crc16(self.cur_crc, bbb);
592 let mut found = self.ref_crc == self.cur_crc;
593 if self.end + 2 < self.buf.len() {
594 let b1 = self.buf[self.end];
595 let b2 = self.buf[self.end + 1];
596 if b1 != 0xFF || (b2 & 0xFC) != 0xF8 {
601 let mut data = Vec::with_capacity(self.end);
602 data.extend_from_slice(&self.buf[..self.end]);
603 self.buf.drain(..self.end);
604 let mut ts = NATimeInfo::new(None, None, Some(u64::from(self.hdr.blocksize)), 1, self.hdr.srate);
605 ts.pts = if self.hdr.blk_strat {
608 Some(self.hdr.time * u64::from(self.hdr.blocksize))
613 return Ok(Some(NAPacket::new(stream, ts, true, data)));
620 fn reset(&mut self) {
627 pub fn get_packetiser() -> Box<dyn NAPacketiser + Send> {
628 Box::new(FLACPacketiser::new())
633 use nihav_core::codecs::*;
634 use nihav_core::demuxers::*;
635 use nihav_codec_support::test::dec_video::*;
636 use crate::llaudio_register_all_decoders;
637 use crate::llaudio_register_all_demuxers;
640 let mut dmx_reg = RegisteredDemuxers::new();
641 llaudio_register_all_demuxers(&mut dmx_reg);
642 let mut dec_reg = RegisteredDecoders::new();
643 llaudio_register_all_decoders(&mut dec_reg);
645 test_decoding("flac", "flac", "assets/LLaudio/luckynight.flac", Some(6), &dmx_reg, &dec_reg,
646 ExpectedTestResult::MD5([0xe689787a, 0x032a98f7, 0xeb6e64f4, 0xfa652132]));
648 use std::io::{Read, Seek, SeekFrom};
650 fn test_flac_packetiser() {
651 let mut dmx_reg = RegisteredDemuxers::new();
652 llaudio_register_all_demuxers(&mut dmx_reg);
653 let dmx_f = dmx_reg.find_demuxer("flac").unwrap();
654 let mut file = std::fs::File::open("assets/LLaudio/luckynight.flac").unwrap();
655 let mut fr = FileReader::new_read(&mut file);
656 let mut br = ByteReader::new(&mut fr);
657 let mut dmx = create_demuxer(dmx_f, &mut br).unwrap();
659 let mut pkt_sizes = Vec::new();
660 while let Ok(pkt) = dmx.get_frame() {
661 pkt_sizes.push(pkt.get_buffer().len());
664 let mut file = std::fs::File::open("assets/LLaudio/luckynight.flac").unwrap();
665 file.seek(SeekFrom::Start(0x115E)).unwrap();
667 let mut pkts = super::FLACPacketiser::new();
668 let mut buf = [0; 8192];
670 file.read_exact(&mut buf).unwrap();
673 let stream = pkts.parse_stream(0).unwrap();
674 let mut pkt_sizes2 = Vec::new();
675 let mut piter = pkt_sizes.iter();
677 let res = pkts.get_packet(stream.clone());
680 assert_eq!(*piter.next().unwrap(), pkt.get_buffer().len());
681 pkt_sizes2.push(pkt.get_buffer().len());
684 Ok(None) | Err(DecoderError::ShortData) => {},
686 println!("error {:?}", err);
687 panic!("packetising error");
690 let ret = file.read(&mut buf);
693 let res = pkts.get_packet(stream.clone());
696 assert_eq!(*piter.next().unwrap(), pkt.get_buffer().len());
697 pkt_sizes2.push(pkt.get_buffer().len());
700 Ok(None) | Err(DecoderError::ShortData) => break,
702 println!("error {:?}", err);
703 panic!("packetising error");
707 Ok(size) => pkts.add_data(&buf[..size]),
709 if err.kind() == std::io::ErrorKind::UnexpectedEof {
710 let res = pkts.get_packet(stream.clone());
713 assert_eq!(*piter.next().unwrap(), pkt.get_buffer().len());
714 pkt_sizes2.push(pkt.get_buffer().len());
717 Ok(None) | Err(DecoderError::ShortData) => break,
719 println!("error {:?}", err);
720 panic!("packetising error");
724 println!(" {:?}", err.kind());
725 panic!("i/o error!");
730 assert_eq!(pkt_sizes.len(), pkt_sizes2.len());
734 fn update_crc8(crc: u8, byte: u8) -> u8 {
735 CRC8_TABLE[(crc ^ byte) as usize]
738 fn update_crc16(crc: u16, byte: u8) -> u16 {
739 (crc << 8) ^ CRC16_TABLE[(((crc >> 8) as u8) ^ byte) as usize]
742 const CRC8_TABLE: [u8; 256] = [
743 0x00, 0x07, 0x0E, 0x09, 0x1C, 0x1B, 0x12, 0x15,
744 0x38, 0x3F, 0x36, 0x31, 0x24, 0x23, 0x2A, 0x2D,
745 0x70, 0x77, 0x7E, 0x79, 0x6C, 0x6B, 0x62, 0x65,
746 0x48, 0x4F, 0x46, 0x41, 0x54, 0x53, 0x5A, 0x5D,
747 0xE0, 0xE7, 0xEE, 0xE9, 0xFC, 0xFB, 0xF2, 0xF5,
748 0xD8, 0xDF, 0xD6, 0xD1, 0xC4, 0xC3, 0xCA, 0xCD,
749 0x90, 0x97, 0x9E, 0x99, 0x8C, 0x8B, 0x82, 0x85,
750 0xA8, 0xAF, 0xA6, 0xA1, 0xB4, 0xB3, 0xBA, 0xBD,
751 0xC7, 0xC0, 0xC9, 0xCE, 0xDB, 0xDC, 0xD5, 0xD2,
752 0xFF, 0xF8, 0xF1, 0xF6, 0xE3, 0xE4, 0xED, 0xEA,
753 0xB7, 0xB0, 0xB9, 0xBE, 0xAB, 0xAC, 0xA5, 0xA2,
754 0x8F, 0x88, 0x81, 0x86, 0x93, 0x94, 0x9D, 0x9A,
755 0x27, 0x20, 0x29, 0x2E, 0x3B, 0x3C, 0x35, 0x32,
756 0x1F, 0x18, 0x11, 0x16, 0x03, 0x04, 0x0D, 0x0A,
757 0x57, 0x50, 0x59, 0x5E, 0x4B, 0x4C, 0x45, 0x42,
758 0x6F, 0x68, 0x61, 0x66, 0x73, 0x74, 0x7D, 0x7A,
759 0x89, 0x8E, 0x87, 0x80, 0x95, 0x92, 0x9B, 0x9C,
760 0xB1, 0xB6, 0xBF, 0xB8, 0xAD, 0xAA, 0xA3, 0xA4,
761 0xF9, 0xFE, 0xF7, 0xF0, 0xE5, 0xE2, 0xEB, 0xEC,
762 0xC1, 0xC6, 0xCF, 0xC8, 0xDD, 0xDA, 0xD3, 0xD4,
763 0x69, 0x6E, 0x67, 0x60, 0x75, 0x72, 0x7B, 0x7C,
764 0x51, 0x56, 0x5F, 0x58, 0x4D, 0x4A, 0x43, 0x44,
765 0x19, 0x1E, 0x17, 0x10, 0x05, 0x02, 0x0B, 0x0C,
766 0x21, 0x26, 0x2F, 0x28, 0x3D, 0x3A, 0x33, 0x34,
767 0x4E, 0x49, 0x40, 0x47, 0x52, 0x55, 0x5C, 0x5B,
768 0x76, 0x71, 0x78, 0x7F, 0x6A, 0x6D, 0x64, 0x63,
769 0x3E, 0x39, 0x30, 0x37, 0x22, 0x25, 0x2C, 0x2B,
770 0x06, 0x01, 0x08, 0x0F, 0x1A, 0x1D, 0x14, 0x13,
771 0xAE, 0xA9, 0xA0, 0xA7, 0xB2, 0xB5, 0xBC, 0xBB,
772 0x96, 0x91, 0x98, 0x9F, 0x8A, 0x8D, 0x84, 0x83,
773 0xDE, 0xD9, 0xD0, 0xD7, 0xC2, 0xC5, 0xCC, 0xCB,
774 0xE6, 0xE1, 0xE8, 0xEF, 0xFA, 0xFD, 0xF4, 0xF3
777 const CRC16_TABLE: [u16; 256] = [
778 0x0000, 0x8005, 0x800F, 0x000A, 0x801B, 0x001E, 0x0014, 0x8011,
779 0x8033, 0x0036, 0x003C, 0x8039, 0x0028, 0x802D, 0x8027, 0x0022,
780 0x8063, 0x0066, 0x006C, 0x8069, 0x0078, 0x807D, 0x8077, 0x0072,
781 0x0050, 0x8055, 0x805F, 0x005A, 0x804B, 0x004E, 0x0044, 0x8041,
782 0x80C3, 0x00C6, 0x00CC, 0x80C9, 0x00D8, 0x80DD, 0x80D7, 0x00D2,
783 0x00F0, 0x80F5, 0x80FF, 0x00FA, 0x80EB, 0x00EE, 0x00E4, 0x80E1,
784 0x00A0, 0x80A5, 0x80AF, 0x00AA, 0x80BB, 0x00BE, 0x00B4, 0x80B1,
785 0x8093, 0x0096, 0x009C, 0x8099, 0x0088, 0x808D, 0x8087, 0x0082,
786 0x8183, 0x0186, 0x018C, 0x8189, 0x0198, 0x819D, 0x8197, 0x0192,
787 0x01B0, 0x81B5, 0x81BF, 0x01BA, 0x81AB, 0x01AE, 0x01A4, 0x81A1,
788 0x01E0, 0x81E5, 0x81EF, 0x01EA, 0x81FB, 0x01FE, 0x01F4, 0x81F1,
789 0x81D3, 0x01D6, 0x01DC, 0x81D9, 0x01C8, 0x81CD, 0x81C7, 0x01C2,
790 0x0140, 0x8145, 0x814F, 0x014A, 0x815B, 0x015E, 0x0154, 0x8151,
791 0x8173, 0x0176, 0x017C, 0x8179, 0x0168, 0x816D, 0x8167, 0x0162,
792 0x8123, 0x0126, 0x012C, 0x8129, 0x0138, 0x813D, 0x8137, 0x0132,
793 0x0110, 0x8115, 0x811F, 0x011A, 0x810B, 0x010E, 0x0104, 0x8101,
794 0x8303, 0x0306, 0x030C, 0x8309, 0x0318, 0x831D, 0x8317, 0x0312,
795 0x0330, 0x8335, 0x833F, 0x033A, 0x832B, 0x032E, 0x0324, 0x8321,
796 0x0360, 0x8365, 0x836F, 0x036A, 0x837B, 0x037E, 0x0374, 0x8371,
797 0x8353, 0x0356, 0x035C, 0x8359, 0x0348, 0x834D, 0x8347, 0x0342,
798 0x03C0, 0x83C5, 0x83CF, 0x03CA, 0x83DB, 0x03DE, 0x03D4, 0x83D1,
799 0x83F3, 0x03F6, 0x03FC, 0x83F9, 0x03E8, 0x83ED, 0x83E7, 0x03E2,
800 0x83A3, 0x03A6, 0x03AC, 0x83A9, 0x03B8, 0x83BD, 0x83B7, 0x03B2,
801 0x0390, 0x8395, 0x839F, 0x039A, 0x838B, 0x038E, 0x0384, 0x8381,
802 0x0280, 0x8285, 0x828F, 0x028A, 0x829B, 0x029E, 0x0294, 0x8291,
803 0x82B3, 0x02B6, 0x02BC, 0x82B9, 0x02A8, 0x82AD, 0x82A7, 0x02A2,
804 0x82E3, 0x02E6, 0x02EC, 0x82E9, 0x02F8, 0x82FD, 0x82F7, 0x02F2,
805 0x02D0, 0x82D5, 0x82DF, 0x02DA, 0x82CB, 0x02CE, 0x02C4, 0x82C1,
806 0x8243, 0x0246, 0x024C, 0x8249, 0x0258, 0x825D, 0x8257, 0x0252,
807 0x0270, 0x8275, 0x827F, 0x027A, 0x826B, 0x026E, 0x0264, 0x8261,
808 0x0220, 0x8225, 0x822F, 0x022A, 0x823B, 0x023E, 0x0234, 0x8231,
809 0x8213, 0x0216, 0x021C, 0x8219, 0x0208, 0x820D, 0x8207, 0x0202