| 1520 | } |
| 1521 | |
| 1522 | static int apply_encoder_options(hb_job_t *job, AVCodecContext *context, AVDictionary **av_opts) |
| 1523 | { |
| 1524 | #if HB_PROJECT_FEATURE_QSV |
| 1525 | if (hb_qsv_is_ffmpeg_supported_codec(job->vcodec)) |
| 1526 | { |
| 1527 | // options applied separately via hb_qsv_apply_encoder_options() call |
| 1528 | return 0; |
| 1529 | } |
| 1530 | #endif |
| 1531 | /* place job->encoder_options in an hb_dict_t for convenience */ |
| 1532 | hb_dict_t *lavc_opts = NULL; |
| 1533 | if (job->encoder_options != NULL && *job->encoder_options) |
| 1534 | { |
| 1535 | lavc_opts = hb_encopts_to_dict(job->encoder_options, job->vcodec); |
| 1536 | } |
| 1537 | else |
| 1538 | { |
| 1539 | lavc_opts = hb_dict_init(); |
| 1540 | } |
| 1541 | |
| 1542 | switch (job->vcodec) |
| 1543 | { |
| 1544 | default: |
| 1545 | apply_options(job, context, av_opts, lavc_opts); |
| 1546 | break; |
| 1547 | } |
| 1548 | |
| 1549 | hb_dict_free(&lavc_opts); |
| 1550 | |
| 1551 | return 0; |
| 1552 | } |
| 1553 | |
| 1554 | static int apply_vce_preset(AVDictionary **av_opts, int vcodec, const char *preset) |
| 1555 | { |
no test coverage detected