Hi all developers,
I’m trying to use the ROI encoding of multimedia API. I’m trying to figure out some concepts.
According to the doc of video_encode sample application, it needs to provide a file where each row is <no. of roi regions>
one of the samples is: 2 -2 34 33 16 19 -3 68 68 16 16
What does this qp delta mean? It looks like it’s a relative offset from the lowest qp 51, but I’m not very sure. Is my understanding correct?
thanks in advance!
Hi,
It is offset to the qp value. The algorithm will decide a qp value for each frame and the ROI will be encoded with the offset. For example, if the frame has qp value=20, the first ROI will have qp value=18(20-2) and second ROI is 17(20-3).
I have one more question. Is it possible for me to choose the baseline qp value for each frame? And the use the qp offset value for different ROI. I found it’s only possible to choose the MaxQP and Min QP for I or P or B frames
Hi,
I try to cap the Max and Min QP to the same value (26) and enable the ROI. I foudn even I give the offset (10), the ROI is not taking effect. It seems that the qp after adding offset is still limited by the MaxQP. The report metadatas shows the MaxQp within the frame is still under the MaxQP
Do you have any idea or if it’s possible that I encode parital of the frames with a fixed QP, and some ROI with an offset?
Thanks in advance
It seems that the ROI encoding doesn’t take effect. Do you have any advice on how to solve it? I also found some related solution in the forum which suggests to make the ROI region slightly smaller than the raw frame. I tried. But it still occurs this problem.
But I check the compressed video file, it does have some effect but according to the log, it seems not working properly. I’m confused about this report-metadata. What is the meaning of these showing results?
Hi,
You would need to use a tool to parse QP value of each macroblock in the frame. The printed value is the QP value of whole frame. It doesn’t print out the specific ROI.
And I don’t understand what you mean by “the value is the qp of the whole frame”. Does it mean the showed qp is the areas except the ROI areas? It’s quite confusing for me.
Yes, it is QP value of all macroblocks except ROI areas. There are certain tools for showing information of each macroblock in one frame. Would suggest use the tool for analysis.
Thanks!
I analyze the qp and only when the ROI area is slightly smaller than the whole image, it can work.
And I also test to encode 1/4 of the image with qp 46 and rest of the image with qp 26. Compared with the whole image encoded with qp 26. The former has larger encoded bitstream. It looks so strange, do you also observe this problem?
Details:
For the same video, I encode 1/4 of all frames with qp 46, rest of it is qp 26
here qp is 26, and in the roi file I make a largest offset to assure the right bottom 1/4 of the video’s qp is 46, and rest of it are 26.
Hi,
Do you check qp value of each macroblock and see if it is expected? It looks like the qp value may not be expected. Probably it does not work properly if you set offset to a large value.
It works. I check the QP value of each frame. I use streamEye to check the qp value
The first is I frame, the second is p frame, only the right bottom 1/4 's qp is 46.