Decoding of slice and macroblock in NVCUVID

Dear All,

I am very new to video processing domain. I have task to be cmpleted, where I have to compute qscale avarage of a picture. This was already implemented in ffmpeg and I am woundering how I can Implement it on gpu by using Cuda video Decoder.

The qscale average was calculated from the qscale of each pixel of a macro block in ffmpeg. I am woundering where the macro blocks were decoded in CUVID library. Also few other questions related to the same topic are listed below.

Is cuvidDecodePicture will split the picture into macro blocks/slices to decode the picture?
How entropy used in H.264 was handled in CUVID?
Why are the CUVIDPICPARAMS has two separate structures for mpeg4 and H.264?
How to compare the process of video decoding in ffmpeg and CUVID?

Please some one help me in knowing the concept behind qscale(Quantization Property).

Thanks in advance.
Murali Krishna