天嵌 ARM开发社区

 找回密码
 注册
查看: 2769|回复: 2

基于ffmpeg-1.1的视频解码,并输出到LCD上

[复制链接]
zjhsucceed_329 发表于 2013-1-21 23:33:40 | 显示全部楼层 |阅读模式
本帖最后由 zjhsucceed_329 于 2013-1-24 10:45 编辑

[root@tq2440 /]# ./ffmpeg_decode test.avi
The framebuffer device was opened successfully.
480x272, 16bpp
The framebuffer device was mapped to memory successfully.
Input #-1, avi, from 'test.avi':
  Duration: 00:00:30.33, start: 0.000000, bitrate: 930 kb/s
    Stream #-1:0: Video: indeo3 (IV32 / 0x32335649), yuv410p, 176x184, 15 tbr, 15 tbn, 15 tbc
width:176       height:184

下载相应的库后放到交叉编译工具链相应的目录
ffmpeg库和头文件下载地址

修正之前的一个bug将ffmpeg_decode.c文件中的
struct SwsContext *img_convert_ctx = NULL;
        img_convert_ctx = sws_getCachedContext(img_convert_ctx, pCodecCtx->width,
                                        pCodecCtx->height, pCodecCtx->pix_fmt,
                                        pCodecCtx->width, pCodecCtx->height,
                                        AV_PIX_FMT_RGB565LE, SWS_BICUBIC,
                                        NULL, NULL, NULL);
                                if(!img_convert_ctx)
                                        err_exit("Cannot initialize sws conversion context\n");

移到while循环外面,同时在最后添加sws_freeContext(img_convert_ctx);

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?注册

x
TQ-lkp 发表于 2013-1-22 09:12:55 | 显示全部楼层
楼主真是好人啊
您需要登录后才可以回帖 登录 | 注册

本版积分规则

关闭

i.MX8系列ARM cortex A53 M4 工控板上一条 /1 下一条

Archiver|手机版|小黑屋|天嵌 嵌入式开发社区 ( 粤ICP备11094220号 )

GMT+8, 2024-5-4 07:46 , Processed in 1.031250 second(s), 23 queries .

Powered by Discuz! X3.4

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表