Ive been playing around with pmp/ffmpeg, Ive finally made it to compile and work on my m33 cfw, it loads video files and extracts stream/codec info allright, but now Im stuck with decoding the frames.
This code is the problem:
Code: Select all
avcodec_decode_video(pCodecCtx, pFrame, &frameFinished,
packet.data, packet.size);
I think its because the input buffer - packet.data is not aligned.
packet is of type AVPacket.
and I get it with this routine:
Code: Select all
av_read_frame(pFormatCtx, &packet)
Might that solve the problem?Note: You might have to align the input buffer buf and output buffer samples. The alignment requirements depend on the CPU: on some CPUs it isn't necessary at all, on others it won't work at all if not aligned and on others it will work but it will have an impact on performance. In practice, the bitstream should have 4 byte alignment at minimum and all sample data should be 16 byte aligned unless the CPU doesn't need it (AltiVec and SSE do). If the linesize is not a multiple of 16 then there's no sense in aligning the start of the buffer to 16.
And also, what's the best way to allign data buffer on psp?
Sorry for lame question and thanks.