<PAGE>

                                                                   EXHIBIT 10.12

                        Confidential Foundry Agreement


This Confidential Foundry Agreement is made effective December 13, 1999.

OmniVision Technologies, Inc. (OmniVision) is a California Corporation that
designs and markets CMOS image sensor related products, including color sensor
products. OmniVision has developed a considerable level of technical expertise
and experience in the design and manufacturing of CMOS imager sensor related
products. OmniVision would like to develop a foundry relationship with Shanghai
HuaHong NEC Electronics Co., Ltd. (HuaHong-NEC).

HuaHong-NEC is a joint venture company located in Shanghai China that is in the
business of manufacturing integrated circuits on a foundry basis for other
companies. HuaHong-NEC would like to manufacture CMOS image sensors, including
the possibility of process for adding color filters to such sensors.

For the mutual benefit of both parties it is agreed as follows:

     1.   HuaHong-NEC will provide OmniVision with 0.35 u technologies cell
          library, device spice model and layout rule.

     2.   OmniVision agrees to place an order(s) with HuaHong-NEC for prototype
          manufacturing of OmniVision's CMOS image sensor related products.
          HuaHong-NEC agrees ***, except that OmniVision will pay one mask set
          fee to cover all prototype versions until the product becomes ready
          for mass production.

     3.   OmniVision agrees to evaluate the results of the prototype production
          units and to share the results with HuaHong-NEC engineers in a joint
          effort to improve and to qualify the HuaHong-NEC manufacturing
          process.

     4.   HuaHong-NEC agrees to provide the engineering manpower necessary to
          work with the OmniVision engineers in evaluating the prototype results
          and in introducing the necessary changes to the manufacturing process
          to improve the results.

     5.   HuaHong-NEC agrees to place a high priority on the pilot of
          OmniVision's prototype units in order to provide a fast turn around
          for evaluating the results.

     6.   Once HuaHong-NEC's manufacturing process is qualified for the
          manufacture of OmniVision's CMOS products, OmniVision agrees to begin
          placing production level orders with HuaHong-NEC for OmniVision's
          product(s).

     7.   HuaHong-NEC agrees to give OmniVision ***, which are contributed by
          OmniVision input.

     8.   HuaHong-NEC agrees to give OmniVision ***.

-------------------
*** Confidential treatment requested pursuant to a request for confidential
    treatment filed with the Securities and Exchange Commission. Omitted
    portions have been filed separately with the Commission.

<PAGE>

     9.   All Confidential information disclosed by either party as a result of
          carrying out the activities described in this Agreement is subject to
          the separate mutual Non-Disclosure Agreement to be signed by both
          parties.

     Accordingly, the parties have duly authorized their respective
     representatives to execute this Agreement and bind them to its terms as of
     the date set forth above.

     OmniVision Technologies, Inc.      Shanghai HuaHong NEC Electronics Co. Ltd
     -----------------------------      ----------------------------------------


       /s/ Shaw Hong                           /s/ Toshio Ohta
     -----------------------------      ----------------------------------
       Shaw Hong                                Toshio Ohta
       President                                   E.V.P



-------------------
*** Confidential treatment requested pursuant to a request for confidential
    treatment filed with the Securities and Exchange Commission. Omitted
    portions have been filed separately with the Commission.