[x264-devel] Re: h->stats
Loren Merritt
lorenm at u.washington.edu
Fri Apr 29 18:12:00 CEST 2005
On Fri, 29 Apr 2005, Tom Jacobs wrote:
> since i am using the sliced implementation would it be reasonable to
> minus the slices start xy number from i_mb_xy and have the stat
> structure seperate for all slices? without this i_mb_count will never to
> larger than i_mb_xy in later slices.
Yes, it cares about the fraction of encded blocks that were intra, so just
compare intra mb count against whatever range of MBs it's counted from.
>> h->stat is used for ratecontrol and scenecut detection.
>
> can you point me in the right direction for these parts? for ratecontrol
> this can be done by splittin the allowed bits for the frame evenly between
> the slices. i know this will nto give the best bitrate but shouldnt affect
> it much since the number of slices will not be huge. is scenecut detection
> used to insert I frames?
OK, you're just asking about threading? Scenecut detection is run only
after encoding the whole frame, so as long as you can combine stats at
the end it's ok. Ratecontrol is more complicated now, but I'm pretty done
with my revised ABR patch, so that will simplify things to the same
assumption: As long as the stats are correct after you finish the frame,
it's ok.
Plus, allocating bits per slice is really the wrong thing to do, and the
new algorithm will remove that need. A predermined bit distribution may
not matter much with the current CBR algo (which tries to keep bitrate
constant on a MB level anyway), but I've seen gains of around 4 dB from
using a better 1pass algo.
> is this the only method of inserting I frames or is
> there an extra method if there is a long run without one? can you have an I
> encoded slice and a P encoded one on the same frame?
I think the standard allows you to put a I-slice and a P-slice in the same
frame, but it won't be an I-frame then, so there's no point from the
perspective of seeking. If it's really a scenecut, chances are the whole
frame is best coded as I, and if not then you want the whole thing to be
P.
--Loren Merritt
--
This is the x264-devel mailing-list
To unsubscribe, go to: http://developers.videolan.org/lists.html
More information about the x264-devel
mailing list