At first glance, Ambarella (AMBA 3.18%) and Nvidia (NVDA -3.33%) look like very different companies. Ambarella produces image application processors for action cameras, drones, security cameras, and other devices. Nvidia mainly sells high-end GPUs and add-in graphic boards.

However, both companies have been eyeing new areas of growth in drones and connected cars. Ambarella, which supplies top drone maker DJI Innovations with its image processing SoCs, believes that demand for its chips will rise as computer vision evolves. Nvidia has been installing its Tegra chips, which failed to gain a foothold in the mobile market, in connected cars and onboard computers for drones.

Ambarella and Nvidia aren't direct competitors, but investors might be wondering which stock is a better investment in drones, driverless cars, and other next-gen connected devices. That choice will depend on your investing style -- Ambarella stock has fallen nearly 50% over the past 12 months, making it a potential turnaround play, while Nvidia has rallied more than 70%, making it a high-growth momentum play.

Is Ambarella a turnaround play?

Ambarella's big decline was caused by two main headwinds. First, there are ongoing concerns that sales at GoPro (GPRO -1.12%), one of its top customers, will plummet this year as demand for action cameras dries up. Analysts currently expect GoPro's sales to fall 17.5% this year, compared to 16% growth in 2015 and 41% growth in 2014.

Image source: Ambarella.

FBN Securities estimates that GoPro will account for 14% of Ambarella's sales in fiscal 2017 (which started on Jan. 31), down from 31% in 2016 and 36% in 2015. While that decreased dependence on GoPro is promising and indicates that sales of SoCs into other markets like drones, security cameras, and cars might rise, analysts still expect Ambarella's overall sales to fall 1% this year, compared to 45% growth in fiscal 2016.

Second, Ambarella's SoCs for other markets face fresh competition. Competing SoCs in China are lowering ASPs across the region, especially in the security camera market, while Qualcomm's (QCOM 1.41%) 4G-capable image processing SoCs threaten to pull away key customers like GoPro and DJI. This competition means that Ambarella's 60%+ gross margins could contract and crush its earnings, which are already expected to decline 27% this year.

However, investors should remember that top Ambarella customers GoPro, DJI, and Hikvision are all still the respective market leaders in action cameras, drones, and surveillance products. This means that its "best in breed" reputation won't fade away anytime soon, and could widen its moat against rival chipmakers. Analysts also expect Ambarella's earnings to rebound and grow 14.5% annually over the next five years, which makes the stock's current P/E of 14 look fairly reasonable.

Can Nvidia maintain its momentum?

Unlike Ambarella, which faces menacing rivals on multiple fronts, Nvidia is the 800-pound gorilla in its core GPU market. Research firm JPR reports that Nvidia finished 2015 with a 79% share in add-in graphics boards. AMD (AMD -0.35%) came in a distant second with a 21% share.

Image source: Nvidia.

Nvidia has two core strengths. First, it sidestepped the global slowdown in PC sales by selling high-end graphic cards for gamers, workstations, and data centers. In the fourth quarter of fiscal 2016, GPU revenue rose 10% and accounted for 84% of its top line, with sales of gaming GPUs, Quadro workstation GPUs, and Tesla/GRID GPUs for servers rising across the board.

Second, it shrewdly pivoted its Tegra mobile chips toward connected cars, which boosted chip sales by 40%. A large number of automakers, including Audi, Porsche, Mercedes-Benz, Bentley, and Tesla (TSLA 12.06%) have already installed Tegra processors in their vehicles. Nvidia has also developed Drive PX, a development platform for fully autonomous cars. However, Qualcomm has also been expanding into application processors for cars with its Snapdragon A series chips, which could steal market share from Tegra SoCs in the future.

Analysts now expect Nvidia's revenue to rise 6.5% this year, and for earnings to improve 36%. Nvidia's current P/E of 33 reflects that optimism, but also indicates that the stock could plunge if it doesn't deliver that growth. For reference, Nvidia's sales rose 7% and its non-GAAP earnings improved 18% last year.

The winner: It depends

It's tough to pick a clear winner between Ambarella and Nvidia, since they likely attract different kinds of investors. Ambarella might be a good value play at current prices, since its best in breed reputation and growth in new markets could diversify its customer base away from GoPro. But it could also be marginalized by low-end rivals or Qualcomm, which would cause sales and earnings to nosedive. Nvidia's growth looks solid and it has a wide moat against potential rivals, but its valuations don't leave much room for error this year.

I'm not a big fan of either stock at current prices, but interested investors should dig deeper into Ambarella's challengers and Nvidia's valuations to decide which chipmaker is the better long-term play.