<br><br><div class="gmail_quote">2009/8/25 Jason Garrett-Glaser <span dir="ltr"><<a href="mailto:darkshikari@gmail.com">darkshikari@gmail.com</a>></span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
On Tue, Aug 25, 2009 at 11:12 AM, Alessandro<br>
<div><div></div><div class="h5">Ferrari<<a href="mailto:alessandroferrari87@gmail.com">alessandroferrari87@gmail.com</a>> wrote:<br>
> 2009/8/25 Jason Garrett-Glaser <<a href="mailto:darkshikari@gmail.com">darkshikari@gmail.com</a>><br>
>><br>
>> On Tue, Aug 25, 2009 at 10:51 AM, Alessandro<br>
>> Ferrari<<a href="mailto:alessandroferrari87@gmail.com">alessandroferrari87@gmail.com</a>> wrote:<br>
>> > 2009/8/25 Jason Garrett-Glaser <<a href="mailto:darkshikari@gmail.com">darkshikari@gmail.com</a>><br>
>> >><br>
>> >> On Tue, Aug 25, 2009 at 2:57 AM, Alessandro<br>
>> >> Ferrari<<a href="mailto:alessandroferrari87@gmail.com">alessandroferrari87@gmail.com</a>> wrote:<br>
>> >> > Hi dear community,<br>
>> >> > I have a problem with the encoding using<br>
>> >> > x264.<br>
>> >> > After I call x264_encoder_encode( h, &nal, &i_nal, pic, &pic_out)<br>
>> >> > function<br>
>> >> > I have nal= NULL, i_nal=0 and the function return 0. I'm sure that<br>
>> >> > pic<br>
>> >> > contain the correct image. The x264_t h is open using the default<br>
>> >> > parameters, i only change width and length of the video. The function<br>
>> >> > don't<br>
>> >> > give me any error, it seems that it not encode any data. I include<br>
>> >> > the<br>
>> >> > code<br>
>> >> > of encoding function that I implement watching x264.c.<br>
>> >><br>
>> >> x264 has an encoding delay depending on your parameters; it will not<br>
>> >> return frames until a number of frames have been inputted. This delay<br>
>> >> is used for lookahead purposes. Keep inputting frames and you will<br>
>> >> eventually get frames out.<br>
>> >><br>
>> >> Dark Shikari<br>
>> ><br>
>> > I have a strange error when i try to access at the fields of x264_t. I<br>
>> > have<br>
>> > this compilation error:<br>
>> > transcoder.c:173: error: dereferencing pointer to incomplete type<br>
>> > The automatic code completion of my ide don't find any fields for the<br>
>> > pointer at x264_t h, but the compiler correct recognize the presence of<br>
>> > the<br>
>> > type x264_t. I include on the x264.h header. Can this the cause of<br>
>> > problem?<br>
>> > Many thanks.<br>
>><br>
>> x264_t is an opaque handler for the encoder; you are not supposed to<br>
>> be able to access its internal variables.<br>
>><br>
>> Dark Shikari<br>
><br>
> Ok, now I understand. I have any possibilities to change this frame delay?<br>
><br>
<br>
</div></div>The encoder-side frame delay is as follows (measured in frames):<br>
<br>
With b-adapt = 0 or 1:<br>
MAX( param.rc.i_lookahead, param.i_bframes ) + threads - 1<br>
<br>
With b-adapt = 2:<br>
MAX( param.rc.i_lookahead, MAX(param.i_bframes,3)*4 ) + threads - 1<br>
<br>
Note that both VBV lookahead (for increased VBV quality and<br>
compliance) and Macroblock Tree ratecontrol (for better quality<br>
distribution among frames) require a significant lookahead; both of<br>
these features will be disabled if you turn off the lookahead.<br>
Obviously, for low-latency applications like videoconferencing, you<br>
have no choice.<br>
<div><div></div><div class="h5"><br>
Dark Shikari<br></div></div></blockquote></div> <br>I have to implement a transcoder that receive a frame by network and downsize it for mobile device with low latency. B-adapt is set to 1, and i have only one threads, i cannot access to param.rc.lookahead, and I don't know if by default lookahead is disabled or not. If lookahead is disabled i think that frame-delay is 1, in this case i think that the problem is not caused by frame delay. Any suggest? Thanks.<br>
Best regards<br>