Our first half fiscal 2021 revenues have grown about 10% compared to the first half of fiscal 2020, and earnings have grown at an even higher rate.
Over the past few quarters, we've highlighted how we are enabling new experiences in mobile, like being able to record in Dolby Vision with the iPhone 12 or being able to enjoy live sports content in Dolby Atmos through a mobile app.
This adds to the growing number of partners that support the Dolby experience within mobile, which is highlighted by the Apple iPhone 12 lineup that features the combined Dolby Vision and Dolby Atmos experience.
We now have about 90% of our Dolby Cinemas opened globally to certain capacity restrictions.
Second quarter revenue of $320 million was above our guidance range of $280 million to $310 million, as the volumes that we had were higher-than-expected in several of our end markets.
And then we also benefited from a true-up of about $15 million in the quarter for Q1 shipments reported that were above our estimate.
On a year-over-year basis, second quarter revenue was down from last year's $352 million due to lower recoveries and lower revenue from cinema-related business partially offset by higher adoption of Dolby Technologies and higher market volume in areas like PC and TV.
So the Q2 revenue was comprised of $304 million in licensing and $16 million in products and services.
Broadcast represented about 35% of total licensing in the second quarter.
Broadcast revenues decreased by about 19% year-over-year, and that was driven by lower recoveries offset partially by higher market volume along with higher adoption of Dolby.
On a sequential basis, broadcast decreased by about 25%, due primarily to lower seasonality along with lower recoveries.
Mobile represented approximately 22% of total licensing in Q2.
Mobile decreased by about 12% from last year, that was due to a shift in timing of certain contracts, and that was offset partially by higher adoption of our technologies.
On a sequential basis, mobile was down about 38%, due primarily to lower recoveries and timing of revenue under contracts.
PC represented about 17% of total licensing in the second quarter.
PC was higher than last year by about 12% due to higher market volume, along with increased adoption of Dolby Vision and Dolby Atmos.
Sequentially, PC was up by about 56%, driven by timing of revenue under contracts, along with seasonally higher activity from patent programs.
Consumer electronics represented about 16% of total licensing in Q2.
On a year-over-year basis, consumer electronics was lower by about 2% due to a shift in timing of certain contracts offset partially by higher volume in devices like sound bars and DMAs, as well as higher adoption of Dolby Vision and Dolby Atmos.
On a sequential basis, CE decreased by about 7% due mainly to lower seasonality and timing of revenue under contracts.
Other markets represented about 10% of total licensing in the second quarter.
They were up about 14% year-over-year, driven by higher revenue from gaming and automotive, and that was offset partially by lower Dolby cinema revenues.
On a sequential basis, other markets decreased by about 22%, driven by lower seasonality in gaming and lower admin fees from Via.
Beyond licensing, our products and services revenue was $16 million in Q2 compared to $16.9 million in Q1 and $23 million in last year's Q2.
Total gross margin in the second quarter was 89.9% on a GAAP basis and 90.5% on a non-GAAP basis.
Products and services gross margin -- products and services gross margin on a GAAP basis was minus $345,000 in Q2 compared to minus $5.5 million in the first quarter.
Products and services gross margin on a non-GAAP basis was a positive $1.1 million in Q2 compared to a negative $3.9 million in the first quarter.
Operating expenses in the second quarter on a GAAP basis were $204 million compared to $189.8 million in Q1.
Operating expenses in the second quarter on a non-GAAP basis were $178.4 million compared to $167.1 million in the first quarter.
Operating income in the second quarter was $83.2 million on a GAAP basis or 26% of revenue compared to $105.9 million or 30.1% of revenue in Q2 of last year.
Operating income in the second quarter on a non-GAAP basis was $110.9 million or 34.7% of revenue compared to $129 million or 36.7% of revenue in Q2 of last year.
Income tax in Q2 was 10.6% on a GAAP basis and 16% on a non-GAAP basis.
Net income on a GAAP basis in the second quarter was $76.2 million or $0.73 per diluted share, and that compares to $88.5 million or $0.86 per diluted share in last year's Q2.
And net income on a non-GAAP basis in the second quarter was $94.8 million or $0.91 per diluted share, that compares to $106.6 million or $1.04 per diluted share in Q2 of last year.
During the second quarter, we generated about $83 million in cash from operations which compares to the $66 million generated in last year's second quarter, and we ended the second quarter this year with about $1.2 billion in cash and investments.
During the second quarter, we bought back about 760,000 shares of our common stock and ended the quarter with about $76 million of stock repurchase authorization still available.
We also announced today a cash dividend of $0.22 per share.
Now with Q2 behind us, our updated scenario is for second half revenue ranging from $560 million to $600 million.
And if I focus more specifically on Q3, we anticipate that third quarter total revenue could range from $260 million to $290 million.
Within that, licensing could range from $250 million to $275 million, while products and services revenue could range from $13 million to $18 million.
Q3 gross margin on a GAAP basis is estimated to range from 88% to 89%, and the non-GAAP gross margin is estimated to range from 89% to 90%.
Within that, products and services gross margin is estimated to range from about breakeven to $1 million positive on a GAAP basis and from $1 million to $2 million positive on a non-GAAP basis.
Operating expenses in Q3 on a GAAP basis are estimated to range from $210 million to $220 million; and operating expenses in Q3 on a non-GAAP basis, are estimated to range from $185 million to $195 million.
Other income is projected to range from $1 million to $2 million for the third quarter, and that's $1 million to $2 million for the third quarter.
And our effective tax rate for Q3 is projected to range from 20% to 21% on both a GAAP and non-GAAP basis.
Based on a combination of the factors I just covered, we estimate that Q3 diluted earnings per share could range from $0.15 to $0.30 on a GAAP basis and from $0.37 to $0.52 on a non-GAAP basis.

Summary:
Net income on a GAAP basis in the second quarter was $76.2 million or $0.73 per diluted share, and that compares to $88.5 million or $0.86 per diluted share in last year's Q2.
And net income on a non-GAAP basis in the second quarter was $94.8 million or $0.91 per diluted share, that compares to $106.6 million or $1.04 per diluted share in Q2 of last year.
And if I focus more specifically on Q3, we anticipate that third quarter total revenue could range from $260 million to $290 million.
Based on a combination of the factors I just covered, we estimate that Q3 diluted earnings per share could range from $0.15 to $0.30 on a GAAP basis and from $0.37 to $0.52 on a non-GAAP basis.