Firefly开源社区

打印 上一主题 下一主题

哪个用过硬解,我想问一下,upv_api.h这个里面的函数在哪个地方实现的

21

积分

0

威望

0

贡献

游客

积分
21

哪个用过硬解,我想问一下,upv_api.h这个里面的函数在哪个地方实现的

发表于 2015-12-8 15:32:29      浏览:5756 | 回复:3        打印      只看该作者   [复制链接] 楼主
哪个用过硬解,我想问一下,upv_api.h这个里面的函数在哪个地方实现的,我找了好久没有找到。
就是下面以的
  1. typedef struct VpuCodecContext {
  2.     void* vpuApiObj;

  3.     CODEC_TYPE codecType;
  4.     OMX_RK_VIDEO_CODINGTYPE videoCoding;

  5.     RK_U32 width;
  6.     RK_U32 height;
  7.     RK_U8 *extradata;
  8.     RK_S32 extradata_size;

  9.     RK_U8  enableparsing;



  10.     RK_S32 no_thread;
  11.     EXtraCfg_t extra_cfg;

  12.     void* private_data;

  13.     /*
  14.      ** 1: error state(not working)  0: working
  15.     */
  16.     RK_S32 decoder_err;


  17.     /**
  18.      * Allocate and initialize an VpuCodecContext.
  19.      *
  20.      * @param ctx The context of vpu api, allocated in this function.
  21.      * @param extraData The extra data of codec, some codecs need / can
  22.      *        use extradata like Huffman tables, also live VC1 codec can
  23.      *        use extradata to initialize itself.
  24.      * @param extra_size The size of extra data.
  25.      *
  26.      * @return 0 for init success, others for failure.
  27.      * note: check whether ctx has been allocated success after you do init.
  28.      */
  29.     RK_S32 (*init)(struct VpuCodecContext *ctx, RK_U8 *extraData, RK_U32 extra_size);

  30.     /**
  31.      * @return 0 for decode success, others for failure.
  32.      */
  33.     RK_S32 (*decode)(struct VpuCodecContext *ctx, VideoPacket_t *pkt, DecoderOut_t *aDecOut);

  34.     /**
  35.      * @return 0 for encode success, others for failure.
  36.      */
  37.     RK_S32 (*encode)(struct VpuCodecContext *ctx, EncInputStream_t *aEncInStrm, EncoderOut_t *aEncOut);

  38.     /**
  39.      * flush codec while do fast forward playing.
  40.      *
  41.      * @return 0 for flush success, others for failure.
  42.      */
  43.     RK_S32 (*flush)(struct VpuCodecContext *ctx);
  44.     RK_S32 (*control)(struct VpuCodecContext *ctx, VPU_API_CMD cmdType, void* param);
  45.     /**
  46.      *seperate the decode function to two function
  47.      *
  48.     */
  49.     RK_S32 (*decode_sendstream)(struct VpuCodecContext *ctx, VideoPacket_t *pkt);
  50.     RK_S32 (*decode_getframe)(struct VpuCodecContext *ctx, DecoderOut_t *aDecOut);

  51.     RK_S32 (*encoder_sendframe)(struct VpuCodecContext *ctx,  EncInputStream_t *aEncInStrm);
  52.     RK_S32 (*encoder_getstream)(struct VpuCodecContext *ctx, EncoderOut_t *aEncOut);
  53. }VpuCodecContext_t;

  54. /* allocated vpu codec context */
  55. #ifdef __cplusplus
  56. extern "C"
  57. {
  58. #endif
  59. RK_S32 vpu_open_context(struct VpuCodecContext **ctx);
  60. #ifdef __cplusplus
  61. }
  62. #endif

  63. #ifdef __cplusplus
  64. extern "C"
  65. {
  66. #endif
  67. RK_S32 vpu_close_context(struct VpuCodecContext **ctx);
  68. #ifdef __cplusplus
  69. }
  70. #endif

  71. typedef RK_S32 (*VpuOpenContextFactoryFun)(struct VpuCodecContext **ctx);
  72. typedef RK_S32 (*VpuCloseContextFactoryFun)(struct VpuCodecContext **ctx);
复制代码
回复

使用道具 举报

20

积分

0

威望

0

贡献

游客

积分
20
发表于 2016-4-19 11:22:10        只看该作者  沙发
libvpu.so,应该没有开放源码。
回复

使用道具 举报

20

积分

0

威望

0

贡献

游客

积分
20
发表于 2016-4-19 11:25:34        只看该作者  板凳
本帖最后由 scue 于 2016-4-19 11:34 编辑

可以查看一下这里: vendor/rockchip/common/vpu/lib/arm/librk_vpuapi.so

[mw_shl_code=c,false]    /**
     *seperate the decode function to two function
     *
    */
    RK_S32 (*decode_sendstream)(struct VpuCodecContext *ctx, VideoPacket_t *pkt);
    RK_S32 (*decode_getframe)(struct VpuCodecContext *ctx, DecoderOut_t *aDecOut);[/mw_shl_code]


arm-linux-androideabi-nm -D lib/arm/librk_vpuapi.so  | grep decode_
00015cd4 T _ZN6VpuApi17decode_sendstreamEP15VpuCodecContextP11VideoPacket
00016310 T _ZN6VpuApi18decode_getoutframeEP15VpuCodecContextP10DecoderOut





回复

使用道具 举报

48

积分

0

威望

0

贡献

游客

积分
48
发表于 2016-7-14 13:43:09        只看该作者  地板
scue 发表于 2016-4-19 11:25
可以查看一下这里: vendor/rockchip/common/vpu/lib/arm/librk_vpuapi.so

[mw_shl_code=c,false]    /* ...

hello;
在ubuntu系统下也可以实现h264的硬解么?硬解1080p的h264时cpu使用率有多少?有没有成熟的方案?
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

友情链接 : 爱板网 电子发烧友论坛 云汉电子社区 粤ICP备14022046号-2
快速回复 返回顶部 返回列表