The government yesterday predicted record 1979 grain crops, resulting in slightly lower farm prices but no appreciable change from earlier estimates of retail food costs.

The Agriculture Department's crop reporting board forecast a record corn production of 7.11 billion bushels, or 181 million tons. This marked a substantial upward revision of last month's forecast on the strength of extremely favorable growing conditions in the farm belt. Only an early frost could set back corn growers now.

The department also predicted a record 57.9 million ton soybean harvest and a wheat harvest of 58.1 million tons, the second largest in history despite a program that took some wheat acreage out of production.

According to the department's chief economist, Howard J. Hjort the increase in the supply of grain on hand is likely to lower farm prices from what had been expected a month ago.

However, he said, this is not likely to have any impact on food prices because 1979 wheat prices are still seen as running 60 cents to $1 higher than in 1978 and corn prices will be 15 cents to 75 cents higher.

Hjort said that a process is already underway among livestock producers that will bring higher pork and beef prices by late next year.

Prices received by farmers for hogs have been declining since February and for beef since April. As returns to these farmers decline, they sell their animals, depleting the national supply of meat and eventually causing shortages.

"We are at a level now where some portion of our hog producers will not be covering their costs," said Hjort. "By late 1980 we would expect livestock prices to be moving up fairly rapidly" as the meat supply dwindles, Hjort said.

Corn and soybeans are the principal U.S. animal feeds and also are used in margarine, vegetable oil, non-sugar sweeteners and other staples of the U.S. diet.

All U.S. grain prices rose steadily through the spring as a result of uncertainty over the size of the harvest and as reports circulated of poor Russian and French crops.

The department said yesterday that continued "good" to very good weather" in the major spring grain regions of the Soviet Union indicated a 1979 crop of 185 million tons - the same as was foreseen a month ago.

A team of U.S. wheat experts who recently toured the Soviet Union reported that spring-planted grain prospects east of the Volga River valley look better than average. The team said record grain output in Siberian Kazakhstan was possible.

Nevertheless, the department increased its estimates of total Soviet grain imports in the year ahead from 30 million to 32 million tons. Soviet production is still far short of its needs for animal feeds.

Last year's Soviet grain crop was 237 million tons, or 52 million tons above what is predicted for 1979.

Other important forecasts released yesterday include the following:

- This year's world grain production will reach 1,513 billion tons, the second largest global harvest in history, but 4 percent below last year.

- Improved weather has enhanced wheat prospects in China and the United States in the last 30 days. But this has been offset by dry weather in Canada, drought in Eastern Europe and delays in Argentine wheat planting.

- The world rice outlook has deteriorated somewhat from a month ago because of problems in China, India and South Korea.

- Bangladesh has excellent moisture, but Pakistan is dry.

- The 1979-1980 cotton crop is estimated at 63.6 million bales, up from last year's 59.8 million bales, mainly due to an improved outlook in the United States.

Despite the large grain crops that are now virtually assured in the United States, there will be a slight decline in the level of unsold stocks - the crucial "cushion" against unforeseen harvest disasters.

Hjort said U.S. wheat stocks will probably decline from 25 million to 20 million tons and corn stock will go from 47 million to between 30 million and 40 million tons.