1. An encoding method for converting image data to a television signal, comprising: using a database and an adder to convert the image data to the television signal according to a preset mechanism; wherein the preset mechanism converts the image data to the television signal according to a preset formula comprising a plurality of variables, and uses the variables and the image data to perform a plurality of multiplication operations and a plurality of first addition operations; wherein the plurality of variables are assigned and divided into two groups, and results of the two groups are stored in the database, and then a second addition operation to the two groups is implemented by the adder.