Abstract:
An encoding method of recording media is disclosed to speed up the encoding procedure in a recording media. Different conditions of states and paths set in advance during the encoding procedure to simply the actual operation loading for possible paths in the look-ahead calculation, thereby achieving fast encoding. Using the disclosed method, the operation of the look-ahead calculation of an exponential growth is greatly reduced to a linear growth.

Description:
BACKGROUND OF THE INVENTION  
       [0001]     1. Field of Invention  
         [0002]     The invention relates to a data encoding method and, in particular, to a encoding in a recording media that simplifies the actual operation loading in the look-ahead calculation, thereby speeding up the encoding procedure.  
         [0003]     2. Related Art  
         [0004]     The encoding mechanism for recording media is mainly used to encode data words using specific encoding procedures into code words so as to be stored in an ordered way within a small storage space on a recording media. One can use a set of specific decoding rules to restore the original data words.  
         [0005]     In the encoding procedure, the coding rate directly affects the data capacity that can be stored in a recording media. Therefore, an encoding method of high coding rate has been the goal of related fields. In the past, trying to increase the coding rate results in the decrease in selectable code words. And this kind of encoding method further has worse code word sequence properties, particularly in the DC component control ability. To enhance the code word sequence properties, an encoding method combines the look-ahead calculation has been created to perform encoding procedures.  
         [0006]     The so-called look-ahead calculation is as follows. First, one computes paths for several successive data words in advance. An optimal path is searched using predetermined conditions, and then the code words of the optimal path are then used for encoding. Generally speaking, the longer the length of look-ahead is, the better properties the code word sequence will have. And the computation loading increases exponentially with the length of the look-ahead at the same time. This will inevitably results in the delay of the encoding speed.  
         [0007]     As the encoding method with look-ahead calculation becomes more popular, it is necessary to improve its calculation algorithm. It is imperative to simplify the computation loading of possible paths in the look-ahead calculation, thereby increasing its efficiency and practicality.  
       SUMMARY OF THE INVENTION  
       [0008]     In view of the foregoing, the invention provides an encoding method for recording media. It further provides an improved look-ahead calculation method.  
         [0009]     Using different limitations set in advance during the encoding procedure, the invention simplifies the actual computation loading of possible paths in the look-ahead calculation. The limitations include the state and the path. So, an optimal possible path can be rapidly singled out from the look-ahead calculation to highly perform the encoding procedure of code word sequence. Using the disclosed method, the operation of the look-ahead calculation of an exponential growth is greatly reduced to a linear growth. 
     
    
     BRIEF DESCRIPTION OF THE DRAWINGS  
       [0010]     The invention will become more fully understood from the detailed description given hereinbelow illustration only, and thus are not limitative of the present invention, and wherein:  
         [0011]      FIG. 1  is a tree diagram of the computation loading for the look-ahead calculation in the prior art;  
         [0012]      FIGS. 2A and 2B  are flowcharts of the disclosed encoding method for recording media; and  
         [0013]      FIG. 3  is a schematic view of a preferred embodiment of the invention. 
     
    
     DETAILED DESCRIPTION OF THE INVENTION  
       [0014]     The invention provides an improved look-ahead calculation for the encoding method for recording media. By reducing the computation loading of look-ahead calculation, the efficiency of the encoding time is greatly increased.  
         [0015]     The look-ahead calculation used in the prior art has the computation loading as shown in  FIG. 1 . We suppose each data word has two following candidate code words for selection. So the one-step look-ahead calculation involves four different paths, the two-step look-ahead operation involves eight different paths, etc. When performing a k-step look-ahead calculation, there will involve 2 (k+1)  different paths. Thus, the computation loading grows exponentially.  
         [0016]     To effectively prevent the exponential growth in the computation loading of the look-ahead calculation in the prior art, the invention provides a method depicted in  FIGS. 2A and 2B  to simplify the look-ahead calculation to improve the efficiency of the encoding time. We explain the method in the following paragraphs.  
         [0017]     First, one performs initialization settings and starts the look-ahead calculation from the node n (step  100 ), where n is any positive integer. This step further involves the following two steps:  
         [0018]     (1) Perform the initialization settings for selecting optimal code word. This includes the path length L and the path selection criteria P.  
         [0019]     The path length L refers to the length of look-ahead required for the look-ahead calculation. Basically, it only needs to be a positive integer. It is usually set according to the need of code word sequence properties in reality. The path selection criteria P are limitations used to select the optimal path from various possible paths. The minumum absolute of a digital sum value (DSV) is often used as the criterion for an optimal path. That is, the path with the minimum absolute DSV among all possible paths is picked as the optimal path. (However, the actual path selection criteria are not limited to this.)  
         [0020]     (2) Perform the initialization settings for computing possible paths. This includes the state condition S, the reserved quantity R, and the selection condition C.  
         [0021]     The state condition S is used to determine the states of each of the nodes n on each of the possible paths. The state can be classified into the following three types: 
        1. Use the sign of the DSV for binary state division. If the DSV is positive, it is state 1; if the DSV is negative, it is state 2.     2. Use the number of specific numerical value in the code word for binary state division. Since the numerical value 1 in the code word represents a turning point, the number of 1 directly affect the sign of the DSV. Therefore, one can use the number of 1 (even or odd) to decide the state. If there is an odd number of 1, it is state 1; if there is an even number of 1, it is state 2.     3. Combine the above two types for quaternary division. That is, one simultaneously uses the sign of DSV and the number of specific numerical value for the division. If the code word have an even number of 1 and the DSV is positive, it is state 1; if the code word have an even number of 1 and the DSV is negative, it is state 2; if the code word have an odd number of 1 and the DSV is positive, it is state 3; and if the code word have an odd number of 1 and the DSV is negative, it is state 4.        
 
         [0025]     The reserved quantity R is used to assign the largest reserved quantity of possible paths in each state. Its value is generally a positive integer. It is not speficied by the invention, and can be defined according to practical needs.  
         [0026]     The selection condition C is used when the number of possible paths in each state exceeds the reserved quantity R to rule out redundant possible paths that do not satisfy the selection condition in order to simplify the computation loading of the look-ahead calculation.  
         [0027]     After completing the settings in step  100 , the method starts to perform the look-ahead calculation. It first determines whether the current operation has reached the path length L (step  110 ). First, the method decides if the length of look-ahead current calculated is smaller than the path length L, it means that the look-ahead calculation for the curretn node n has not completed. The procedure will enters step A in  FIG. 2B  to continue the following steps.  
         [0028]     First, computing the DSV C 1 [n], . . . , Cm[n] of each candidate code word on the m possible paths of the node n (step  200 ). The vlaue of m is dettermined according to an encoding rule. (Usually, m is any positive integer.) Afterwards, the state condition S is employed to determine the state of each possible path at the current node n (step  210 ). The method then checks whether the number of possible paths in each state exceeds the reserved quantity R (step  220 ). When the number of possible paths in each state exceeds the reserved quantity R, the selection condition C is used to reserve possible paths satisfying the number of the reserved quantity R (step  230 ). When the reserved quantity R is 2, it means that each state is left with only two possible paths for subsequent calculations in each state. The method completes first look-ahead calculation.  
         [0029]     The method then continues to step  240  for executing the next look-ahead calculation and for updating the path length L (i.e. L=L+1). The method now enters step B in  FIG. 2A , returning to step  110  to repeatedly execute steps  200  to  240 . On the other hand, if the number of possible paths in each state in step  220  does not exceed the number of the reserved quantity R, the procedure goes directly to step  240 .  
         [0030]     The above-mentioned selection condition C can be set as the combination of various mathematical operations on the DSV at each node n, such as the maximum or minimum of DSV, the maximum or minimum of the absolute DSV, the maximum or minimum of the sum of the absolute DSV&#39;s of all nodes, the maximum or minimum of the absolute value of the sum of DSV&#39;s of all nodes, the maximum or minimum of the average of DSV&#39;s of all nodes, and the maximum or minimum of the standard deviation of the DSV&#39;s of all nodes.  
         [0031]     When the current length of look-ahead calculated is equal to the path length L (step  110 ), it means that the look-ahead calculation has completed. The method then performs the following steps.  
         [0032]     First, the path selection criteria P are used to select the code words of the optimal path among possible paths to perform encoding (step  120 ). After finishing the encoding of the node n, the method determines whether all the recording media encoding has been completed (step  130 ). If not completed, the method continues to calculate the look-ahead path of the next node (n=n+1) and updates the path length L (L=L−1). Return to step A in  FIG. 2B , and use n=n+1 and L=L-1 to repeat steps  200  to  240 . If the encoding has been completed, the method ends.  
         [0033]     Take a look-ahead calculation with a path length equal to 3 as an example. When step  140  is executed, the calculation data of node (k−3) are removed at the same time while keeping the calculation data of the node (k−1) and node (k−2). Therefore, when entering step A, the method only needs to continue the calculation of the node k. This can greatly reduce repeated calculation loading and increase the overall efficiency. For example, after completing the calculations for the node  1 , the node  2 , and the node  3 , the calculation data of the node  1  are removed. The calculation of the node  4  is then added. This avoids repeating the calculations for the node  2  and the node  3 .  
         [0034]     We refer to  FIG. 3  as a preferred embodiment of the invention to explain the operational procedure of the disclosed method. We set the path length L=3. The path selection criterion P is the minimum absolute value of the DSV. The state condition S uses the sign of the DSV for binary state division; so the positive DSV being state 1 and the negative DSV state 2. The reserved quantity R is set as 2. The selection condition C uses the maximum or minimum of the DSV to determine whether it is kept. In state 1, two possible paths with smaller DSV&#39;s are kept. In state 2, two possible paths with larger DSV&#39;s are kept.  
         [0035]     Each data word on node n to node (n+3) has a corresponding code word listed in the following (as shown in  FIG. 3 ):  
                                               C1[n]   100000000010001   C2[n]   000010000010000       C1[n + 1]   001001000000100   C2[n + 1]   010001001000010       C1[n + 2]   010000000001001   C2[n + 2]   000000001000100       C1[n + 3]   010000001001001   C2[n + 3]   000000010010001                  
 
         [0036]     First, we start to perform the look-ahead calculation from the node n. On the n-th node, the DSV of C 1 [n] is 7, belonging to state 1; the DSV of C 2 [n] is −3, belonging to state 2 according to the above settings.  
         [0037]     At the (n+1)-th node, to satisfy the constraints of the specific encoding rule, so C 1 [n] can only be followed by C 1 [n+1]. Its DSV after the connection is 10, belonging to state 1. C 2 [n] can only be followed by C 2 [n+1]. Its DSV after the connection is 0, also belonging to state 1. Since the predetermined reserved quantity R=2, two possible paths can be kept. Therefore, these paths are both kept.  
         [0038]     At the (n+2)-th node, we know that C 1 [n+1] can be connected to C 1 [n+2] and C 2 [n+2]. The DSV after connecting with C 1 [n+2] is 17, being state 1. The DSV after connecting with C 2 [n+2] is 3, also state 1. C 2 [n+1] can be connected to C 1 [n+2] and C 2 [n+2]. The DSV after connecting with C 1 [n+2] is 7, being state 1. The DSV connecting with C 2 [n+2] is −7, being state 2. Therefore, there are three possible paths belonging to state 1 at the (n+2)-th node. According to the reserved quantity R, there are only two possible paths can be kept. So the method follows the predetermined selection condition C to select among state 1 the two paths with smaller DSV&#39;s. That is, the path with DSV=17 is deleted. Since there is only one possible path in state 2, below the reserved quantity R, it is therefore kept.  
         [0039]     At the (n+3)-th node, the specific encoding rule dictates that C 1 [n+2] can only be followed by C 2 [n+3]. The DSV after the connection is 14, being state 1. C 2 [n+2] can connect to C 1 [n+3] and C 2 [n+3]. The DSV after connecting C 2 [n+2] with C 1 [n+3] is 8, also state 1. The DSV after connecting C 2 [n+2] with C 2 [n+3] is −4, being state 2. The DSV after connecting C 2 [n+2] with C 1 [n+3] is −2, being state 2. The DSV after connecting C 2 [n+2] with C 2 [n+3] is −14, also state 2. Therefore, there are two possible paths belonging to state 1 at the (n+3)-th node and both of them are kept. Since there are now three possible paths in state 2, the two possible paths with larger DSV&#39;s are kept according to the selection condition C. Consequently, the possible path with DSV=−14 is deleted.  
         [0040]     Since the method has reached the predetermined path length L, it starts to find the optimal path among all the possible paths. All the possible paths kept at the (n+3)-th node are subject to the predetermined path selection criterion P to give a possible path with the smallest absolute value of the DSV. Consequently, the possible path with DSV=−2 is selected as the optimal path. The corresponding code word at the n-th node is C 2 [n] and it is output for the encoding.  
         [0041]     The disclosed method can be generalized to use quaternary states and to keep more than two paths. Such modifications are still within the spirits of the invention.  
         [0042]     Certain variations would be apparent to those skilled in the art, which variations are considered within the spirit and scope of the claimed invention.