[Ffmpeg-devel] "conceling" errors on H.263

Cool_Zer0 c00jz3r0
Wed Feb 7 18:05:16 CET 2007


Hi there.

Here's the thing...
I'm receiving H.263 packets from a VoIP application.

I extract the RTP header from this packets and apply the following code:

/* Assemble until I have a complete frame */
(...)
if (packet_assembler((unsigned char*)payload, payloadlen, header->m)) {
     video_decode(assembled_buffer, assembled_size);
     FILE *f = fopen("packet.h263", "ab");
     fwrite(assembled_buffer, 1, assembled_size, f);
     fclose(f);
}
(...)
static int assembled_frame_number = 0;
static unsigned char assembled_buffer[10000];
static int assembled_size = 0;
static bool last_packet = true;
bool packet_assembler(unsigned char *payload, int payloadlen, bool
rtp_marker_bit) {

    //packet_log("Checking");

    if (last_packet) { /* Add two bytes of 0's */
        assembled_size = 0;
        memset(assembled_buffer, 0, 10000);
         last_packet == false;
        //packet_log("Two bytes of 0's added!");
    }

    /* Add H.263 bitstream to the buffer */
    //packet_log("Adding to buffer...");
    for (int i=4; i<payloadlen; i++) {
        assembled_buffer[assembled_size++] = ((unsigned char*)payload)[i];
    }

    if (rtp_marker_bit) { /* Is the last packet containing a full frame
*/
        last_packet = true;
        assembled_size--;
        packet_log("Last packet complete!");
        assembled_frame_number++;
    }

    return last_packet;
}


This packet_assembler() function is to join the frames which are divided
into several packets...
When I run ffplay this appears:
$ ffplay packet.h263
Compiler did not align stack variables. Libavcodec has been miscompiled
and may be very slow or crash. This is not a bug in libavcodec,
but in the compiler. Do not report crashes to FFmpeg developers.
[h263 @ 6899A000]concealing 1 DC, 1 AC, 1 MV errors
[h263 @ 6899A000]Error at MB: 48
[h263 @ 6899A000]concealing 22 DC, 22 AC, 22 MV errors
[h263 @ 6899A000]illegal ac vlc code at 10x8
[h263 @ 6899A000]Error at MB: 106
[h263 @ 6899A000]concealing 11 DC, 11 AC, 11 MV errors
[h263 @ 6899A000]illegal dc 0 at 10 8
[h263 @ 6899A000]concealing 1 DC, 1 AC, 1 MV errors
[h263 @ 6899A000]illegal ac vlc code at 10x8
[h263 @ 6899A000]Error at MB: 106
[h263 @ 6899A000]concealing 11 DC, 11 AC, 11 MV errors
[h263 @ 6899A000]illegal ac vlc code at 10x8
[h263 @ 6899A000]Error at MB: 106
[h263 @ 6899A000]concealing 11 DC, 11 AC, 11 MV errors
[h263 @ 6899A000]illegal ac vlc code at 10x8
[h263 @ 6899A000]Error at MB: 106
[h263 @ 6899A000]concealing 11 DC, 11 AC, 11 MV errors
[h263 @ 6899A000]I cbpy damaged at 0 8
[h263 @ 6899A000]Error at MB: 96
[h263 @ 6899A000]concealing 22 DC, 22 AC, 22 MV errors
[h263 @ 6899A000]Error at MB: 72
[h263 @ 6899A000]illegal ac vlc code at 10x8

and the list continues until the video ends...

The video quality is very bad and the movement stays very weird...
In http://www.ncenteio.net/packet.h263 is the video... If anyone wants to
try...
I'm putting in http://www.ncenteio.net/h263.pcap a Ethereal (Wireshark)
capture of the H.263 frames that I'm receiving, if anyone wants to take a
look...

Anyone knows what may be wrong?

Thanks




More information about the ffmpeg-devel mailing list