CN101184227A - Block removing filter - Google Patents

Block removing filter Download PDF

Info

Publication number
CN101184227A
CN101184227A CNA2006101387568A CN200610138756A CN101184227A CN 101184227 A CN101184227 A CN 101184227A CN A2006101387568 A CNA2006101387568 A CN A2006101387568A CN 200610138756 A CN200610138756 A CN 200610138756A CN 101184227 A CN101184227 A CN 101184227A
Authority
CN
China
Prior art keywords
filtering
block
huge square
cells
limit
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CNA2006101387568A
Other languages
Chinese (zh)
Inventor
林宗贤
蔡忠宪
林家庆
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ali Corp
Original Assignee
Ali Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ali Corp filed Critical Ali Corp
Priority to CNA2006101387568A priority Critical patent/CN101184227A/en
Publication of CN101184227A publication Critical patent/CN101184227A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Compression, Expansion, Code Conversion, And Decoders (AREA)

Abstract

A block-removing filter comprises two sets of filter calculation circuits, a transposition buffer for converting the data filtering direction, an output buffer area for storing intermediate values and final results in the calculation process, and a control and output module for judging various different condition combinations and being responsible for processing external input and output data. The filter for removing block in the invention is a filter structure suitable for pure frame picture or pure field picture coding, or frame and field picture coding macro block adjustable, and can effectively shorten the filtering time and reduce the circuit area by the configuration of internal buffer and the control of filtering flow.

Description

除区块滤波器 deblocking filter

技术领域 technical field

本发明是有关于一种影像滤波器架构,特别有关于一种适用于H.264主要层级与高层级的滤波器架构。The present invention relates to an image filter architecture, in particular to an H.264 main-level and high-level filter architecture.

背景技术 Background technique

在目前较新的视频压缩技术H.264、MPEG4中,都加入了除区块滤波器(De-blocking filter),其作用在于提高编码器的压缩率,且在译码之后,将画面进行去除区块的平滑滤波,有效提升输出画面的质量。In the current newer video compression technologies H.264 and MPEG4, a de-blocking filter (De-blocking filter) is added, its function is to improve the compression rate of the encoder, and after decoding, the picture is removed Block smoothing and filtering can effectively improve the quality of the output image.

根据H.264/AVC的标准,滤波器在进行滤波时,是将要滤波的边界左右各取出4个像素(pixel),进行滤波的动作。如图1公知除区块滤波器滤波动作示意图所示,滤波的顺序须先完成水平方向的滤波,接着进行垂直方向的滤波。如果将一个巨方块分成16个小区块,以一个4×4(像素)的小区块来看,就要进行四次水平方向滤波与四次垂直方向滤波才算完成整个滤波的动作。According to the H.264/AVC standard, when the filter performs filtering, four pixels (pixels) are extracted from the left and right sides of the boundary to be filtered, and the filtering is performed. As shown in FIG. 1 , a schematic diagram of the filtering operation of the known deblocking filter, the filtering sequence must first complete the horizontal filtering, and then perform the vertical filtering. If a giant block is divided into 16 small blocks, in terms of a 4×4 (pixel) small block, four times of horizontal filtering and four times of vertical filtering are required to complete the entire filtering action.

为了要完成上述的动作,并且兼顾速度上的需求,在现有的一些设计中,主要探讨的部分,大多是通过设计滤波的顺序,使得垂直跟水平方向的滤波动作能同时进行;其次由于在进行滤波时,每个4×4小区块都必须经过四次滤波的动作,因此必须设立一些缓存器缓冲区,来储存只完成部份滤波动作的区块。因此在设计中若是能越快完成一个区块的完整滤波动作,则所需要用到的缓冲区越少,设计的面积也越小,而通过良好的滤波顺序也能达到这个要求。In order to complete the above actions and take into account the speed requirements, in some existing designs, the main part of the discussion is mostly through the design of the filtering sequence, so that the vertical and horizontal filtering actions can be performed simultaneously; secondly, due to the When performing filtering, each 4×4 small block must undergo four filtering operations, so some register buffers must be set up to store the blocks that only partially complete the filtering operation. Therefore, if the complete filtering action of a block can be completed faster in the design, the less buffer space is needed and the design area is smaller, and this requirement can also be achieved through a good filtering sequence.

请参阅图2,为公知除区块滤波器滤波顺序示意图,是目前现有设计中较常见的滤波顺序。上面最大的方块是一亮度(Luma)的巨方块,下面较小的则是相对应的色度(Chroma)巨方块。其中以一4×4的小区块作为切割单位,每个小区块要滤波的边界共有四条,每条边界上的数字代表了滤波的顺序。由于要遵守先做水平方向,才做垂直方向的规则,由图上最左上角的小区块,可看出垂直方向的第一条边界,必须等到水平方向的两条边界都滤波完的后才能开始进行。边界上相同数字则代表进行滤波的时间也相同。Please refer to FIG. 2 , which is a schematic diagram of a known filtering sequence of a deblocking filter, which is a relatively common filtering sequence in current existing designs. The largest block above is a giant block of Luma, and the smaller one below is the corresponding giant block of Chroma. A 4×4 small block is used as the cutting unit, and each small block has four boundaries to be filtered, and the numbers on each boundary represent the order of filtering. Since the rule of doing the horizontal direction first, then the vertical direction, it can be seen from the small block in the upper left corner of the picture that the first boundary in the vertical direction must wait until the two boundaries in the horizontal direction are filtered. Get started. The same number on the boundary means that the filtering time is also the same.

然而公知的除区块滤波器的架构只能处理一张图中只包含桢图(Frame)或场图(Filed)编码的巨方块(Macroblock),是针对H.264主要层级所设计;但是在H.264高层级中,在同一张图中的巨方块,其桢、场编码可随着每个巨方块对(Macroblock pair)而改变,所以公知除区块滤波器的架构是无法适用。由于每个巨方块在进行滤波时,同时还须从上面及左边的巨方块取出边界部分的4个像素。因此若是桢、场编码会随巨方块改变,则在进行交界处的滤波动作时,在不同的边界条件下,滤波过程会跟纯桢图或纯场图编码有所不同,因此在设计方面必须考虑这些不同的边界条件。However, the known architecture of the deblocking filter can only handle macroblocks that only contain Frame or Filed codes in one picture, and are designed for the main level of H.264; but in H. 264 high-level, the frame and field codes of the macroblocks in the same picture can be changed with each macroblock pair (Macroblock pair), so the known structure of the deblocking filter cannot be applied. Since each giant block is performing filtering, 4 pixels of the border part must be taken out from the top and left giant blocks at the same time. Therefore, if the frame and field coding will change with the giant block, when performing the filtering action at the junction, under different boundary conditions, the filtering process will be different from the pure frame image or pure field image encoding, so the design must be Consider these different boundary conditions.

发明内容 Contents of the invention

有鉴于此,本发明是提供一可适用于纯桢图或纯场图,亦或是桢、场图编码巨方块可调变(Macroblock-Adaptive Frame-Field Coding)时的滤波器架构。且本发明透过滤波架构的设计,及滤波流程的控制,可达到缩小电路面积及缩短滤波时间的功效。In view of this, the present invention provides a filter architecture applicable to a pure frame image or a pure field image, or a macroblock-adaptive frame-field coding (Macroblock-Adaptive Frame-Field Coding). Moreover, the present invention can achieve the effects of reducing the circuit area and shortening the filtering time through the design of the filtering structure and the control of the filtering process.

为达上述的目的本发明提供一种除区块滤波器,其特征在于,包括一水平滤波器,是用于接收一巨方块,并将该巨方块进行水平方向的滤波;一垂直滤波器,是用于将该巨方块进行垂直方向的滤波;一输出缓冲区,是连接于该水平滤波器与该垂直滤波器间,用于暂存经水平方向滤波后的该巨方块及经垂直方向滤波后的该巨方块;一转置缓冲区,是连接于该水平滤波器、该垂直滤波器及该输出缓冲区,接收已做完水平方向滤波后的该巨方块的小区块,用于将已做完水平方向滤波后的该巨方块的小区块转置以供该垂直滤波器进行垂直方向的滤波;一数据管理单元,是连接于输出缓存器,用以判断该巨方块的编码状态,及输出做完水平滤波与垂直滤波的该巨方块;及一控制单元,是连接于该水平滤波器、该垂直滤波器、该转置缓冲区及该数据管理单元,用以控制该水平滤波器、该垂直滤波器、该转置缓冲区及该数据管理单元执行对该巨方块的滤波动作。For reaching above-mentioned purpose, the present invention provides a kind of deblocking filter, it is characterized in that, comprises a horizontal filter, is to be used for receiving a giant block, and this giant block is carried out the filtering of horizontal direction; A vertical filter, It is used to filter the giant block in the vertical direction; an output buffer is connected between the horizontal filter and the vertical filter, and is used to temporarily store the giant block filtered in the horizontal direction and filtered in the vertical direction After the giant block; a transposition buffer is connected to the horizontal filter, the vertical filter and the output buffer, and receives the small block of the giant block after the horizontal filter has been done, and is used to convert the The small blocks of the giant block after horizontal filtering are transposed for the vertical filter to perform vertical filtering; a data management unit is connected to the output buffer to judge the encoding state of the mega block, and Outputting the giant block after horizontal filtering and vertical filtering; and a control unit connected to the horizontal filter, the vertical filter, the transposition buffer and the data management unit for controlling the horizontal filter, The vertical filter, the transpose buffer and the data management unit perform filtering operations on the megablock.

本发明另提出一种除区块滤波方法,其特征在于,首先读取一第一巨方块滤波时所需的一上边巨方块;接着进行一第一巨方块的滤波,同时读取一第二巨方块所需的上边巨方块;然后进行一第二巨方块的滤波,同时将该第一巨方块滤波的结果写回一动态随机存取内存中;最后将该第二巨方块的滤波结果写回该动态随机存取内存中。The present invention also proposes a method for removing block filtering, which is characterized in that at first reading a first giant block required for filtering; then performing filtering of a first giant block and reading a second block simultaneously The upper giant block required by the giant block; then carry out the filtering of a second giant block, and write back the filtering result of the first giant block in a dynamic random access memory at the same time; finally write the filtering result of the second giant block back into the DRAM.

附图说明 Description of drawings

图1是为公知除区块滤波器滤波动作示意图;FIG. 1 is a schematic diagram of a filtering action of a known deblocking filter;

图2是为公知除区块滤波器滤波顺序示意图;Fig. 2 is a schematic diagram of the filtering sequence of a known deblocking filter;

图3是为本发明除区块滤波器架构数据控制流程图;Fig. 3 is a flow chart of data control for the deblocking filter architecture of the present invention;

图4是为本发明除区块滤波器是统架构图;Fig. 4 is a system diagram for removing the blocking filter of the present invention;

图5是为本发明输出缓冲区的配置图;Fig. 5 is a configuration diagram for the output buffer of the present invention;

图6是为本发明转置缓冲区的配置图;Fig. 6 is a configuration diagram for the transposition buffer of the present invention;

图7是为本发明除区块波器中目前巨方块为桢图编码、上边巨方块为场图编码的滤波顺序示意图Fig. 7 is a schematic diagram of the filtering sequence for the current giant block in the block wave filter of the present invention as frame image encoding and the upper giant block as field image encoding

图8是为本发明除区块滤波器正常状况下的滤波顺序示意图。FIG. 8 is a schematic diagram of the filtering sequence under normal conditions of the deblocking filter of the present invention.

符号说明Symbol Description

除区块滤波器1deblocking filter 1

控制单元101control unit 101

输入缓存器102input buffer 102

水平滤波器103Horizontal filter 103

垂直滤波器104vertical filter 104

转置缓冲区105transpose buffer 105

缓存器1051Buffer 1051

输出缓冲区106output buffer 106

第一暂存缓冲区1061The first scratch buffer 1061

第二暂存缓冲区1062Second scratch buffer 1062

缓存器数组1063Buffer array 1063

数据管理单元107Data Management Unit 107

数据处理单元108Data processing unit 108

运算比对单元109Operation comparison unit 109

直接内存存取单元110Direct Memory Access Unit 110

动态随机存取内存2DRAM 2

小区块A、B、C、D、E、F、G、H、I、J、K、L、M、N、O、P、Q、R、S、T、U、V、W、XSmall blocks A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X

具体实施方式 Detailed ways

由于一组巨方块包含了一个亮度巨方块(Y)与两个色度巨方块(Cb,Cr),以及每个巨方块在进行滤波时,同时还须从上边及左边的巨方块取出边界部分的4个像素。本发明影像滤波器架构在做目前巨方块的滤波时,需向动态随机存取内存读取上边巨方块的资料,以及将前一巨方块所需的资料暂存起来,以供目前巨方块滤波使用。Since a group of giant squares includes a luma giant square (Y) and two chrominance giant squares (Cb, Cr), and when filtering each giant square, it is necessary to take out the boundary part from the upper and left giant squares of 4 pixels. When the image filter architecture of the present invention performs the filtering of the current giant block, it needs to read the data of the upper block from the dynamic random access memory, and temporarily store the data required by the previous block for the filtering of the current block use.

请参阅图3本发明除区块滤波器架构数据控制流程图,本发明影像滤波器架构整体数据控制流程的步骤首先是当前一巨方块准备好后(是指左边巨方块中目前巨方块所需的滤波数据已储存于一缓存器中时),便开始于动态随机存取内存中读取亮度方块在滤波时所需的上边巨方块像素(如图3步骤S301)。而读完亮度方块在滤波时所需的上边巨方块后,便进行亮度方块的滤波,同时于动态随机存取内存中读取色度巨方块所需的上边巨方块像素(如图3步骤S303)。接着当完成亮度方块的滤波及读取色度巨方块所需的上边巨方块像素后,便开始色度方块的滤波,同时将亮度方块滤波的结果写回动态随机存取内存中(如图3步骤S305)。最后当色度巨方块的滤波完成后,将色度巨方块的结果写回动态随机存取内存中(如图3步骤S307)。Please refer to Fig. 3 the flow chart of data control of the block filter architecture of the present invention, the steps of the overall data control flow of the image filter architecture of the present invention are at first after the current giant block is ready (referring to the current giant block in the left giant block) When the filtered data has been stored in a register), it starts to read the upper giant block pixels required by the luma block for filtering in the DRAM (step S301 in FIG. 3 ). After reading the required upper giant square of the brightness square when filtering, the filtering of the brightness square is carried out, and at the same time, the upper giant square pixels required by the chroma giant square are read in the dynamic random access memory (step S303 in FIG. 3 . ). Then, after completing the filtering of the luma block and reading the pixels of the upper giant block required by the chroma block, the filtering of the chroma block is started, and at the same time, the filtered result of the luma block is written back to the dynamic random access memory (as shown in Figure 3 Step S305). Finally, after the filtering of the chrominance giant block is completed, the result of the chrominance giant block is written back into the dynamic random access memory (see step S307 in FIG. 3 ).

上述的流程控制,可以在进行亮度与色度滤波时,同时对动态随机存取内存进行色度方块的读取,及亮度方块的写回。由于动态随机存取记忆的存取并不是及时的,在发出要求(Request)的后,需要与其它模块一起排队,过一段时间的后才能得到回复。因此这样做的主要原因,便是通过将动态随机存取记忆的延迟时间隐藏在滤波的过程中,以缩短整个滤波过程所需的时间。The above flow control can simultaneously read the chroma block and write back the luminance block to the DRAM while performing luma and chroma filtering. Because the access of dynamic random access memory is not timely, after sending out the request (Request), it needs to be queued with other modules, and can only get a reply after a period of time. Therefore, the main reason for doing this is to shorten the time required for the entire filtering process by hiding the delay time of the DRAM in the filtering process.

接着请参阅图4,是为本发明除区块滤波器是统架构图。本发明除区块滤波器1是包括控制单元101、输入缓存器102、水平滤波器103、垂直滤波器104、转置缓冲区105、输出缓冲区106、数据管理单元107、数据处理单元108、运算比对单元109及直接内存存取单元110。其中直接内存存取单元110是产生动态随机存取内存2的地址,以供数据管理单元107将数据写入动态随机存取内存2。输入缓存器102是用于暂存将从动态随机存取内存2中读取的巨方块,包括亮度巨方块及色度巨方块。当亮度巨方块与色度巨方块已准备好后,便提供给水平滤波器103开始作水平方向的滤波,而在进行亮度与色度滤波时,同时对动态随机存取内存2进行色度方块的读取。而数据处理单元108是用于侦测相邻巨方块的编码状态,如侦测相邻巨方块为桢图(Frame)或场图(Filed)编码的巨方块,或是其桢、场编码可改变的巨方块对(Macroblock pair)等;而运算比对单元109是用于巨方块参数的处理,如Alpha、Beta及bs值的比对,进而可让控制单元101对各种不同情况组合做出对应的滤波控制。Next, please refer to FIG. 4 , which is a system diagram of the deblocking filter of the present invention. The deblocking filter 1 of the present invention includes a control unit 101, an input buffer 102, a horizontal filter 103, a vertical filter 104, a transpose buffer 105, an output buffer 106, a data management unit 107, a data processing unit 108, An operation comparison unit 109 and a direct memory access unit 110 . The direct memory access unit 110 generates the address of the DRAM 2 for the data management unit 107 to write data into the DRAM 2 . The input register 102 is used for temporarily storing macroblocks to be read from the DRAM 2 , including luma macroblocks and chrominance macroblocks. When the luma giant block and the chroma macro block are ready, they are provided to the horizontal filter 103 to start filtering in the horizontal direction, and when performing luma and chroma filtering, the chroma block is simultaneously performed on the DRAM 2 to read. The data processing unit 108 is used to detect the encoding status of adjacent giant blocks, such as detecting that the adjacent giant blocks are Frame or field encoded giant blocks, or that the frame and field encoding can be Changed macroblock pair (Macroblock pair), etc.; and the operation comparison unit 109 is used for the processing of the macroblock parameters, such as the comparison of Alpha, Beta and bs values, and then allows the control unit 101 to make combinations of various situations out the corresponding filter control.

而除区块滤波器1为了能同时间进行水平及垂直方向的滤波动作,架构上使用两套的滤波器(Filter)计算电路,水平滤波器103及垂直滤波器104来做滤波;转置缓冲区105(Transpose Buffer)用来转换数据滤波方向;通过输出缓冲区106储存计算过程中的中间值和最终结果;以及利用控制单元101、数据管理单元107、运算比对单元109及数据处理单元108来判断各种不同情况组合及负责对外部输入、输出资料进行处理。In addition to blocking filter 1, in order to perform horizontal and vertical filtering operations at the same time, two sets of filter (Filter) calculation circuits are used in the architecture, horizontal filter 103 and vertical filter 104 for filtering; transpose buffer District 105 (Transpose Buffer) is used for converting data filtering direction; Stores the intermediate value and the final result in the calculation process by output buffer 106; To judge various combinations of different situations and be responsible for processing external input and output data.

本发明除区块滤波器1通过同时进行水平方向及垂直方向的滤波,设计中使用了两套计算电路,相较于先将水平方向滤波完成,再进行垂直滤波的设计,只需要花费1/2的时间就能完成一组巨方块的滤波。The deblocking filter 1 of the present invention performs filtering in the horizontal direction and vertical direction at the same time, and two sets of calculation circuits are used in the design. Compared with the design of completing the horizontal filtering first and then performing the vertical filtering, it only costs 1/ The time of 2 can complete the filtering of a group of giant blocks.

此外为了避免不必要的动态随机存取内存2存取,以提高动态随机存取内存2的利用效率,控制单元101在进行滤波前的判断时,假如目前所要进行滤波的巨方块,其最上边或最左边不需要进行滤波,则在滤波时会略过读取亮度方块跟读取色度方块的动作,不向动态随机存取内存2读取上边巨方块的数据;另外在每次做完一组巨方块的滤波的后,便直接将下一组巨方块要进行滤波的数据直接存到位于输出缓冲区106中,这样在进行下组巨方块滤波时,就不用再向动态随机存取内存2读取左边巨方块的数据。上面所提的这两项设计也能明显的缩短滤波的平均时间。In addition, in order to avoid unnecessary access to the dynamic random access memory 2, to improve the utilization efficiency of the dynamic random access memory 2, when the control unit 101 performs the judgment before filtering, if the giant block to be filtered at present, the uppermost Or the far left does not need to be filtered, then the actions of reading the brightness square and the chroma square will be skipped during filtering, and the data of the giant square above will not be read from the dynamic random access memory 2; After the filtering of one group of giant blocks, the data to be filtered by the next group of giant blocks is directly stored in the output buffer 106, so that when performing the filtering of the next group of giant blocks, there is no need to use dynamic random access again. Memory 2 reads the data of the giant square on the left. The two designs mentioned above can also significantly shorten the average time of filtering.

请参阅图5是为本发明输出缓冲区的配置图。输出缓冲区106的配置包括第一暂存缓冲区1061、第二暂存缓冲区1062及缓存器数组1063(register array)。上面的缓存器数组1063用来储存进行最上边边界滤波时,所需用到的上边巨方块像素,左边第二暂存缓冲区1062用来储存进行最左边边界滤波时所需的相邻巨方块像素。所需储存的相邻巨方块数量,在H264主层级时,由于没有桢、场图编码巨方块可调变(Macroblock-Adaptive Frame-Field Coding)的考虑,因此只需用到4×16×8(位)的暂存缓冲区,读取的方式也较单纯。而在H264高层级中,若是桢、场图编码巨方块可调变时,传送的巨方块是成对的,因此要储存的数量就变为原来的两倍8×16×8(位),存取的方式也会随着目前巨方块与相邻巨方块的编码方式不同而有所改变。而第一暂存缓冲区1061是为目前巨方块的输出缓冲区。第一暂存缓冲区1061及第二暂存缓冲区1062是为一静态随机存取内存。Please refer to FIG. 5 which is a configuration diagram of the output buffer of the present invention. The configuration of the output buffer 106 includes a first temporary buffer 1061 , a second temporary buffer 1062 and a register array 1063 (register array). The upper register array 1063 is used to store the upper giant square pixels required for the uppermost border filtering, and the second temporary storage buffer 1062 on the left is used to store the adjacent giant square pixels required for the leftmost border filtering. pixels. The number of adjacent macroblocks that needs to be stored is only 4×16×8 because there is no consideration of macroblock-adaptive frame-field coding (Macroblock-Adaptive Frame-Field Coding) at the H264 main level (bit) temporary storage buffer, and the way of reading is relatively simple. In the high-level H264, if the frame and field image encoding megablocks are adjustable, the transmitted megablocks are in pairs, so the number to be stored becomes twice the original 8×16×8 (bits), The access method will also change with the encoding methods of the current giant block and the adjacent giant block. The first temporary buffer 1061 is the output buffer of the current giant block. The first temporary buffer 1061 and the second temporary buffer 1062 are a static random access memory.

请参阅图6是为本发明转置缓冲区的配置图。在除区块滤波器1计算的过程中,会将经过第一次水平方向滤波的区块值存入第一暂存缓冲区1061,接着再取出进行第二次的水平滤波动作,做完的后的值存入转置缓冲区105中。此转置缓冲区105是由7组4×4×8(位)的缓存器1051所组成,每一组4×4×8的缓存器1051可用来储存一个做完水平方向滤波的小区块,并由垂直方向读出进行另一方向的滤波。等到垂直方向的滤波也做完的后,最后再写回第一暂存缓冲区1061中。图6右边显示为4×4×8的缓存器1051的配置架构图,当做完水平方向滤波的小区块,便将做完的小区块由第一输入端输入,再由第一输出端输出,以做垂直方向的滤波。而当垂直方向的滤波做完,便由第二输入端输入,再由第二输出端读出,以正确的写回第一暂存缓冲区1061中。采用这样的做法来减少缓存器的个数以缩小电路的面积。而当第一暂存缓冲区1061中所有小区块皆做完滤波后,便可透过数据管理单元107将处理好的巨方块数据写到动态随机存取内存2中,而此动作是可当色度方块在滤波时,同时将以滤波完成的亮度方块写回动态随机存取内存2中,如上控制流程所述。Please refer to FIG. 6 which is a configuration diagram of the transposition buffer of the present invention. During the calculation process of deblocking filter 1, the block value filtered in the horizontal direction for the first time will be stored in the first temporary storage buffer 1061, and then taken out for the second horizontal filtering action, and the completed After the value is stored in the transpose buffer 105. The transposition buffer 105 is composed of seven groups of 4×4×8 (bit) registers 1051, and each group of 4×4×8 registers 1051 can be used to store a small block that has been filtered in the horizontal direction. And the filtering in the other direction is performed by reading in the vertical direction. After the filtering in the vertical direction is also completed, write back to the first temporary buffer 1061 at last. The right side of FIG. 6 shows the configuration structure diagram of the 4×4×8 buffer 1051. When the small block for horizontal filtering is completed, the completed small block is input from the first input terminal and then output from the first output terminal. for vertical filtering. And when the filtering in the vertical direction is completed, it is input from the second input terminal and read out from the second output terminal, so as to write back to the first temporary buffer 1061 correctly. This approach is used to reduce the number of registers to reduce the area of the circuit. And when all the small blocks in the first temporary storage buffer 1061 have been filtered, the processed giant block data can be written into the DRAM 2 through the data management unit 107, and this action can be used as When the chroma block is filtering, it writes the filtered luma block back into the DRAM 2 at the same time, as described in the above control process.

而上述每个缓存器1051的输入输出皆只从固定的缓存器输入输出,减少了绕线复杂度与电路面积,而针对桢、场图编码巨方块可调变时,数据读取与写入方式也做了相应的改变与设计,使得整个架构在一般的情况跟桢、场图编码巨方块可调变时皆能运作的很顺畅,不会浪费额外的缓存器与滤波的时间。The input and output of each buffer 1051 mentioned above are only input and output from a fixed buffer, which reduces the complexity of wiring and circuit area, and when the frame and field image coding giant blocks are adjustable, data reading and writing The method has also been changed and designed accordingly, so that the entire architecture can operate smoothly when the frame and field image encoding giant blocks are adjustable under normal conditions, without wasting additional buffer and filtering time.

所以输出缓冲区106及转置缓冲区105的架构于H264主层级与高层级皆适用,唯数据读取、写入方式在高层级时较为复杂,会根据目前巨方块与相邻巨方块的编码方式不同而有不同。Therefore, the structure of the output buffer 106 and the transposition buffer 105 is applicable to both the main level and the high level of H264, but the data reading and writing method is more complicated at the high level, and will be based on the encoding of the current megablock and adjacent megablocks There are different ways.

而输出缓冲区106的数据存取动作在目前巨方块为桢图编码,上方巨方块为场图编码时,是与一般情况下有所不同。如图5所示,为了减少绕线与控制的复杂度,每组用来储存小区块的缓存器数组1063,其在各方向的输入输出都是从同一组缓存器,因此并不能任意指定其中任四个缓存器去存取其中的资料。在一般的情况下,除区块波器1的数据存取方式是以目前巨方块的编码方式为主,目前巨方块是场图编码,则滤波时数据存取方式为场图方式存取,反的亦然。只有在上叙的特殊状况下,虽然目前巨方块为桢图编码,但当与上边场图的巨方块进行滤波时,数据必须采用场图方式存取,等到做完与上边巨方块的间的两条边界滤波后,便切换回以桢图方式存取。The data access action of the output buffer 106 is different from the general situation when the current giant block is frame image encoding and the upper giant block is field image encoding. As shown in FIG. 5 , in order to reduce the complexity of wiring and control, each set of register arrays 1063 used to store small blocks has its input and output from the same set of registers in all directions, so it cannot be arbitrarily designated. Any of the four registers is used to access the data therein. Under normal circumstances, the data access method of the block filter 1 is based on the encoding method of the current giant block, and the current giant block is field image encoding, so the data access method during filtering is field image access. And vice versa. Only in the special situation described above, although the current giant block is coded as a frame image, when filtering with the giant block of the upper field map, the data must be accessed in the form of a field map. After the two borders are filtered, switch back to frame image access.

请参阅图7,是为本发明除区块波器中目前巨方块为桢图编码、上边巨方块为场图编码的滤波顺序示意图;及图8是为本发明除区块波器正常状态下的滤波顺序示意图。在设计中为了各种不同的边界条件,将滤波的顺序改变成图7及图8所示。图7中当目前的巨方块为桢图编码,上面巨方块为场图编码时,要做左边垂直方向的第一条边界,必须使用到上边两个小区块中的像素。这是因为当上方为场图编码,在进行滤波动作时,必须由目前桢图编码的巨方块中,取出四个都是顶场或底场的像素,所以垂直方向的滤波时间必须往后延迟,直到上两个小区块做完水平方向滤波后才能开始进行。而图8是为本发明除区块滤波器正常状况下的滤波顺序示意图,同样遵守先做水平方向,才做垂直方向的规则来做滤波,但滤波的方向是由左边垂直方向的第一条边界开始作,不同于以往的一般滤波进行的方向。其次因为输出缓冲区106也兼具了滤波时中间值的暂存区,因此为了避免第一暂存缓冲区1061同时间对同一地址进行读写的动作,所以改变了滤波进行的方向。Please refer to FIG. 7 , which is a schematic diagram of the filtering sequence in which the current giant block is frame image encoding and the upper giant block is field image encoding in the deblocking wave device of the present invention; Schematic diagram of the filtering sequence. For various boundary conditions in the design, the order of filtering is changed as shown in Figure 7 and Figure 8. In Figure 7, when the current giant block is coded as a frame image and the giant block above is coded as a field image, to make the first boundary in the vertical direction on the left, the pixels in the two small blocks above must be used. This is because when the upper field image is coded, four pixels of the top field or bottom field must be taken out from the giant block of the current frame image code when performing the filtering action, so the filtering time in the vertical direction must be delayed , it cannot start until the last two small blocks have finished filtering in the horizontal direction. Fig. 8 is a schematic diagram of the filtering order of the block filter of the present invention under normal conditions. It also obeys the rule that the horizontal direction is performed first, and then the vertical direction is used for filtering, but the filtering direction is the first one in the vertical direction on the left. The boundary starts to work, which is different from the direction of general filtering in the past. Secondly, because the output buffer 106 also has a temporary storage area for intermediate values during filtering, in order to prevent the first temporary buffer 1061 from reading and writing the same address at the same time, the direction of filtering is changed.

为了进一步解释滤波进行的方向及巨方块的滤波动作,接着请参阅图4本发明除区块滤波器是统架构图,及图7本发明除区块波器中目前巨方块为桢图编码、上边巨方块为场图编码的滤波顺序示意图。当本发明除区块滤波器中目前巨方块为桢图编码、上边巨及方块为场图编码的滤波状况下时,同样是先做上面亮度巨方块接着做下面两个色度巨方块。其滤波动作为一开始水平滤波器103是依序对亮度巨方块垂直方向的小区块进行第一边的水平滤波(如图7编号1、2、3、4),并于执行完第一边的水平滤波后,写入输出缓冲区106中。然后水平滤波器103依序于输出缓冲区106中读出亮度方块垂直方向的小区块,并进行第二边的水平滤波(如图7编号5、6、7、8),且于执行完第二边的水平滤波后,写入转置缓冲区105中。而因为当上方为场图编码,在进行滤波动作时,必须由目前桢图编码的巨方块中,取出四个都是顶场或底场的像素,所以小区块A垂直方向的滤波时间(如图7编号8)必须往后延迟,以致小区块A的垂直滤波是等到小区块A及小区块B(一小区块对)都做完水平方向的滤波后再开始执行。而同理于小区块E、I、M,及色度方块的小区块Q、S、U、W。于执行小区块A的垂直滤波时,是于转置缓冲区105中读出做完第一边及第二边水平滤波的小区块A(如图7做完滤波编号1、5的小区块A),以执行小区块A的第一边垂直滤波(如图7执行小区块A编号8的滤波),然后再将小区块A暂存于转置缓冲区105中。然后同理于转置缓冲区105中读出做完第一边及第二边水平滤波的小区块B(如图7做完编号2、6滤波的小区块B),以执行小区块B编号9的垂直滤波。将做完水平及垂直滤波的小区块暂存于输出缓冲区106(如图7做完编号1、5、8、9滤波的小区块A)。最后当亮度巨方块中所有小区块(区块A~区块P)都做完滤波后便将整个亮度巨方块由输出缓冲区106写回动态随机存取内存2中。而同理执行色度巨方块的滤波。In order to further explain the direction of filtering and the filtering action of the giant block, please refer to FIG. 4, which is a system diagram of the deblocking filter of the present invention, and FIG. The big square above is a schematic diagram of the filtering sequence of field image coding. When the current giant block in the deblocking filter of the present invention is frame-image coded, and the upper block and block are field-map coded, the upper luminance giant block is first made and then the lower two chrominance giant blocks are made. Its filtering action is that initially the horizontal filter 103 performs the horizontal filtering of the first side on the small blocks in the vertical direction of the luminance macroblock in sequence (as shown in Figure 7 numbered 1, 2, 3, 4), and after the first side is executed After horizontal filtering of , it is written into the output buffer 106 . Then the horizontal filter 103 reads out the small blocks in the vertical direction of the luminance square in the output buffer 106 in sequence, and performs horizontal filtering on the second side (as shown in Figure 7 numbered 5, 6, 7, 8), and after executing the second After the horizontal filtering of the two sides, it is written into the transposition buffer 105 . And because when the upper part is the field image encoding, when performing the filtering action, it is necessary to take out four pixels of the top field or the bottom field from the giant block of the current frame image encoding, so the filtering time in the vertical direction of the small block A (such as No. 8) in FIG. 7 must be delayed, so that the vertical filtering of the small block A is executed after the horizontal filtering of the small block A and the small block B (a small block pair) is completed. And the same is true for the small blocks E, I, M, and the small blocks Q, S, U, W of the chroma square. When performing the vertical filtering of the small block A, read out the small block A that has completed the horizontal filtering of the first side and the second side in the transposition buffer 105 (such as the small block A with the filter numbers 1 and 5 completed in FIG. 7 ) to perform the vertical filtering of the first side of the small block A (as shown in FIG. Then read out the small block B that has finished the horizontal filtering of the first side and the second side in the transposition buffer 105 (such as the small block B that has finished numbering 2 and 6 filtering in Figure 7), to execute the numbering of the small block B 9 vertical filters. Temporarily store the small blocks that have been filtered horizontally and vertically in the output buffer 106 (such as the small blocks A that have been filtered with numbers 1, 5, 8, and 9 in FIG. 7 ). Finally, after all the small blocks (block A~block P) in the luminance macroblock have been filtered, the entire luminance macroblock is written back into the DRAM 2 from the output buffer 106 . In the same way, the filtering of the chroma megablock is performed.

接着请参阅图4本发明除区块滤波器是统架构图,及图8本发明除区块滤波器正常状况下的滤波顺序示意图。当本发明除区块滤波器正常状况下(纯桢图或纯场图)的滤波时,是先做上面亮度巨方块接着做下面两个色度巨方块。而一开始水平滤波器103是依序对亮度巨方块垂直方向的小区块进行第一边的水平滤波(如图8编号1、2、3、4),并于执行完第一边的水平滤波后,写入输出缓冲区106中。然后水平滤波器103依序于输出缓冲区106中读出亮度方块垂直方向的小区块,并进行第二边的水平滤波(如图8编号5、6、7、8),且于执行完第二边的水平滤波后,写入转置缓冲区105中。当水平滤波执行到编号7的同时,于转置缓冲区105中读出做完第一边及第二边水平滤波的小区块A(如图8做完编号1、5滤波的小区块A),以执行小区块A的第一边垂直滤波(如图8执行小区块A编号7的滤波),然后再将小区块A暂存于转置缓冲区105中。然后同理做小区块B编号8的垂直滤波。将做完水平及垂直滤波的该小区块暂存于输出缓冲区106(如图8做完编号1、5、7、8滤波的小区块A)。最后当亮度巨方块中所有小区块(区块A~区块P)都做完滤波后便将整个亮度巨方块由输出缓冲区106写回动态随机存取内存2中。而同理执行色度巨方块的滤波。Next, please refer to FIG. 4 , a system diagram of the deblocking filter of the present invention, and FIG. 8 , a schematic diagram of the filtering sequence of the deblocking filter of the present invention under normal conditions. When the present invention removes the block filter under normal conditions (pure frame image or pure field image) for filtering, the upper luminance giant block is made first and then the lower two chrominance giant blocks are made. At the beginning, the horizontal filter 103 sequentially performs the horizontal filtering of the first side on the small blocks in the vertical direction of the luminance macroblock (as shown in the numbers 1, 2, 3, and 4 in Figure 8), and performs the horizontal filtering of the first side After that, it is written into the output buffer 106. Then the horizontal filter 103 reads out the small blocks in the vertical direction of the luminance square in the output buffer 106 in sequence, and performs the horizontal filtering of the second side (as shown in Figure 8, No. 5, 6, 7, 8), and after the execution of the second After the horizontal filtering of the two sides, it is written into the transposition buffer 105 . When the horizontal filtering is executed to number 7, the small block A that has completed the horizontal filtering of the first side and the second side is read in the transposition buffer 105 (such as the small block A that has completed the filtering of numbers 1 and 5 in Figure 8) , to perform the vertical filtering of the first side of the small block A (as shown in FIG. 8 , the filtering of the small block A number 7 is performed), and then temporarily store the small block A in the transposition buffer 105 . Then do the vertical filtering of the small block B number 8 in the same way. Temporarily store the small block after horizontal and vertical filtering in the output buffer 106 (such as small block A with numbers 1, 5, 7, and 8 filtered in FIG. 8 ). Finally, after all the small blocks (block A~block P) in the luminance macroblock have been filtered, the entire luminance macroblock is written back into the DRAM 2 from the output buffer 106 . In the same way, the filtering of the chroma megablock is performed.

但是,以上所述,为本发明较佳的具体实施例的详细说明与附图,本发明的特征并不局限于此,并非用以限制本发明,本发明的所有范围应以权利要求为准,凡合于本发明权利要求的精神与其类似变化的实施例,皆应包含于本发明的范畴中,任何熟悉该项技术者在本发明的领域内,可轻易思及的变化或修饰皆可涵盖在本案的权利要求范畴之内。However, the above descriptions are detailed descriptions and accompanying drawings of preferred specific embodiments of the present invention. The features of the present invention are not limited thereto, and are not intended to limit the present invention. All scopes of the present invention should be based on the claims , all embodiments that conform to the spirit of the claims of the present invention and similar changes thereof shall be included in the scope of the present invention, and any change or modification that can be easily conceived by those skilled in the art in the field of the present invention is all possible fall within the scope of the claims in this case.

Claims (18)

1. a deblocking filter is characterized in that, comprising:
One horizontal filter is to be used to receive a huge square, and this huge square is carried out the filtering of horizontal direction;
One vertical filter is to be used for this huge square is carried out the filtering of vertical direction;
One output buffer is to be connected between this horizontal filter and this vertical filter, is used for temporary through filtered this huge square of horizontal direction and through filtered this huge square of vertical direction;
One transpose buffering district, be to be connected in this horizontal filter, this vertical filter and this output buffer, receive the block of cells of having finished filtered this huge square of horizontal direction, the block of cells transposition that is used for finishing filtered this huge square of horizontal direction carries out the filtering of vertical direction for this vertical filter;
One Data Management Unit is to be connected in output state, in order to judge the encoding state of this huge square, reaches this huge square that horizontal filtering and vertical filtering are finished in output; And
One control unit, be to be connected in this horizontal filter, this vertical filter, this transpose buffering district and this Data Management Unit, in order to control this horizontal filter, this vertical filter, this transpose buffering district and the execution of this Data Management Unit filtering action to this huge square.
2. deblocking filter as claimed in claim 1 is characterized in that this huge square is to be huge square of a colourity or the huge square of a brightness.
3. deblocking filter as claimed in claim 1 is characterized in that comprising an input buffer, is to be connected in this horizontal filter, be used to store will carry out filtering this huge square so that this horizontal filter filtering to be provided.
4. deblocking filter as claimed in claim 3 is characterized in that this huge square is to comprise huge square of a colourity and the huge square of a brightness.
5. deblocking filter as claimed in claim 1 is characterized in that comprising a computing comparing unit, is acquisition and the comparison that is used for this huge square parameter, judges for this control unit whether this present huge square needs to carry out filtering.
6. deblocking filter as claimed in claim 1 is characterized in that comprising a data processing unit, is to be connected in this information management unit, is used to detect adjacent and the encoding state of an adjacent huge square of this huge square at present.
7. deblocking filter as claimed in claim 1, it is characterized in that comprising a direct memory access unit, be to be connected between this Data Management Unit and a DRAM (Dynamic Random Access Memory), be used to produce the address of this lively attitude random access memory, for this Data Management Unit with this huge square of finishing filtering in this output buffer this DRAM (Dynamic Random Access Memory) of writing direct.
8. deblocking filter as claimed in claim 1 is characterized in that this output buffer is to comprise:
One first temporary storage buffer region is to be used for storing this huge square;
One second temporary storage buffer region is to be used to store an adjacent huge square required when carrying out this huge square Far Left boundary filtering; And
One buffer array is to be used for storing carrying out this huge square topmost during boundary filtering, the required huge square of using in a top.
9. deblocking filter as claimed in claim 8 is characterized in that this second temporary storage buffer region is the buffer for one 8 * 16 * 8.
10. deblocking filter as claimed in claim 8 is characterized in that this buffer array all is to carry out from same group of buffer in the input and output of all directions.
11. deblocking filter as claimed in claim 1 is characterized in that this transpose buffering district comprises many group buffers, with the block of cells of temporary this huge square.
12. deblocking filter as claimed in claim 11 is characterized in that those buffers are respectively is one 4 * 4 * 8 buffer.
13. one kind is removed the blocking filtering method, it is characterized in that step comprises:
The required huge square in a top when reading one first huge square filtering;
Carry out the filtering of one first huge square, read the required huge square in top of one second huge square simultaneously;
Carry out the filtering of one second huge square, the result with this first huge square filtering writes back in the DRAM (Dynamic Random Access Memory) simultaneously; And
The filtering result of this second huge square is write back in this DRAM (Dynamic Random Access Memory).
14. the blocking filtering method of removing as claimed in claim 13 is characterized in that the first huge square is to be the huge square of a brightness, the second huge square is to be the huge square of a colourity.
15. the blocking filtering method of removing as claimed in claim 14 is characterized in that the filter step of this first huge square normal condition comprises:
In regular turn a block of cells of this first huge square vertical direction is carried out the horizontal filtering on first limit, and behind the horizontal filtering that executes first limit, write in the output state;
In regular turn this block of cells of this first huge square vertical direction is carried out the horizontal filtering on second limit, and behind the horizontal filtering that executes second limit, write in the transposition buffer;
In this transposition working area, read this block of cells of finishing first limit and the second limit horizontal filtering, finish the first limit vertical filtering of this block of cells of first limit and the second limit horizontal filtering with execution;
Be temporary in this transposition buffer with this block of cells of finishing the first limit vertical filtering finishing first limit and the second limit horizontal filtering;
In this output state, read next block of cells of finishing first limit and the second limit horizontal filtering, to carry out the first limit vertical filtering of this next block of cells;
This block of cells of finishing level and vertical filtering is temporary in this output working area; And
After all block of cells are all finished filtering in this first huge square, just write back in this DRAM (Dynamic Random Access Memory).
16. the blocking filtering method of removing as claimed in claim 15 is characterized in that the filter step of this second huge square normal condition comprises:
In regular turn a block of cells of this second huge square vertical direction is carried out the horizontal filtering on first limit, and behind the horizontal filtering that executes first limit, write in the output state;
In regular turn this block of cells of this second huge square vertical direction is carried out the horizontal filtering on second limit, and behind the horizontal filtering that executes second limit, write in the transposition buffer;
In this transposition working area, read this block of cells of finishing first limit and the second limit horizontal filtering, finish the first limit vertical filtering of this block of cells of first limit and the second limit horizontal filtering with execution;
Be temporary in this transposition buffer with this block of cells of finishing the first limit vertical filtering finishing first limit and the second limit horizontal filtering;
In this output state, read next block of cells of finishing first limit and the second limit horizontal filtering, to carry out the first limit vertical filtering of this next block of cells;
This block of cells of finishing level and vertical filtering is temporary in this output working area; And
After all block of cells are all finished filtering in this second huge square, just write back in this DRAM (Dynamic Random Access Memory).
17. the blocking filtering method of removing as claimed in claim 14, it is characterized in that this first huge square is that hardwood graph code, the huge square in a top are the filtering of field pattern coding, the filtering time of the top block of cells vertical direction of this first huge square must postpone backward, and the vertical filtering that makes the top block of cells of this first huge square is to wait until after this top block of cells and this next block of top block of cells are all finished the filtering of horizontal direction to begin to carry out again.
18. the blocking filtering method of removing as claimed in claim 17, it is characterized in that this second huge square is that hardwood graph code, the huge square in this top are the filtering of field pattern coding, the filtering time of the top block of cells vertical direction of this second huge square must postpone backward, and the vertical filtering that makes the top block of cells of this first huge square is to wait until after this top block of cells and this next block of top block of cells are all finished the filtering of horizontal direction to begin to carry out again.
CNA2006101387568A 2006-11-13 2006-11-13 Block removing filter Pending CN101184227A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNA2006101387568A CN101184227A (en) 2006-11-13 2006-11-13 Block removing filter

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNA2006101387568A CN101184227A (en) 2006-11-13 2006-11-13 Block removing filter

Publications (1)

Publication Number Publication Date
CN101184227A true CN101184227A (en) 2008-05-21

Family

ID=39449277

Family Applications (1)

Application Number Title Priority Date Filing Date
CNA2006101387568A Pending CN101184227A (en) 2006-11-13 2006-11-13 Block removing filter

Country Status (1)

Country Link
CN (1) CN101184227A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102055971A (en) * 2009-10-29 2011-05-11 财团法人工业技术研究院 Video compression deblocking filter device and method
CN102215324A (en) * 2010-04-08 2011-10-12 安凯(广州)微电子技术有限公司 Filtering circuit for performing filtering operation on video image and filtering method thereof

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102055971A (en) * 2009-10-29 2011-05-11 财团法人工业技术研究院 Video compression deblocking filter device and method
CN102055971B (en) * 2009-10-29 2012-08-29 财团法人工业技术研究院 Video compression deblocking filter device and method
CN102215324A (en) * 2010-04-08 2011-10-12 安凯(广州)微电子技术有限公司 Filtering circuit for performing filtering operation on video image and filtering method thereof
CN102215324B (en) * 2010-04-08 2013-07-31 安凯(广州)微电子技术有限公司 Filtering circuit for performing filtering operation on video image and filtering method thereof

Similar Documents

Publication Publication Date Title
US20060133504A1 (en) Deblocking filters for performing horizontal and vertical filtering of video data simultaneously and methods of operating the same
JP5183664B2 (en) Deblocking apparatus and method for video compression
US20090129478A1 (en) Deblocking filter
US8090028B2 (en) Video deblocking memory utilization
CN104253998B (en) Hardware on-chip storage method of deblocking effect filter applying to HEVC (High Efficiency Video Coding) standard
CN100508620C (en) Video Decoding System for Mobile Broadcast Receiver
CN101123725A (en) Hardware Implementation of H.264 Deblocking Filter
CN101635849B (en) Loop filtering method and loop filter
US20050259887A1 (en) Video deblocking method and apparatus
US7773817B2 (en) JPEG image processing circuit
US20070127570A1 (en) Image processor and image processing method
CN101184227A (en) Block removing filter
CN102131098B (en) The block-removal filtering method of video image and device
EP1992162B1 (en) Memory organizational scheme and controller architecture for image and video processing
CN102055971B (en) Video compression deblocking filter device and method
CN102111615B (en) Method and system for implementing video filtering in DMA removal
CN101459839A (en) Deblocking effect filtering method and apparatus for implementing the method
EP1774467A1 (en) Caching data for video edge filtering
CN100486333C (en) Interpolation arithmetic device and method
CN114697675B (en) Decoding display system and memory access method thereof
CN101005619B (en) Loop circuit filtering method
CN100473165C (en) Macroblock Loop Filtering Method Based on AVS Standard Video Decoding
JP6490896B2 (en) Image processing device
CN102098477B (en) Method and device for obtaining pixel values
CN102572416B (en) Video filtering method and device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C02 Deemed withdrawal of patent application after publication (patent law 2001)
WD01 Invention patent application deemed withdrawn after publication

Open date: 20080521