An encoding apparatus which forms sector units of data, to each of which a
header and an error detection code are added, from record data to be
recorded on an optical disk, arranges a plurality of the sector units of
data to form a matrix that is a block unit of data, scrambles the block
unit of data exclusive of the headers and error detection codes, appends
a first error correction code for each row of the block unit of data, and
appends a second error correction code for each column of the block unit
of data. The encoding apparatus comprises a generator of the error
detection codes; a section that performs the scrambling; a generator of
the first error correction codes; a generator of the second error
correction codes; and an encoding controller that controls the processes
in the above sections to be performed in parallel.