#include "av1_parse.h"
#include "cbs.h"
#include "cbs_av1.h"
+#include "internal.h"
#include "parser.h"
typedef struct AV1ParseContext {
else
continue;
+ if (obu->header.spatial_id > 0)
+ continue;
+
if (frame->show_existing_frame) {
AV1ReferenceFrameState *ref = &av1->ref[frame->frame_to_show_map_idx];
break;
}
av_assert2(ctx->format != AV_PIX_FMT_NONE);
+
+ avctx->colorspace = (enum AVColorSpace) color->matrix_coefficients;
+ avctx->color_primaries = (enum AVColorPrimaries) color->color_primaries;
+ avctx->color_trc = (enum AVColorTransferCharacteristic) color->transfer_characteristics;
+ avctx->color_range = color->color_range ? AVCOL_RANGE_JPEG : AVCOL_RANGE_MPEG;
+
+ if (ctx->width != avctx->width || ctx->height != avctx->height) {
+ ret = ff_set_dimensions(avctx, ctx->width, ctx->height);
+ if (ret < 0)
+ goto end;
+ }
}
+ if (avctx->framerate.num)
+ avctx->time_base = av_inv_q(av_mul_q(avctx->framerate, (AVRational){avctx->ticks_per_frame, 1}));
+
end:
ff_cbs_fragment_reset(s->cbc, td);