From dae6151bae60a8d03d74fb75ac79716d1f001499 Mon Sep 17 00:00:00 2001 From: Saxon Date: Thu, 27 Jun 2019 13:57:30 +0930 Subject: [PATCH] codec/h264: removed decode folder (shouldn't have been on master branch) --- codec/h264/decode/parse.go | 53 -------------------------------------- 1 file changed, 53 deletions(-) delete mode 100644 codec/h264/decode/parse.go diff --git a/codec/h264/decode/parse.go b/codec/h264/decode/parse.go deleted file mode 100644 index 07087c7d..00000000 --- a/codec/h264/decode/parse.go +++ /dev/null @@ -1,53 +0,0 @@ -/* -NAME - parse.go - -DESCRIPTION - parse.go provides parsing processes for syntax elements of different - descriptors specified in 7.2 of ITU-T H.264. - -AUTHOR - Saxon Nelson-Milton - -LICENSE - Copyright (C) 2017 the Australian Ocean Lab (AusOcean) - - It is free software: you can redistribute it and/or modify them - under the terms of the GNU General Public License as published by the - Free Software Foundation, either version 3 of the License, or (at your - option) any later version. - - It is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with revid in gpl.txt. If not, see http://www.gnu.org/licenses. -*/ - -package decode - -import ( - "math" - - "github.com/icza/bitio" -) - -// readUe parses a syntax element of ue(v) descriptor, i.e. an unsigned integer -// Exp-Golomb-coded element. This process is specified in 9.1. -func readUe(r bitio.Reader) (int, error) { - nZeros := -1 - var err error - for b := uint64(0); b == 0; nZeros++ { - b, err = r.ReadBits(1) - if err != nil { - return 0, err - } - } - rem, err := r.ReadBits(byte(nZeros)) - if err != nil { - return 0, err - } - return int(math.Pow(float64(2), float64(nZeros)) - 1 + float64(rem)), nil -}