A method and apparatus for encoding an input video bitstream to produce an encoded output bitstream is disclosed. A base stream is enhanced based on enhancement control parameters. At least one picture content parameter is extracted from the enhanced base stream. At least one picture content parameter is extracted from the input video bitstream. The enhanced picture content parameters are compared with the input picture content parameters. An output from the comparison step is received and the enhancement control parameters are calculated so as to minimize the difference between the input picture content parameters and the enhanced picture content parameters. The calculated control parameters are incorporated into the encoded output bitstream.