47 fprintf(stdout,
"AVVideoEncParams %d\n", par->
type);
48 fprintf(stdout,
"qp %d\n", par->
qp);
52 fprintf(stdout,
"delta_qp[%d][%d] %"PRId32
"\n",
i, j, par->
delta_qp[
i][j]);
56 fprintf(stdout,
"nb_blocks %d\n", par->
nb_blocks);
60 fprintf(stdout,
"block %d %d:%d %dx%d %"PRId32
"\n",
61 i,
b->src_x,
b->src_y,
b->w,
b->h,
b->delta_qp);
69int main(
int argc,
char **argv)
73 unsigned int stream_idx, max_frames;
74 const char *filename, *thread_type =
NULL, *nb_threads =
NULL;
78 fprintf(stderr,
"Usage: %s <input file> <stream index> <max frame count> [<thread count> <thread type>]\n", argv[0]);
83 stream_idx = strtol(argv[2],
NULL, 0);
84 max_frames = strtol(argv[3],
NULL, 0);
87 thread_type = argv[5];
90 ret =
ds_open(&dc, filename, stream_idx);
Libavcodec external API header.
#define i(width, name, range_min, range_max)
common internal and external API header
int ds_open(DecodeContext *dc, const char *url, int stream_idx)
void ds_free(DecodeContext *dc)
int ds_run(DecodeContext *dc)
static av_always_inline int process_frame(AVTextFormatContext *tfc, InputFile *ifile, AVFrame *frame, const AVPacket *pkt, int *packet_new)
int av_dict_set(AVDictionary **pm, const char *key, const char *value, int flags)
Set the given entry in *pm, overwriting an existing entry.
AVFrameSideData * av_frame_get_side_data(const AVFrame *frame, enum AVFrameSideDataType type)
@ AV_FRAME_DATA_VIDEO_ENC_PARAMS
Encoding parameters for a video frame, as described by AVVideoEncParams.
#define FF_ARRAY_ELEMS(a)
int64_t frame_num
Frame counter, set by libavcodec.
Structure to hold side data for an AVFrame.
This structure describes decoded (raw) audio or video data.
Data structure for storing block-level encoding information.
Video encoding parameters for a given frame.
int32_t delta_qp[4][2]
Quantisation parameter offset from the base (per-frame) qp for a given plane (first index) and AC/DC ...
enum AVVideoEncParamsType type
Type of the parameters (the codec they are used with).
unsigned int nb_blocks
Number of blocks in the array.
int32_t qp
Base quantisation parameter for the frame.
AVDictionary * decoder_opts
int(* process_frame)(struct DecodeContext *dc, AVFrame *frame)
static int process_frame(DecodeContext *dc, AVFrame *frame)
static av_always_inline AVVideoBlockParams * av_video_enc_params_block(AVVideoEncParams *par, unsigned int idx)
Get the block at the specified idx.