KR101060490B1 - Method and device for calculating average bitrate of a file of variable bitrate, and audio device comprising said device - Google Patents
Method and device for calculating average bitrate of a file of variable bitrate, and audio device comprising said device Download PDFInfo
- Publication number
- KR101060490B1 KR101060490B1 KR1020080086315A KR20080086315A KR101060490B1 KR 101060490 B1 KR101060490 B1 KR 101060490B1 KR 1020080086315 A KR1020080086315 A KR 1020080086315A KR 20080086315 A KR20080086315 A KR 20080086315A KR 101060490 B1 KR101060490 B1 KR 101060490B1
- Authority
- KR
- South Korea
- Prior art keywords
- file
- header information
- information
- header
- bitrate
- Prior art date
Links
Images
Classifications
-
- G—PHYSICS
- G11—INFORMATION STORAGE
- G11B—INFORMATION STORAGE BASED ON RELATIVE MOVEMENT BETWEEN RECORD CARRIER AND TRANSDUCER
- G11B20/00—Signal processing not specific to the method of recording or reproducing; Circuits therefor
- G11B20/10—Digital recording or reproducing
- G11B20/10009—Improvement or modification of read or write signals
- G11B20/10268—Improvement or modification of read or write signals bit detection or demodulation methods
-
- G—PHYSICS
- G11—INFORMATION STORAGE
- G11B—INFORMATION STORAGE BASED ON RELATIVE MOVEMENT BETWEEN RECORD CARRIER AND TRANSDUCER
- G11B27/00—Editing; Indexing; Addressing; Timing or synchronising; Monitoring; Measuring tape travel
- G11B27/005—Reproducing at a different information rate from the information rate of recording
-
- H—ELECTRICITY
- H03—ELECTRONIC CIRCUITRY
- H03M—CODING; DECODING; CODE CONVERSION IN GENERAL
- H03M7/00—Conversion of a code where information is represented by a given sequence or number of digits to a code where the same, similar or subset of information is represented by a different sequence or number of digits
- H03M7/30—Compression; Expansion; Suppression of unnecessary data, e.g. redundancy reduction
-
- G—PHYSICS
- G11—INFORMATION STORAGE
- G11B—INFORMATION STORAGE BASED ON RELATIVE MOVEMENT BETWEEN RECORD CARRIER AND TRANSDUCER
- G11B20/00—Signal processing not specific to the method of recording or reproducing; Circuits therefor
- G11B20/10—Digital recording or reproducing
- G11B20/10527—Audio or video recording; Data buffering arrangements
- G11B2020/10537—Audio or video recording
- G11B2020/10546—Audio or video recording specifically adapted for audio data
-
- G—PHYSICS
- G11—INFORMATION STORAGE
- G11B—INFORMATION STORAGE BASED ON RELATIVE MOVEMENT BETWEEN RECORD CARRIER AND TRANSDUCER
- G11B20/00—Signal processing not specific to the method of recording or reproducing; Circuits therefor
- G11B20/10—Digital recording or reproducing
- G11B20/12—Formatting, e.g. arrangement of data block or words on the record carriers
- G11B20/1217—Formatting, e.g. arrangement of data block or words on the record carriers on discs
- G11B2020/1218—Formatting, e.g. arrangement of data block or words on the record carriers on discs wherein the formatting concerns a specific area of the disc
- G11B2020/1225—Formatting, e.g. arrangement of data block or words on the record carriers on discs wherein the formatting concerns a specific area of the disc frame, i.e. a subunit of a sector containing user data, e.g. a sync frame
Landscapes
- Engineering & Computer Science (AREA)
- Signal Processing (AREA)
- Theoretical Computer Science (AREA)
- Signal Processing For Digital Recording And Reproducing (AREA)
Abstract
본 발명은 가변 비트레이트 파일의 평균 비트레이트 계산 방법에 관한 것으로, 가변 비트레이트 파일의 데이터 영역에 포함된 복수의 블록들 중 제1 블록에 대한 제1 파일 포인터의 위치를 설정하고, 설정된 제1 파일 포인터의 위치에서 제1 블록에 포함된 적어도 두 개의 프레임들의 헤더 정보들을 추출하며, 추출된 헤더 정보들의 비교 결과에 따라 복수의 블록들 중 소정 개수의 블록들에 대한 평균 비트레이트를 계산함으로써, 사전 로딩 시간을 줄이면서 평균 비트레이트를 계산할 수 있다.The present invention relates to a method for calculating an average bitrate of a variable bitrate file. The present invention relates to a method of calculating an average bitrate of a variable bitrate file, and sets a location of a first file pointer with respect to a first block among a plurality of blocks included in a data area of the variable bitrate file. By extracting the header information of at least two frames included in the first block at the location of the file pointer, and calculating the average bit rate of a predetermined number of blocks of the plurality of blocks according to the comparison result of the extracted header information, The average bitrate can be calculated while reducing the preload time.
Description
본 발명은 가변 비트레이트의 파일의 평균 비트레이트 계산 방법에 관한 것으로, 더욱 상세하게는 파일의 평균 비트레이트 값을 가지고 있는 헤더가 포함되지 않은 가변 비트레이트의 파일의 평균 비트레이트 계산 방법 및 장치, 상기 가변 비트레이트의 파일의 평균 비트레이트 계산 방법을 실행하기 위한 프로그램을 기록한 컴퓨터로 읽을 수 있는 기록매체 및 상기 가변 비트레이트의 파일의 평균 비트레이트 계산 장치를 포함하는 오디오 장치에 관한 것이다.The present invention relates to a method of calculating an average bitrate of a file having a variable bitrate, and more particularly, a method and apparatus for calculating an average bitrate of a file having a variable bitrate without a header having an average bitrate value of the file, The present invention relates to an audio device including a computer-readable recording medium recording a program for executing the method of calculating the average bitrate of a file having a variable bit rate and an average bitrate calculating device of a file having a variable bit rate.
비트레이트(bitrate)는 초당 전송되는 데이터량을 나타내는 것으로, 고정 비트레이트(CBR, constant bitrate)와 가변 비트레이트(VBR, variable bitrate)로 나뉜다. 고정 비트레이트는 입력되는 정보의 양에 관계없이 일정한 비트레이트에 따라 압축하는 방식으로, 고정 비트레이트의 파일은 고정된 사이즈의 프레임들을 포함한다. Bitrate represents the amount of data transmitted per second, and is divided into a fixed bitrate (CBR) and a variable bitrate (VBR). The fixed bitrate compresses according to a constant bitrate regardless of the amount of information input, so that a file of fixed bitrate includes frames of a fixed size.
한편, 가변 비트레이트는 입력되는 정보의 양에 따라 가변적으로 비트레이트를 적용하여 압축하는 방식으로, 가변 비트레이트의 파일은 서로 다른 사이즈의 프레임들을 포함할 수 있다. 가변 비트레이트는 단위 비트 당 할당하는 용량을 효율적으로 조절할 수 있으므로, 많은 데이터를 요구하는 곳에 더 많은 비트를 할당하고, 상대적으로 데이터를 요구하는 곳이 적은 곳에는 비트를 덜 할당함으로써, 음질을 향상시킬 수 있다.On the other hand, the variable bitrate is a method of compressing by applying the bitrate variably according to the amount of information input, the file of the variable bitrate may include frames of different sizes. Variable bitrates can efficiently adjust the capacity allocated per unit bit, improving sound quality by allocating more bits where more data is needed and less bits where there is less data. You can.
고정 비트레이트의 경우, 일정한 비트레이트를 가지기 때문에 전체 파일 사이즈를 비트레이트로 나누면 전체 재생 시간을 산출할 수 있다. 그러나, 가변 비트레이트의 경우, 시점마다 적용되는 비트레이트가 다르기 때문에 전체 재생 시간을 산출하기에 어려움이 있다.In the case of the fixed bitrate, since the bitrate is constant, the total reproduction time can be calculated by dividing the overall file size by the bitrate. However, in the case of the variable bit rate, it is difficult to calculate the total reproduction time because the bit rate applied to each time point is different.
본 발명이 해결하고자 하는 과제는 파일의 평균 비트레이트 값을 가지고 있는 헤더를 포함하지 않은 가변 비트레이트 파일의 평균 비트레이트를 계산하는 방법 및 장치, 가변 비트레이트 파일의 평균 비트레이트를 계산하는 방법을 실행하기 위한 프로그램을 기록한 컴퓨터로 읽을 수 있는 기록매체 및 가변 비트레이트 파일의 평균 비트레이트를 계산하는 장치를 포함하는 오디오 장치를 제공하는데 있다.An object of the present invention is to provide a method and apparatus for calculating an average bitrate of a variable bitrate file that does not include a header having an average bitrate value of the file, and a method of calculating an average bitrate of a variable bitrate file. Disclosed is an audio device including a computer-readable recording medium having recorded thereon a program for execution and an apparatus for calculating an average bitrate of a variable bitrate file.
상기 과제를 해결하기 위한 본 발명에 따른 가변 비트레이트 파일의 평균 비트레이트 계산 방법은 가변 비트레이트의 파일의 데이터 영역에 포함된 복수의 블록들 중 제1 블록에 대한 제1 파일 포인터의 위치를 설정하는 단계; 상기 설정된 제1 파일 포인터의 위치에서 상기 제1 블록에 포함된 적어도 두 개의 프레임들의 헤더 정보들을 추출하는 단계; 및 상기 추출된 헤더 정보들의 비교 결과에 따라 상기 복수의 블록들 중 소정 개수의 블록들에 대한 평균 비트레이트를 계산하는 단계를 포함한다.According to an aspect of the present invention, an average bitrate calculation method for a variable bitrate file sets a position of a first file pointer with respect to a first block among a plurality of blocks included in a data area of a file having a variable bitrate. Making; Extracting header information of at least two frames included in the first block at a location of the set first file pointer; And calculating an average bit rate for a predetermined number of blocks among the plurality of blocks according to the comparison result of the extracted header information.
또한, 상기 기술적 과제는 가변 비트레이트의 파일의 데이터 영역에 포함된 복수의 블록들 중 제1 블록에 대한 제1 파일 포인터의 위치를 설정하는 단계; 상기 설정된 제1 파일 포인터의 위치에서 상기 제1 블록에 포함된 적어도 두 개의 프레임들의 헤더 정보들을 추출하는 단계; 및 상기 추출된 헤더 정보들의 비교 결과에 따라 상기 복수의 블록들 중 소정 개수의 블록들에 대한 평균 비트레이트를 계산하는 단계를 포함하는 가변 비트레이트 파일의 평균 비트레이트 계산 방법을 실행하기 위한 프로그램을 기록한 컴퓨터로 읽을 수 있는 기록매체에 의해 달성된다.The technical problem may include setting a location of a first file pointer with respect to a first block among a plurality of blocks included in a data area of a file having a variable bit rate; Extracting header information of at least two frames included in the first block at a location of the set first file pointer; And calculating an average bitrate for a predetermined number of blocks among the plurality of blocks according to the comparison result of the extracted header information. Achieved by a computer readable recording medium having recorded thereon.
또한, 상기 기술적 과제를 해결하기 위한 본 발명에 따른 가변 비트레이트 파일의 평균 비트레이트 계산 장치는 가변 비트레이트의 파일의 데이터 영역에 포함된 복수의 블록들 중 제1 블록에 대한 제1 파일 포인터의 위치를 설정하는 파일 포인터 설정부; 상기 설정된 제1 파일 포인터의 위치에서 상기 제1 블록에 포함된 적어도 두 개의 프레임들의 헤더 정보들을 추출하고, 상기 추출된 헤더 정보들을 비교하는 헤더 정보 비교부; 및 상기 추출된 헤더 정보 들의 비교 결과에 따라 상기 복수의 블록들 중 소정 개수의 블록들에 대한 평균 비트레이트를 계산하는 연산부를 포함한다.In addition, the apparatus for calculating the average bitrate of the variable bitrate file according to the present invention for solving the above technical problem is to determine the first file pointer of the first block of the plurality of blocks included in the data area of the file of the variable bitrate A file pointer setting unit for setting a position; A header information comparison unit extracting header information of at least two frames included in the first block at the position of the set first file pointer and comparing the extracted header information; And an operation unit that calculates an average bit rate for a predetermined number of blocks among the plurality of blocks according to the comparison result of the extracted header information.
또한, 상기 기술적 과제를 해결하기 위한 본 발명에 따른 오디오 장치는 가변 비트레이트의 오디오 파일을 저장하는 메모리; 상기 오디오 파일의 데이터 영역의 소정의 파일 포인터의 위치를 기초로 적어도 두 개의 프레임들의 헤더 정보들을 추출하고, 상기 추출된 헤더 정보들의 비교 결과에 따라 상기 오디오 파일의 평균 비트레이트를 계산하며, 상기 오디오 파일을 변조하여 PCM(pulse code modulation) 데이터로 제공하는 제어부; 및 상기 제어부로부터 제공받은 상기 PCM 데이터에 대한 복호화를 수행하는 코덱을 포함한다.In addition, an audio device according to the present invention for solving the above technical problem comprises a memory for storing an audio file of a variable bit rate; Extract header information of at least two frames based on a location of a predetermined file pointer of a data area of the audio file, calculate an average bitrate of the audio file according to a comparison result of the extracted header information, and A control unit for modulating the file and providing the file as pulse code modulation (PCM) data; And a codec for decoding the PCM data provided from the controller.
본 발명에 따르면, 오디오 파일이 전체 파일의 평균 비트레이트 값을 포함하는 헤더를 포함하지 않은 경우에 오디오 파일의 일부 데이터 블록들을 선택하고, 선택된 데이터 블록에 대해서도 일부 프레임들을 선택하여 비트레이트를 구함으로써, 계산량을 줄여서 사전 로딩 시간을 감소시키면서 비교적 정확한 평균 비트레이트 값을 구할 수 있다. 이로써, 오디오 파일의 재생 시간을 예측할 수 있으므로, 시간 오차 또는 표시 오류 등을 방지할 수 있다.According to the present invention, when the audio file does not include a header including the average bitrate value of the entire file, some data blocks of the audio file are selected, and some frames are also selected for the selected data block to obtain a bit rate. As a result, a relatively accurate average bitrate value can be obtained while reducing the preload time by reducing the amount of computation. As a result, the playback time of the audio file can be predicted, and thus time error or display error can be prevented.
본문에 개시되어 있는 본 발명의 실시예들에 대해서, 특정한 구조적 내지 기능적 설명들은 단지 본 발명의 실시예를 설명하기 위한 목적으로 예시된 것으로, 본 발명의 실시예들은 다양한 형태로 실시될 수 있으며 본문에 설명된 실시예들에 한정되는 것으로 해석되어서는 아니 된다. With respect to the embodiments of the present invention disclosed in the text, specific structural to functional descriptions are merely illustrated for the purpose of describing embodiments of the present invention, embodiments of the present invention may be implemented in various forms and It should not be construed as limited to the embodiments described in.
이하, 첨부한 도면들을 참조하여, 본 발명의 바람직한 실시예를 보다 상세하게 설명하고자 한다. 도면상의 동일한 구성요소에 대해서는 동일한 참조부호를 사용하고 동일한 구성요소에 대해서 중복된 설명은 생략한다. Hereinafter, with reference to the accompanying drawings, it will be described in detail a preferred embodiment of the present invention. The same reference numerals are used for the same constituent elements in the drawings and redundant explanations for the same constituent elements are omitted.
도 1은 본 발명의 일 실시예에 따른 오디오 장치를 나타내는 블록도이다.1 is a block diagram illustrating an audio device according to an embodiment of the present invention.
도 1을 참조하면, 오디오 장치(1)는 메모리(10), 제어부(20), 코덱(codec, 30) 및 출력부(40)를 포함한다. 본 발명의 일 실시예에서 오디오 장치(1)는 휴대폰, PDA(Personal Digital Assistant) 등과 같은 이동 장치에 내장될 수 있다. Referring to FIG. 1, the
제어부(20)는 외부로부터 요청(request)이 수신되면, 메모리(10)에 저장된 오디오 파일을 스트림(stream) 데이터 형식으로 제공받을 수 있다. 본 발명의 일 실시예에서, 제어부(20)는 멀티미디어 어플리케이션 프로세서(multimedia application processor)일 수 있다. When a request is received from the outside, the
상술한 바와 같이, 가변 비트레이트의 오디오 파일 내에 포함된 프레임들의 사이즈는 서로 다르고, 시점에 따른 비트레이트도 서로 다르다. 따라서, 가변 비트레이트의 오디오 파일의 재생 시간을 구하기 위해서는 가변 비트레이트의 오디오 파일 내에 포함된 프레임들의 평균 비트레이트를 구할 필요가 있다. 일반적으로, 가변 비트레이트의 오디오 파일은 파일의 앞 단에 VBRI 헤더 또는 XING 헤더 등과 같은 파일 전체의 속성 정보를 담고 있는 헤더를 포함한다. 이로써, 해당 파일의 앞 단에 위치하는 VBRI 헤더 또는 XING 헤더 등을 검출하여, 평균 비트레이트를 얻을 수 있다.As described above, the sizes of the frames included in the audio file of the variable bitrate are different from each other, and the bitrates according to viewpoints are also different. Therefore, in order to obtain the reproduction time of the audio file of the variable bit rate, it is necessary to obtain the average bit rate of the frames included in the audio file of the variable bit rate. In general, an audio file having a variable bit rate includes a header including attribute information of the entire file such as a VBRI header or an XING header at the front of the file. As a result, an average bitrate can be obtained by detecting a VBRI header or an XING header located at the front of the file.
그러나, 최근 각종 툴(tool)을 이용한 사용자 편집이 대중화됨에 따라, 사용자에 의해 편집된 파일들 중 일부는 파일 전체의 속성 정보를 담고 있는 헤더가 포함되지 않은 경우도 있다. 이러한 경우에는 오디오 파일의 재생 시간을 구하기 위하여 오디오 파일의 평균 비트레이트를 직접 계산해야 한다. 오디오 파일 내에 포함된 모든 프레임들에 대한 비트레이트들을 구한 후에 평균 비트레이트를 구하는 경우에는 정확도는 높지만 계산량이 매우 많아지므로, 사전 로딩 시간이 길어지게 된다. However, with the recent popularization of user editing using various tools, some of the files edited by the user may not include a header containing attribute information of the entire file. In this case, the average bitrate of the audio file must be directly calculated in order to obtain the playback time of the audio file. If the average bitrate is obtained after obtaining the bitrates for all the frames included in the audio file, the preload time is long because the accuracy is high but the calculation amount is very large.
본 발명의 일 실시예에서, 제어부(20)는 오디오 파일의 평균 비트레이트를 계산하기 위한 평균 비트레이트(ABR, average bitrate) 계산부(21)를 포함할 수 있다. 여기서, 평균 비트레이트 계산부(21)는 오디오 파일 내의 전 구간에 대해서 중간 중간의 싱크 워드(sync word)를 검색하여 일부 프레임들만을 추출함으로써 평균 비트레이트를 계산한다. 여기서, 싱크 워드는 MPEG 오디오 프레임의 첫 번째 필드로써, 동기 필드라고도 하는데, 오디오 프레임의 시작을 나타내는 동기 신호이다. 예를 들어, 싱크 워드는 12개의 "1"(즉, OxFFF(1111 1111 1111))로 구성될 수 있다. 여기서, Ox는 16진수임을 표시한다. 평균 비트레이트 계산부(21)의 동작에 대해서는 이하에서 도 2 및 3을 참조하여 상세하게 설명하기로 한다. In an embodiment of the present invention, the
또한, 제어부(20)는 코덱(30)과의 인터페이스를 위한 오디오 장치 인터페이스(audio device interface, ADI, 22)를 더 포함할 수 있다. 여기서, 오디오 장치 인터페이스(22)는 PCM(pulse code modulation) 데이터를 출력할 수 있다.In addition, the
코덱(30)은 제어부(20)로부터 PCM 데이터를 제공받아 오디오 파일을 복호화한다. 출력부(40)는 코덱(30)으로부터 제공받은 복호화된 오디오 파일을 출력하는데, 본 발명의 일 실시예에서, 출력부(40)는 스피커 또는 이어폰 등일 수 있다.The
도 2는 도 1에 포함된 평균 비트레이트 계산부(21)를 상세하게 나타내는 블록도이다.FIG. 2 is a block diagram illustrating in detail the average
도 3은 도 2의 평균 비트레이트 계산부(21)에 입력되는 오디오 파일의 일 예를 나타낸다.3 illustrates an example of an audio file input to the
이하에서는, 도 2 및 3을 참조하여 평균 비트레이트 계산부(21)의 동작을 상술하기로 한다. 먼저, 도 2를 참조하면, 평균 비트레이트 계산부(21)는 속성 정보 검출부(211), 파일 포인터 설정부(212), 헤더 정보 비교부(213) 및 연산부(214)를 포함한다. Hereinafter, the operation of the average
도 2 및 3을 참조하면, 오디오 파일은 속성 정보 영역 및 오디오 데이터 영역을 포함한다. 오디오 데이터 영역은 복수개의 블록들로 나눠질 수 있는데, 도 3 에서는 오디오 데이터 영역은 N개의 블록들로 나눠질 수 있다. N개의 블록들 각각은 복수개의 프레임들로 구성된다.2 and 3, an audio file includes an attribute information area and an audio data area. The audio data area may be divided into a plurality of blocks. In FIG. 3, the audio data area may be divided into N blocks. Each of the N blocks is composed of a plurality of frames.
속성 정보 검출부(211)는 스트림 데이터 형식으로 입력되는 오디오 파일을 수신하고, 해당 파일에서 속성 정보를 나타내는 영역, 즉, 속성 정보 영역을 검출하여 해당 영역의 사이즈를 획득한다. 본 발명의 일 실시예에서, 속성 정보는 ID3 태그(tag)일 수 있다. 여기서, ID3는 MP3 파일에서 쓰이는 메타 데이터 포맷으로, ID3 태그는 MP3 파일에 제목, 가수(음악가), 음반 이름, 곡 번호 등의 정보를 추가하기 위하여 표준적으로 사용되고 있는 형식이다. ID3 태그와 같은 속성 정보는 오디오 파일의 재생 시간에 영향을 미치지 않는다. 따라서, 속성 정보 검출부(211)는 속성 정보를 나타내는 영역을 검출하여 획득한 해당 영역의 사이즈를 평균 비트레이트를 계산할 때 제외한다. The
파일 포인터 설정부(212)는 전체 파일에서 속성 정보 검출부(211)에서 검출된 속성 정보를 나타내는 영역의 사이즈를 제외한 영역에서 제1 파일 포인터의 위치를 설정한다. 보다 상세하게는, 파일 포인터 설정부(212)는 전체 파일 중 속성 정보를 나타내는 영역의 사이즈를 제외한 영역인 오디오 데이터 영역에 포함된 복수의 블록들 중 제1 블록에서 제1 파일 포인터의 위치를 설정할 수 있다. 도 3에 도시된 파일에서, 속성 정보 영역을 제외한 오디오 데이터 영역 부분에 포함된 제1 블록(B1)에서 제1 파일 포인터의 위치를 설정한다. 구체적으로, 파일 포인터 설정부(212)는 다음 수학식 1을 이용하여 파일 포인터의 위치를 설정한다.The file
[수학식 1][Equation 1]
Pd=I+(Ftotal-I)*d/ND P d = I + (F total -I) * d / N D
여기서, d는 도 3의 B1, B2, ..., BN과 같은 복수의 블록들의 순번을 나타내고(즉, B1의 경우 d는 1이다), Pd는 각각의 블록에서 파일 포인터의 위치를 나타낸다. 또한, I는 속성 정보 영역의 사이즈를 나타내고, Ftotal은 전체 오디오 파일의 크기를 나타내며, ND는 전체 오디오 파일 내에서의 검색할 블록의 개수를 나타낸다. Here, d is the B 1, B 2, ... in Fig. 3, (a That is, in the case of B1 d 1) indicates a sequence number of a plurality of blocks B, such as N, P d is the file pointer in each block Indicates a location. In addition, I represents the size of the attribute information area, F total represents the size of the entire audio file, and N D represents the number of blocks to be searched in the entire audio file.
헤더 정보 비교부(213)는 파일 포인터 설정부(212)에서 설정된 제1 파일 포인터의 위치에서 유효한 제1 프레임의 헤더가 존재하는지 확인한다. 상술한 바와 같이, 프레임 헤더는 싱크 워드를 포함하고, 일반적으로, 프레임 헤더는 식별자(ID) 필드, 계층 필드, 보호 비트 필드, 비트레이트 인덱스 필드, 샘플링 주파수 필드, 패딩(padding) 비트 필드, 프라이빗(private) 비트 필드, 모드(mode) 필드, 모드 확장(extension) 필드, 카피 라이트(copy right) 필드, 오리지날(original)/카피 필드 및 엠퍼시스(emphasis) 필드로 구성된다. 본 발명의 일 실시예에서, 각각의 프레임 헤더는 비트레이트 정보, 샘플링 레이트 정보, 패딩 정보 및 레이어(layer) 정보 등을 포함할 수 있다. 예를 들어, mp3 파일의 경우 MPEG 1, LAYER 3을 의미하므로, 레이어 정보는 이와 같은 압축 표준에 대한 정보를 나타낸다. The header
이하, 확인 결과 유효한 제1 프레임의 헤더가 존재하는지 여부에 따른 파일 포인터 설정부(212) 및 헤더 정보 비교부(213)의 동작을 상술하기로 한다.Hereinafter, the operation of the file
먼저, 헤더 정보 비교부(213)는 유효한 제1 프레임의 헤더가 존재하지 않는 경우에 파일 포인터 설정부(212)에 파일 포인터의 재설정을 지시하는 제어 신호를 출력한다. 이에 따라, 파일 포인터 설정부(212)는 제1 파일 포인터의 위치를 다시 설정한다. 구체적으로, 파일 포인터 설정부(212)는 초기에 설정된 제1 파일 포인터의 위치에서 소정의 바이트만큼 이동시킴으로써 제1 파일 포인터의 위치를 다시 설정할 수 있다. 예를 들어, 파일 포인터 설정부(212)는 초기에 설정된 제1 파일 포인터의 위치에서 1 바이트만큼 이동시켜 제1 파일 포인터의 위치를 다시 설정할 수 있다. 이에 따라, 헤더 정보 비교부(213)는 다시 설정된 제1 파일 포인터의 위치에서 유효한 제1 프레임의 헤더가 존재하는지 확인한다.First, when the header of the first valid frame does not exist, the header
한편, 헤더 정보 비교부(213)는 유효한 제1 프레임의 헤더가 존재하는 경우에 제1 프레임의 헤더에서 제1 헤더 정보를 추출하고, 추출된 제1 헤더 정보를 기초로 하여 제1 프레임의 사이즈를 계산한다. 상술한 바와 같이, 제1 프레임의 헤더는 비트레이트 정보, 샘플링 레이트 정보, 패딩 정보, 레이어 정보 등을 포함하는바, 여기서 제1 헤더 정보는 비트레이트 정보, 샘플링 레이트 정보, 패딩 정보, 레이어 정보 등을 포함한다. 구체적으로, 헤더 정보 비교부(213)는 제1 헤더 정보 중 비트레이트 정보, 샘플링 레이트 정보 및 패딩 정보를 기초로 하여 제1 프레임의 사이즈를 계산할 수 있다. 여기서, 제1 프레임의 사이즈는 다음 수학식 2를 이용하여 구할 수 있다.On the other hand, the header
[수학식 2][Equation 2]
FL = 144*BR/SR + PFL = 144 * BR / SR + P
여기서, FL은 프레임 사이즈를 나타내고, BR은 비트레이트를 나타내며, SR은 샘플링 레이트를 나타내고, P은 패딩(padding)된 영역의 사이즈를 나타낸다. 여기서, 144는 샘플들의 개수인 1152를 바이트 단위로 나타내기 위하여 8로 나눈 값이다. 따라서, 144는 실시예에 따라 변할 수 있다. Here, FL represents a frame size, BR represents a bit rate, SR represents a sampling rate, and P represents a size of a padded area. Here, 144 is a value divided by 8 to represent 1152, the number of samples, in bytes. Thus, 144 may vary depending on the embodiment.
이어서, 헤더 정보 비교부(213)는 제1 파일 포인터를 계산된 제1 프레임의 사이즈만큼 이동시켜 제2 파일 포인터를 설정하고, 설정된 제2 파일 포인터의 위치에서 유효한 제2 프레임의 헤더가 존재하는지 확인한다. 이 경우에도, 확인 결과 유효한 제2 프레임의 헤더가 존재하는지 여부에 따라서 헤더 정보 비교부(213)의 동작은 달라진다.Subsequently, the header
헤더 정보 비교부(213)는 유효한 제2 프레임의 헤더가 존재하지 않는 경우에 파일 포인터 설정부(212)로 파일 포인터의 재설정을 지시하는 제어 신호를 출력한다. 이에 따라, 파일 포인터 설정부(212)는 제2 파일 포인터의 위치에서 제1 파일 포인터의 위치로 이동한 후, 제1 파일 포인터의 위치를 소정의 바이트만큼 이동시켜 다시 설정한다. 이 때, 제1 파일 포인터의 위치의 재설정 동작은 상술한 것과 유사하므로 생략하기로 한다.The header
한편, 헤더 정보 비교부(213)는 유효한 제2 프레임의 헤더가 존재하는 경우에 제2 프레임의 헤더에서 제2 헤더 정보를 추출하고, 추출된 제1 헤더 정보와 추출된 제2 헤더 정보를 비교한다. 예를 들어, 헤더 정보 비교부(213)는 제1 헤더 정보에 포함된 제1 레이어 정보와 제2 헤더 정보에 포함된 제2 레이어 정보가 일치하는지 비교할 수 있다. 비교 결과, 제1 레이어 정보와 제2 레이어 정보가 일치하는 경우, 헤더 정보 비교부(213)는 연산부(214)에 평균 비트레이트의 계산을 지시 하는 제어 신호를 출력한다. On the other hand, the header
비교 결과, 제1 레이어 정보와 제2 레이어 정보가 일치하지 않는 경우, 헤더 정보 비교부(213)는 파일 포인터 설정부(212)에 파일 포인터의 재설정을 지시하는 제어 신호를 출력한다. 이에 따라, 파일 포인터 설정부(212)는 제2 파일 포인터의 위치에서 제1 파일 포인터의 위치로 이동한 후, 제1 파일 포인터의 위치를 다시 설정한다. 이 때, 제1 파일 포인터의 위치의 재설정 동작은 상술한 것과 유사하므로 생략하기로 한다.As a result of the comparison, when the first layer information and the second layer information do not match, the header
연산부(214)는 오디오 파일의 오디오 데이터 영역에 포함된 N개의 블록들 중에서 일부인 블록들에 대하여, 해당 일부 블록들에 포함된 일부 프레임들에 대하여 각각 비트레이트를 산출하고, 산출된 비트레이트의 총합을 이용된 블록의 개수와 이용된 프레임의 개수로 나눔으로써, 오디오 파일의 평균 비트레이트를 연산한다. The
본 발명의 일 실시예에서, 연산부(214)는 오디오 파일의 오디오 데이터 영역을 40 내지 50개의 블록들로 나눌 수 있다. 설명의 편의상, 연산부(214)는 오디오 파일의 오디오 데이터 영역을 40개의 블록들로 나눈다고 가정한다. 이 경우, 연산부(214)는 40개의 블록들 중 가운데에 있는 10번째 내지 30번째 블록들에 대하여 비트레이트들을 추출한 후, 평균 비트레이트를 연산할 수 있다. 또한, 이 경우, 연산부(214)는 10번째 내지 30번째 블록들에 대하여 2 내지 3개의 프레임들만을 선택하고, 선택된 프레임들에 대해서만 비트레이트들을 추출할 수 있다.In one embodiment of the present invention, the
일반적인 오디오 파일은 전주로 곡을 시작하므로, 파일의 앞부분에 있는 블록들에 대해서만 비트레이트를 추출하는 경우, 전체 파일의 평균 비트레이트와는 상당히 다른 값을 평균 비트레이트로 구하게 될 수 있다. 따라서, 파일의 중간 부분의 블록들에 대하여 비트레이트들을 추출한 후, 평균 비트레이트를 연산함으로써, 전체 파일의 평균 비트레이트와 유사한 값을 평균 비트레이트로 구할 수 있다. Since a typical audio file starts a song in the previous week, if the bitrate is extracted only for the blocks at the beginning of the file, the average bitrate may be quite different from the average bitrate of the entire file. Therefore, by extracting bitrates for blocks in the middle part of the file, and calculating the average bitrate, a value similar to the average bitrate of the entire file can be obtained as the average bitrate.
구체적으로, 연산부(214)는 다음 수학식 3, 4를 이용하여 오디오 파일의 평균 비트레이트를 연산한다.In detail, the
[수학식 3]&Quot; (3) "
여기서, SB는 각각의 블록에서 소정의 개수의 프레임들에 대한 비트레이트들의 합을 나타낸다. 또한, NB는 각각의 블록 내에서 검색할 프레임의 개수를 나타내며, BRb는 b번째 프레임에서의 비트레이트를 나타낸다. 본 발명의 일 실시예에서, 연산부(214)는 10번째 내지 30번째 블록들에 대해서 평균 비트레이트를 연산하는 경우에 NB는 20일 수 있다.Here, S B represents the sum of bit rates for a predetermined number of frames in each block. In addition, N B represents the number of frames to be searched in each block, and BR b represents the bit rate in the b-th frame. In one embodiment of the invention, the
[수학식 4]&Quot; (4) "
여기서, ABR은 오디오 파일의 평균 비트레이트를 나타낸다. 또한, ND는 전 체 오디오 파일 내에서의 검색할 블록의 개수를 나타내고, SB는 각각의 블록에서의 소정의 프레임들에 대한 비트레이트들의 합을 나타내며, NB는 각각의 블록 내에서의 검색할 프레임의 개수를 나타낸다. 본 발명의 일 실시예에서, 연산부(214)는 각각의 블록들 내에서 2개의 프레임들에 대해서만 비트레이트들을 추출할 경우, NB는 2이다. Here, ABR represents the average bitrate of the audio file. In addition, N D represents the number of blocks to search in the entire audio file, S B represents the sum of bitrates for predetermined frames in each block, and N B represents within each block. Indicates the number of frames to search. In one embodiment of the invention, the
상기 수학식 2 및 3에 따르면, 연산부(214)는 각각의 블록에 포함된 각각의 프레임들에 대한 비트레이트를 모두 구한 후, 이용된 프레임의 개수와 이용된 블록의 개수로 나눔으로써 평균 비트레이트를 구한다. 그러나, 본 발명의 다른 실시예에서, 연산부(214)는 각각의 프레임들에 대한 비트레이트를 구한 후, 이용된 프레임의 개수로 나눔으로써 한 블록에서의 평균 비트레이트를 구하고, 이와 같은 연산을 다른 블록들에 대해서도 반복함으로써, 전체적인 평균 비트레이트를 구할 수도 있다.According to Equations 2 and 3, the
도 4는 본 발명의 일 실시예에 따른 가변 비트레이트 파일의 평균 비트레이트의 계산 방법을 나타내는 흐름도이다.4 is a flowchart illustrating a method of calculating an average bitrate of a variable bitrate file according to an embodiment of the present invention.
도 4를 참조하면, 본 실시예에 따른 가변 비트레이트 파일의 평균 비트레이트의 계산 방법은 도 2에 도시된 평균 비트레이트 계산부에서 시계열적으로 처리되는 단계들로 구성된다. 따라서, 이하 생략된 내용이라 하더라도 도 2에 평균 비트레이트 계산부에 관하여 이상에서 기술된 내용은 본 실시예에 따른 평균 비트레이트의 계산 방법에도 적용된다.Referring to FIG. 4, the method for calculating the average bitrate of the variable bitrate file according to the present exemplary embodiment includes steps processed in time series by the average bitrate calculator shown in FIG. 2. Therefore, even if omitted below, the contents described above with respect to the average bitrate calculator in FIG. 2 also apply to the method of calculating the average bitrate according to the present embodiment.
400 단계에서, 속성 정보 영역의 사이즈를 검출한다. 여기서, 속성 정보 영역을 ID3 tag를 포함하는 영역일 수 있다.In
410 단계에서, 제1 파일 포인터의 위치를 설정한다.In
420 단계에서, 제1 프레임의 제1 헤더가 유효하게 존재하는지 판단한다. 판단 결과, 제1 헤더가 유효하게 존재하는 경우에는 430 단계를 수행하고, 그렇지 않은 경우에는 485 단계를 수행한다.In
485 단계에서, 제1 헤더가 유효하게 존재하지 않으므로, 제1 파일 포인터의 위치를 재설정한다. 이어서, 420 단계에서, 재설정된 제1 파일 포인터의 위치에서 제1 헤더가 유효하게 존재하는지 판단한다.In
430 단계에서, 제1 헤더가 유효하게 존재하므로, 제1 프레임의 헤더로부터 제1 헤더 정보를 추출한다. 보다 상세하게는, 제1 헤더 정보에 포함된 제1 프레임의 비트레이트 정보를 기초로 제1 프레임의 사이즈를 계산할 수 있다.In
440 단계에서, 추출된 제1 헤더 정보를 기초로 하여 제2 파일 포인터의 위치로 이동한다. 보다 상세하게는, 제1 헤더 정보로부터 계산된 제1 프레임의 사이즈를 기초로 하여 제1 파일 포인터를 제2 파일 포인터의 위치로 이동시킬 수 있다.In
450 단계에서, 제2 프레임의 제2 헤더가 유효하게 존재하는지 판단한다. 판단 결과, 제2 헤더가 유효하게 존재하는 경우에는 460 단계를 수행하고, 그렇지 않은 경우에는 480 단계를 수행한다.In
480 단계에서, 제2 파일 포인터의 위치에서 제1 파일 포인터의 위치로 이동한다. 이어서, 485 단계에서, 제1 파일 포인터의 위치를 재설정한다. 이어서, 420 단계에서, 재설정된 제1 파일 포인터의 위치에서 제1 헤더가 유효하게 존재하는지 판단한다.In
460 단계에서, 제2 헤더가 유효하게 존재하므로, 제2 프레임의 제2 헤더로부터 제2 헤더 정보를 추출한다.In operation 460, since the second header is valid, second header information is extracted from the second header of the second frame.
470 단계에서, 제1 헤더 정보와 제2 헤더 정보를 비교한다. 구체적으로, 제1 헤더 정보에 포함된 제1 레이어 정보와 제2 헤더 정보에 포함된 제2 레이어 정보를 비교한다. 비교 결과, 제1 레이어 정보와 제2 레이어 정보가 일치하는 경우에는 490 단계를 수행하고, 그렇지 않은 경우에는 485 단계를 수행한다.In
485 단계에서, 제1 파일 포인터의 위치를 재설정한다. 이어서, 420 단계에서, 재설정된 제1 파일 포인터의 위치에서 제1 헤더가 유효하게 존재하는지 판단한다.In
490 단계에서, 오디오 파일의 평균 비트레이트를 계산한다. 보다 상세하게는, 오디오 데이터 영역에 포함된 복수의 블록들 중 일부 블록들에 대하여 비트레이트들을 구한다. 또한, 일부 개수의 블록들 각각에서 소정 개수의 프레임들을 선택하여, 선택된 프레임들에 대해서만 비트레이트들을 구한다. In
구체적으로, 오디오 데이터 영역에 포함된 N개의 블록들 중 M개의 블록들에 대해서 비트레이트들을 구할 수 있다. 또한, M개의 블록들 각각에서 L개의 프레임들을 선택하여, 선택된 L개의 프레임들에 대해서만 비트레이트들을 구할 수 있다. 여기서, 선택된 블록들의 개수(M)와 각 블록 내의 선택된 프레임들의 개수(L)는 변경 가능함을 본 실시예가 속하는 기술분야에서 통상의 지식을 가진 자는 이해할 수 있다.Specifically, bitrates may be obtained for M blocks among N blocks included in the audio data region. In addition, by selecting L frames in each of the M blocks, bitrates may be obtained only for the selected L frames. Here, one of ordinary skill in the art may understand that the number M of selected blocks and the number L of selected frames in each block may be changed.
이 경우, 얻어진 M*L개의 비트레이트들의 합을 M*L로 나눔으로써, 오디오 파일의 평균 비트레이트를 구할 수 있다. 한편, 각각의 블록에서 얻어진 L개의 비트레이트들의 합을 L로 나눔으로써, 각각의 블록에서의 평균 비트레이트를 구한 후, 각각의 블록에서의 평균 비트레이트들의 합을 N으로 나눔으로써, 전체 오디오 파일의 평균 비트레이트를 구할 수 있다.In this case, the average bitrate of the audio file can be obtained by dividing the sum of the obtained M * L bitrates by M * L. On the other hand, by dividing the sum of the L bitrates obtained in each block by L, obtaining the average bitrate in each block, and then dividing the sum of the average bitrates in each block by N, the entire audio file The average bitrate of can be obtained.
이상에서, 가변 비트레이트의 파일의 평균 비트레이트의 계산 방법에 대하여 오디오 파일을 예로 하여 설명하였으나, 본 발명의 실시예는 오디오 파일에 한정되지 않고 비디오 파일 및 동영상 파일에도 적용될 수 있다. In the above, the method of calculating the average bitrate of the file of the variable bitrate has been described as an example of the audio file, but the embodiment of the present invention is not limited to the audio file but can be applied to the video file and the video file.
이상과 같이 본 발명은 비록 한정된 실시예와 도면에 의해 설명되었으나, 본 발명이 상기의 실시예에 한정되는 것은 아니며, 이는 본 발명이 속하는 분야에서 통상의 지식을 가진 자라면 이러한 기재로부터 다양한 수정 및 변형이 가능하다. 따라서, 본 발명의 사상은 아래에 기재된 특허청구범위에 의해서만 파악되어야 하고, 이와 균등하거나 또는 등가적인 변형 모두는 본 발명 사상의 범주에 속한다 할 것이다. As described above, although the present invention has been described by way of limited embodiments and drawings, the present invention is not limited to the above-described embodiments, which can be modified by those skilled in the art to which the present invention pertains. Modifications are possible. Accordingly, the spirit of the invention should be understood only by the claims set forth below, and all equivalent or equivalent modifications will fall within the scope of the invention.
또한, 본 발명에 따른 시스템은 컴퓨터로 읽을 수 있는 기록매체에 컴퓨터가 읽을 수 있는 코드로서 구현하는 것이 가능하다. 컴퓨터가 읽을 수 있는 기록매체는 컴퓨터 시스템에 의하여 읽혀질 수 있는 데이터가 저장되는 모든 종류의 기록장치를 포함한다. 기록매체의 예로는 ROM, RAM, CD-ROM, 자기 테이프, 플로피 디스 크, 광데이터 저장장치 등이 있으며, 또한 캐리어 웨이브(예를 들어 인터넷을 통한 전송)의 형태로 구현되는 것도 포함한다. 또한 컴퓨터가 읽을 수 있는 기록매체는 네트워크로 연결된 컴퓨터 시스템에 분산되어 분산방식으로 컴퓨터가 읽을 수 있는 코드가 저장되고 실행될 수 있다.In addition, the system according to the present invention can be embodied as computer readable codes on a computer readable recording medium. The computer-readable recording medium includes all kinds of recording devices in which data that can be read by a computer system is stored. Examples of recording media include ROMs, RAMs, CD-ROMs, magnetic tapes, floppy disks, optical data storage devices, and the like, and may also be implemented in the form of carrier waves (eg, transmission over the Internet). The computer readable recording medium can also be distributed over network coupled computer systems so that the computer readable code is stored and executed in a distributed fashion.
도 1은 본 발명의 일 실시예에 따른 오디오 장치를 나타내는 블록도이다.1 is a block diagram illustrating an audio device according to an embodiment of the present invention.
도 2는 도 1에 포함된 평균 비트레이트 계산부를 상세하게 나타내는 블록도이다.FIG. 2 is a detailed block diagram illustrating an average bit rate calculator included in FIG. 1.
도 3은 도 2의 평균 비트 레이트 계산부에 입력되는 오디오 파일의 일 예를 나타낸다.3 illustrates an example of an audio file input to an average bit rate calculator of FIG. 2.
도 4는 본 발명의 일 실시예에 따른 가변 비트레이트 파일의 평균 비트레이트의 계산 방법을 나타내는 흐름도이다.4 is a flowchart illustrating a method of calculating an average bitrate of a variable bitrate file according to an embodiment of the present invention.
Claims (22)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR1020080086315A KR101060490B1 (en) | 2008-09-02 | 2008-09-02 | Method and device for calculating average bitrate of a file of variable bitrate, and audio device comprising said device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR1020080086315A KR101060490B1 (en) | 2008-09-02 | 2008-09-02 | Method and device for calculating average bitrate of a file of variable bitrate, and audio device comprising said device |
Publications (2)
Publication Number | Publication Date |
---|---|
KR20100027408A KR20100027408A (en) | 2010-03-11 |
KR101060490B1 true KR101060490B1 (en) | 2011-08-30 |
Family
ID=42178381
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
KR1020080086315A KR101060490B1 (en) | 2008-09-02 | 2008-09-02 | Method and device for calculating average bitrate of a file of variable bitrate, and audio device comprising said device |
Country Status (1)
Country | Link |
---|---|
KR (1) | KR101060490B1 (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US10382718B2 (en) | 2017-12-27 | 2019-08-13 | Anapass Inc. | Frame rate detection method and frame rate conversion method |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2005037743A (en) * | 2003-07-16 | 2005-02-10 | Sony Corp | Information processor, method, and program |
-
2008
- 2008-09-02 KR KR1020080086315A patent/KR101060490B1/en not_active IP Right Cessation
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2005037743A (en) * | 2003-07-16 | 2005-02-10 | Sony Corp | Information processor, method, and program |
Also Published As
Publication number | Publication date |
---|---|
KR20100027408A (en) | 2010-03-11 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN101212648B (en) | Method and device for synchronizing data flow and metadata of content | |
JP4598627B2 (en) | Content editing apparatus and playback apparatus thereof | |
CN100583239C (en) | Reproduction device and reproduction method | |
US9183837B2 (en) | Apparatus and method for determining bit rate for audio content | |
KR20120013885A (en) | Reproducing method for audio and reproducing apparatus for audio thereof, and information storage medium | |
TWI407322B (en) | Multimedia identification system and method, and the application | |
US8369456B2 (en) | Data processing apparatus and method and encoding device | |
KR101060490B1 (en) | Method and device for calculating average bitrate of a file of variable bitrate, and audio device comprising said device | |
US20140052454A1 (en) | Method for determining format of linear pulse-code modulation data | |
JP4990375B2 (en) | Recording / playback device | |
US7149159B2 (en) | Method and apparatus for editing data streams | |
KR100573219B1 (en) | The device and the method of synchronization generation and regeneration of a caption, a stop display and a dynamic display use of a location information | |
US20180329917A1 (en) | Systems and methods for selecting digital data for archival | |
US20090257484A1 (en) | Method for audio-video encoding and apparatus for multimedia storage | |
US11269951B2 (en) | Indexing variable bit stream audio formats | |
WO2005104125A1 (en) | Record reproducing device, simultaneous record reproduction control method and simultaneous record reproduction control program | |
JP2006236475A (en) | Coded data reproduction apparatus | |
US20230197114A1 (en) | Storage apparatus, playback apparatus, storage method, playback method, and medium | |
KR100653942B1 (en) | Method for embedding/extracting additional data into/from asf file and file playback device | |
US20050197830A1 (en) | Method for calculating a frame in audio decoding | |
KR100874023B1 (en) | Method and apparatus for managing input data buffer of MP3 decoder | |
JP4961300B2 (en) | Music match determination device, music recording device, music match determination method, music recording method, music match determination program, and music recording program | |
JP6317235B2 (en) | Content server device, operation method of content server device, and computer program | |
KR100762572B1 (en) | Method and Apparatus for converting Advanced Audio Codec file into MPEG-4 Audio file | |
CN116415032A (en) | Video file reading and storing method and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A201 | Request for examination | ||
E902 | Notification of reason for refusal | ||
E701 | Decision to grant or registration of patent right | ||
GRNT | Written decision to grant | ||
FPAY | Annual fee payment |
Payment date: 20140703 Year of fee payment: 4 |
|
FPAY | Annual fee payment |
Payment date: 20151207 Year of fee payment: 5 |
|
FPAY | Annual fee payment |
Payment date: 20160701 Year of fee payment: 6 |
|
FPAY | Annual fee payment |
Payment date: 20170703 Year of fee payment: 7 |
|
LAPS | Lapse due to unpaid annual fee |