They look like two different plants to me; the plant in the photo on the left looks to have smaller leaves than the plant in the photo on the right. Larger photos might help identify the plant, maybe a photo from a little distance, showing the full size of the entire plant, a photo of just the leaves, maybe a photo of the bark? If it is Nandina, the berries/fruit are edible to birds but I've always heard that they are toxic and not for human consumption.
For safety, I wouldn't eat any berries until certain identity is established.
Edited to add: The time of year the photos were taken might be of help also.