A data processing device comprising: a codec section that is configured to perform a predetermined video codec process of generating a bitstream from image data, the image data being referred to as first data; a data compression section that is configured to receive from the codec section the first data in units of a predetermined data length and generate second data by performing a predetermined compression process on the first data; a first code generation section that is configured to generate an error control code for the second data; a determination section that is configured to determine whether the sum of the data length of the second data and the code length of the error control code generated by the first code generation section is not greater than the predetermined data length; a binding section that is configured to generate, if the determination section determines that the sum is not greater than the predetermined data length, third data by binding the second data generated by the data compression section to the error control code generated by the first code generation section; and a transfer section that is configured to transfer the third data generated, upon determination of the determination section that the sum is not greater than the predetermined data length, by the binding section to a memory in units of the predetermined data length, wherein the transfer section comprises a second code generation section that is configured to generate an error control code for the bitstream, the transfer section is configured to transfer both the bitstream and the error control code generated, for the bitstream, by the second code generation section to the memory, and if the determination section determines that the sum is greater than the predetermined data length, the second code generation section of the transfer section is configured to generate an error control code for the first data output from the codec section, and the transfer section is configured to transfer the first data output from the codec section and the error control code generated, for the first data, by the second code generation section, to the memory, without allowing the binding section to perform a binding operation. a codec section that is configured to perform a predetermined video codec process of generating a bitstream from image data, the image data being referred to as first data; a data compression section that is configured to receive from the codec section the first data in units of a predetermined data length and generate second data by performing a predetermined compression process on the first data; a first code generation section that is configured to generate an error control code for the second data; a determination section that is configured to determine whether the sum of the data length of the second data and the code length of the error control code generated by the first code generation section is not greater than the predetermined data length; a binding section that is configured to generate, if the determination section determines that the sum is not greater than the predetermined data length, third data by binding the second data generated by the data compression section to the error control code generated by the first code generation section; and a transfer section that is configured to transfer the third data generated, upon determination of the determination section that the sum is not greater than the predetermined data length, by the binding section to a memory in units of the predetermined data length, wherein the transfer section comprises a second code generation section that is configured to generate an error control code for the bitstream, the transfer section is configured to transfer both the bitstream and the error control code generated, for the bitstream, by the second code generation section to the memory, and if the determination section determines that the sum is greater than the predetermined data length, the second code generation section of the transfer section is configured to generate an error control code for the first data output from the codec section, and the transfer section is configured to transfer the first data output from the codec section and the error control code generated, for the first data, by the second code generation section, to the memory, without allowing the binding section to perform a binding operation.