自学内容网 自学内容网

libaom 源码分析系列:svc_encoder_rtc.cc 文件

源码函数关系

  • 文件功能:实现 AV1 svc 编码的 RTC 功能 demo
  • 文件位置:libaom/examples/svc_encoder_rtc.cc
  • 文件内函数关系图
    在这里插入图片描述

结构体

  1. AppInput:svc_encoder_rtc.cc 所属 demo 的结构体,作为从命令行接受参数的结构体;
  2. AvxVideoWriter:输出视频写入结构体;
  3. aom_codec_enc_cfg_t:编码器配置结构体;
  4. aom_image_t:图像描述结构体,原始输入视频数据和输入图像的一些信息;
  5. aom_svc_layer_id_t:控制 svc 编码层 ID 结构体;
  6. aom_svc_params_t:控制 svc 编码参数结构体;
  7. aom_svc_ref_frame_config_t:svc 编码参考帧配置结构体;
  8. aom_svc_ref_frame_comp_pred_t:svc 编码参考帧复合预测结构体;
  9. aom_codec_ctx_t:编解码上下文结构体;
  10. RateControlMetrics:svc_encoder_rtc.cc 所属 demo 的结构体,用于统计编码过程中码率控制统计;
  11. aom_codec_err_t:编码配置中返回状态枚举;
  12. aom_codec_iface_t:封装编解码器接口的结构体;
  13. AvxVideoInfo:存储视频流基本信息的结构体;
  14. AV1RateControlRTC:针对 RTC 进行扩展的码率控制结构体;
  15. psnr_stats:psnr 统计相关结构体;
  16. aom_usec_timer:关于时间计算相关结构体;
  17. aom_codec_cx_pkt_t:编码器输出包结构体;
  18. aom_scaling_mode:图像缩放模式结构体;
  19. AV1FrameParamsRTC:针对 RTC 帧参数相关结构体;

parse_command_line函数

  1. 终端输入./svc_encoder_rtc ,即输入参数为 NULL 时,输出如下;可以发现没有输出ext_rc_arg的相关变量;
Usage: ./svc_encoder_rtc <options> input_filename -o output_filename
Options:
  -f <arg>, --frames=<arg>              Number of frames to encode
  -o <arg>, --output=<arg>              Output filename
  -w <arg>, --width=<arg>               Source width
  -h <arg>, --height=<arg>              Source height
  -t <arg>, --timebase=<arg>            Timebase (num/den)
  -b <arg>, --target-bitrate=<arg>      Encoding bitrate, in kilobits per second
  -sl <arg>, --spatial-layers=<arg>     Number of spatial SVC layers
  -k <arg>, --kf-dist=<arg>             Number of frames between keyframes
  -r <arg>, --scale-factors=<arg>       Scale factors (lowest to highest layer)
            --min-q=<arg>               Minimum quantizer
            --max-q=<arg>               Maximum quantizer
  -tl <arg>, --temporal-layers=<arg>    Number of temporal SVC layers
  -lm <arg>, --layering-mode=<arg>      Temporal layering scheme.
  -th <arg>, --threads=<arg>            Number of threads to use
  -aq <arg>, --aqmode=<arg>             AQ mode off/on
  -d <arg>, --bit-depth=<arg>           Bit depth for codec 8 or 10. 
                                         8, 10
  -sp <arg>, --speed=<arg>              Speed configuration
  -bl <arg>, --bitrates=<arg>           Bitrates[spatial_layer * num_temporal_layer + temporal_layer]
            --drop-frame=<arg>          Temporal resampling threshold (buf %)
            --error-resilient=<arg>     Error resilient flag
            --output-obu=<arg>          Write OBUs when set to 1. Otherwise write IVF files.
            --test-decode=<arg>         Attempt to test decoding the output when set to 1. Default is 1.
            --tune-content=<arg>        Tune content type
                                         default, screen, film
       

原文地址:https://blog.csdn.net/yanceyxin/article/details/142863016

免责声明:本站文章内容转载自网络资源,如本站内容侵犯了原著者的合法权益,可联系本站删除。更多内容请关注自学内容网(zxcms.com)!