I'm writing a simple libAV program that reads an AVI file, decodes each frame, then writes that frame data to another AVI file as output. The output file should be pretty much the same as the input file.
I'm using the examples in the ffmpeg source as a start. This is how each frame from the input file gets decoded. avcodec_decode_video2(tmpCodecContextForInputFile, myFrameDecode, got_frame, &pktDecode); Then, in another subroutine, this is how each frame gets encoded for the output file: avcodec_encode_video2(tmpCodecContextForOutputFile, &pktEncode, myFrameEncode, &got_packet); In between the two calls above, I have to convert the image data from myFrameDecode to image data in myFrameEncode. That's what I'm having trouble with. Right now I have lots of row/col loops and they do things differently for different pixel formats. Is there a single subroutine I can that can convert the image data from myFrameDecode to the image data in myFrameEncode? Also, if the input and output file have the same pixel format, is there a simple way to copy the data from one to the other? Thanks
_______________________________________________ Libav-user mailing list Libav-user@ffmpeg.org http://ffmpeg.org/mailman/listinfo/libav-user