/third_party/ffmpeg/libavcodec/tests/ |
H A D | avpacket.c | 28 static int setup_side_data_entry(AVPacket* avpkt) in setup_side_data_entry() argument 50 ret = av_packet_add_side_data(avpkt, AV_PKT_DATA_NEW_EXTRADATA, in setup_side_data_entry() 61 static int initializations(AVPacket* avpkt) in initializations() argument 66 /* set values for avpkt */ in initializations() 67 avpkt->pts = 17; in initializations() 68 avpkt->dts = 2; in initializations() 69 avpkt->data = (uint8_t*)data; in initializations() 70 avpkt->size = strlen(data); in initializations() 71 avpkt->flags = AV_PKT_FLAG_DISCARD; in initializations() 72 avpkt in initializations() 82 AVPacket *avpkt = NULL; main() local [all...] |
/third_party/ffmpeg/libavcodec/ |
H A D | encode.c | 35 int ff_alloc_packet(AVCodecContext *avctx, AVPacket *avpkt, int64_t size) in ff_alloc_packet() argument 43 av_assert0(!avpkt->data); in ff_alloc_packet() 47 avpkt->data = avctx->internal->byte_buffer; in ff_alloc_packet() 48 if (!avpkt->data) { in ff_alloc_packet() 52 avpkt->size = size; in ff_alloc_packet() 57 int avcodec_default_get_encode_buffer(AVCodecContext *avctx, AVPacket *avpkt, int flags) in avcodec_default_get_encode_buffer() argument 61 if (avpkt->size < 0 || avpkt->size > INT_MAX - AV_INPUT_BUFFER_PADDING_SIZE) in avcodec_default_get_encode_buffer() 64 if (avpkt->data || avpkt in avcodec_default_get_encode_buffer() 79 ff_get_encode_buffer(AVCodecContext *avctx, AVPacket *avpkt, int64_t size, int flags) ff_get_encode_buffer() argument 175 encode_simple_internal(AVCodecContext *avctx, AVPacket *avpkt) encode_simple_internal() argument 264 encode_simple_receive_packet(AVCodecContext *avctx, AVPacket *avpkt) encode_simple_receive_packet() argument 277 encode_receive_packet_internal(AVCodecContext *avctx, AVPacket *avpkt) encode_receive_packet_internal() argument 390 avcodec_receive_packet(AVCodecContext *avctx, AVPacket *avpkt) avcodec_receive_packet() argument [all...] |
H A D | libtwolame.c | 110 static int twolame_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, in twolame_encode_frame() argument 116 if ((ret = ff_alloc_packet(avctx, avpkt, MPA_MAX_CODED_FRAME_SIZE)) < 0) in twolame_encode_frame() 125 avpkt->data, in twolame_encode_frame() 126 avpkt->size); in twolame_encode_frame() 133 avpkt->data, avpkt->size); in twolame_encode_frame() 139 avpkt->data, avpkt->size); in twolame_encode_frame() 146 avpkt->data, avpkt in twolame_encode_frame() [all...] |
H A D | imm5.c | 87 int *got_frame, AVPacket *avpkt) in imm5_decode_frame() 93 if (avpkt->size > 24 && avpkt->data[8] <= 1 && AV_RL32(avpkt->data + 4) + 24ULL <= avpkt->size) { in imm5_decode_frame() 94 int codec_type = avpkt->data[1]; in imm5_decode_frame() 95 int index = avpkt->data[10]; in imm5_decode_frame() 96 int new_size = AV_RL32(avpkt->data + 4); in imm5_decode_frame() 108 ret = av_packet_make_writable(avpkt); in imm5_decode_frame() 120 avpkt in imm5_decode_frame() 86 imm5_decode_frame(AVCodecContext *avctx, AVFrame *frame, int *got_frame, AVPacket *avpkt) imm5_decode_frame() argument [all...] |
H A D | bitpacked_dec.c | 42 const AVPacket *avpkt) in bitpacked_decode_uyvy422() 48 frame->buf[0] = av_buffer_ref(avpkt->buf); in bitpacked_decode_uyvy422() 53 ret = av_image_fill_arrays(frame->data, frame->linesize, avpkt->data, in bitpacked_decode_uyvy422() 64 const AVPacket *avpkt) in bitpacked_decode_yuv422p10() 67 uint64_t packet_size = (uint64_t)avpkt->size * 8; in bitpacked_decode_yuv422p10() 82 ret = init_get_bits(&bc, avpkt->data, avctx->width * avctx->height * 20); in bitpacked_decode_yuv422p10() 126 int *got_frame, AVPacket *avpkt) in bitpacked_decode() 129 int buf_size = avpkt->size; in bitpacked_decode() 132 res = bc->decode(avctx, frame, avpkt); in bitpacked_decode() 41 bitpacked_decode_uyvy422(AVCodecContext *avctx, AVFrame *frame, const AVPacket *avpkt) bitpacked_decode_uyvy422() argument 63 bitpacked_decode_yuv422p10(AVCodecContext *avctx, AVFrame *frame, const AVPacket *avpkt) bitpacked_decode_yuv422p10() argument 125 bitpacked_decode(AVCodecContext *avctx, AVFrame *frame, int *got_frame, AVPacket *avpkt) bitpacked_decode() argument
|
H A D | bitpacked.c | 41 const AVPacket *avpkt) in bitpacked_decode_uyvy422() 47 frame->buf[0] = av_buffer_ref(avpkt->buf); in bitpacked_decode_uyvy422() 48 ret = av_image_fill_arrays(frame->data, frame->linesize, avpkt->data, in bitpacked_decode_uyvy422() 59 const AVPacket *avpkt) in bitpacked_decode_yuv422p10() 62 uint64_t packet_size = (uint64_t)avpkt->size * 8; in bitpacked_decode_yuv422p10() 77 ret = init_get_bits(&bc, avpkt->data, avctx->width * avctx->height * 20); in bitpacked_decode_yuv422p10() 121 AVPacket *avpkt) in bitpacked_decode() 124 int buf_size = avpkt->size; in bitpacked_decode() 131 res = bc->decode(avctx, frame, avpkt); in bitpacked_decode() 40 bitpacked_decode_uyvy422(AVCodecContext *avctx, AVFrame *frame, const AVPacket *avpkt) bitpacked_decode_uyvy422() argument 58 bitpacked_decode_yuv422p10(AVCodecContext *avctx, AVFrame *frame, const AVPacket *avpkt) bitpacked_decode_yuv422p10() argument 120 bitpacked_decode(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt) bitpacked_decode() argument
|
H A D | xbmdec.c | 69 int *got_frame, AVPacket *avpkt) in xbm_decode_frame() 74 const uint8_t *end, *ptr = avpkt->data; in xbm_decode_frame() 79 end = avpkt->data + avpkt->size; in xbm_decode_frame() 81 width = parse_str_int(avpkt->data, end, "_width"); in xbm_decode_frame() 82 height = parse_str_int(avpkt->data, end, "_height"); in xbm_decode_frame() 91 next = memchr(ptr, '{', avpkt->size); in xbm_decode_frame() 93 next = memchr(ptr, '(', avpkt->size); in xbm_decode_frame() 137 return avpkt->size; in xbm_decode_frame() 68 xbm_decode_frame(AVCodecContext *avctx, AVFrame *p, int *got_frame, AVPacket *avpkt) xbm_decode_frame() argument
|
H A D | 8svx.c | 90 int *got_frame_ptr, AVPacket *avpkt) in eightsvx_decode_frame() 99 if (!esc->data[0] && avpkt) { in eightsvx_decode_frame() 100 int chan_size = avpkt->size / channels - hdr_size; in eightsvx_decode_frame() 102 if (avpkt->size % channels) { in eightsvx_decode_frame() 105 if (avpkt->size < (hdr_size + 1) * channels) { in eightsvx_decode_frame() 110 esc->fib_acc[0] = avpkt->data[1] + 128; in eightsvx_decode_frame() 112 esc->fib_acc[1] = avpkt->data[2+chan_size+1] + 128; in eightsvx_decode_frame() 124 memcpy(esc->data[0], &avpkt->data[hdr_size], chan_size); in eightsvx_decode_frame() 126 memcpy(esc->data[1], &avpkt->data[2*hdr_size+chan_size], chan_size); in eightsvx_decode_frame() 137 return avpkt in eightsvx_decode_frame() 89 eightsvx_decode_frame(AVCodecContext *avctx, AVFrame *frame, int *got_frame_ptr, AVPacket *avpkt) eightsvx_decode_frame() argument [all...] |
H A D | sbcenc.c | 95 * Packs the SBC frame from frame into the memory in avpkt. 98 static size_t sbc_pack_frame(AVPacket *avpkt, struct sbc_frame *frame, in sbc_pack_frame() argument 115 avpkt->data[0] = MSBC_SYNCWORD; in sbc_pack_frame() 116 avpkt->data[1] = 0; in sbc_pack_frame() 117 avpkt->data[2] = 0; in sbc_pack_frame() 119 avpkt->data[0] = SBC_SYNCWORD; in sbc_pack_frame() 121 avpkt->data[1] = (frame->frequency & 0x03) << 6; in sbc_pack_frame() 122 avpkt->data[1] |= (((frame->blocks >> 2) - 1) & 0x03) << 4; in sbc_pack_frame() 123 avpkt->data[1] |= (frame->mode & 0x03) << 2; in sbc_pack_frame() 124 avpkt in sbc_pack_frame() 278 sbc_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, const AVFrame *av_frame, int *got_packet_ptr) sbc_encode_frame() argument [all...] |
H A D | dsddec.c | 70 const AVPacket *avpkt; member 79 const AVPacket *avpkt = td->avpkt; in dsd_channel() local 92 avpkt->data + j * src_next, src_stride, in dsd_channel() 99 int *got_frame_ptr, AVPacket *avpkt) in decode_frame() 104 frame->nb_samples = avpkt->size / avctx->ch_layout.nb_channels; in decode_frame() 110 td.avpkt = avpkt; in decode_frame() 98 decode_frame(AVCodecContext *avctx, AVFrame *frame, int *got_frame_ptr, AVPacket *avpkt) decode_frame() argument
|
H A D | libopenh264dec.c | 91 int *got_frame, AVPacket *avpkt) in svc_decode_frame() 102 if (!avpkt->data) { in svc_decode_frame() 111 info.uiInBsTimeStamp = avpkt->pts; in svc_decode_frame() 117 state = (*s->decoder)->DecodeFrameNoDelay(s->decoder, avpkt->data, avpkt->size, ptrs, &info); in svc_decode_frame() 119 state = (*s->decoder)->DecodeFrame2(s->decoder, avpkt->data, avpkt->size, ptrs, &info); in svc_decode_frame() 128 return avpkt->size; in svc_decode_frame() 156 return avpkt->size; in svc_decode_frame() 90 svc_decode_frame(AVCodecContext *avctx, AVFrame *avframe, int *got_frame, AVPacket *avpkt) svc_decode_frame() argument
|
H A D | adxdec.c | 97 int *got_frame_ptr, AVPacket *avpkt) in adx_decode_frame() 99 int buf_size = avpkt->size; in adx_decode_frame() 103 const uint8_t *buf = avpkt->data; in adx_decode_frame() 104 const uint8_t *buf_end = buf + avpkt->size; in adx_decode_frame() 109 new_extradata = av_packet_get_side_data(avpkt, AV_PKT_DATA_NEW_EXTRADATA, in adx_decode_frame() 154 return avpkt->size; in adx_decode_frame() 170 buf = avpkt->data + avpkt->size; in adx_decode_frame() 183 return buf - avpkt->data; in adx_decode_frame() 96 adx_decode_frame(AVCodecContext *avctx, AVFrame *frame, int *got_frame_ptr, AVPacket *avpkt) adx_decode_frame() argument
|
H A D | 012v.c | 40 int *got_frame, AVPacket *avpkt) in zero12v_decode_frame() 45 const uint8_t *line_end, *src = avpkt->data; in zero12v_decode_frame() 54 && avpkt->size % avctx->height == 0 in zero12v_decode_frame() 55 && avpkt->size / avctx->height * 3 >= width * 8) in zero12v_decode_frame() 56 stride = avpkt->size / avctx->height; in zero12v_decode_frame() 58 if (avpkt->size < avctx->height * stride) { in zero12v_decode_frame() 60 avpkt->size, avctx->height * stride); in zero12v_decode_frame() 70 line_end = avpkt->data + stride; in zero12v_decode_frame() 144 return avpkt->size; in zero12v_decode_frame() 39 zero12v_decode_frame(AVCodecContext *avctx, AVFrame *pic, int *got_frame, AVPacket *avpkt) zero12v_decode_frame() argument
|
H A D | screenpresso.c | 106 int *got_frame, AVPacket *avpkt) in screenpresso_decode_frame() 114 if (avpkt->size < 3) { in screenpresso_decode_frame() 115 av_log(avctx, AV_LOG_ERROR, "Packet too small (%d)\n", avpkt->size); in screenpresso_decode_frame() 120 av_log(avctx, AV_LOG_DEBUG, "Compression level %d\n", avpkt->data[0] >> 4); in screenpresso_decode_frame() 121 keyframe = avpkt->data[0] & 1; in screenpresso_decode_frame() 124 component_size = ((avpkt->data[1] >> 2) & 0x03) + 1; in screenpresso_decode_frame() 143 avpkt->data + 2, avpkt->size - 2); in screenpresso_decode_frame() 183 return avpkt->size; in screenpresso_decode_frame() 105 screenpresso_decode_frame(AVCodecContext *avctx, AVFrame *frame, int *got_frame, AVPacket *avpkt) screenpresso_decode_frame() argument
|
H A D | libopencore-amr.c | 100 int *got_frame_ptr, AVPacket *avpkt) in amr_nb_decode_frame() 102 const uint8_t *buf = avpkt->data; in amr_nb_decode_frame() 103 int buf_size = avpkt->size; in amr_nb_decode_frame() 236 static int amr_nb_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, in amr_nb_encode_frame() argument 249 if ((ret = ff_alloc_packet(avctx, avpkt, 32)) < 0) in amr_nb_encode_frame() 277 avpkt->data, 0); in amr_nb_encode_frame() 279 written, s->enc_mode, avpkt->data[0]); in amr_nb_encode_frame() 282 ff_af_queue_remove(&s->afq, avctx->frame_size, &avpkt->pts, in amr_nb_encode_frame() 283 &avpkt->duration); in amr_nb_encode_frame() 285 avpkt in amr_nb_encode_frame() 99 amr_nb_decode_frame(AVCodecContext *avctx, AVFrame *frame, int *got_frame_ptr, AVPacket *avpkt) amr_nb_decode_frame() argument 332 amr_wb_decode_frame(AVCodecContext *avctx, AVFrame *frame, int *got_frame_ptr, AVPacket *avpkt) amr_wb_decode_frame() argument [all...] |
H A D | bethsoftvideo.c | 71 int *got_frame, AVPacket *avpkt) in bethsoftvid_decode_frame() 86 if (avpkt->side_data_elems > 0 && in bethsoftvid_decode_frame() 87 avpkt->side_data[0].type == AV_PKT_DATA_PALETTE) { in bethsoftvid_decode_frame() 88 bytestream2_init(&vid->g, avpkt->side_data[0].data, in bethsoftvid_decode_frame() 89 avpkt->side_data[0].size); in bethsoftvid_decode_frame() 94 bytestream2_init(&vid->g, avpkt->data, avpkt->size); in bethsoftvid_decode_frame() 151 return avpkt->size; in bethsoftvid_decode_frame() 70 bethsoftvid_decode_frame(AVCodecContext *avctx, AVFrame *rframe, int *got_frame, AVPacket *avpkt) bethsoftvid_decode_frame() argument
|
H A D | sp5xdec.c | 35 int ff_sp5x_process_packet(AVCodecContext *avctx, AVPacket *avpkt) in ff_sp5x_process_packet() argument 37 const uint8_t *buf = avpkt->data; in ff_sp5x_process_packet() 38 int buf_size = avpkt->size; in ff_sp5x_process_packet() 86 av_buffer_unref(&avpkt->buf); in ff_sp5x_process_packet() 87 avpkt->buf = buf_recoded; in ff_sp5x_process_packet() 88 avpkt->data = recoded; in ff_sp5x_process_packet() 89 avpkt->size = j; in ff_sp5x_process_packet()
|
H A D | rasc.c | 116 const AVPacket *avpkt, unsigned size) in decode_fint() 175 static int decode_zlib(AVCodecContext *avctx, const AVPacket *avpkt, in decode_zlib() argument 193 zstream->next_in = avpkt->data + bytestream2_tell(gb); in decode_zlib() 210 const AVPacket *avpkt, unsigned size) in decode_move() 231 ret = decode_zlib(avctx, avpkt, in decode_move() 238 bytestream2_init(&mc, avpkt->data + bytestream2_tell(gb), in decode_move() 334 const AVPacket *avpkt, unsigned size) in decode_dlta() 365 ret = decode_zlib(avctx, avpkt, size, uncompressed_size); in decode_dlta() 372 bytestream2_init(&dc, avpkt->data + bytestream2_tell(gb), in decode_dlta() 476 const AVPacket *avpkt, unsigne in decode_kfrm() 115 decode_fint(AVCodecContext *avctx, const AVPacket *avpkt, unsigned size) decode_fint() argument 209 decode_move(AVCodecContext *avctx, const AVPacket *avpkt, unsigned size) decode_move() argument 333 decode_dlta(AVCodecContext *avctx, const AVPacket *avpkt, unsigned size) decode_dlta() argument 475 decode_kfrm(AVCodecContext *avctx, const AVPacket *avpkt, unsigned size) decode_kfrm() argument 539 decode_mous(AVCodecContext *avctx, const AVPacket *avpkt, unsigned size) decode_mous() argument 579 decode_mpos(AVCodecContext *avctx, const AVPacket *avpkt, unsigned size) decode_mpos() argument 674 decode_frame(AVCodecContext *avctx, AVFrame *frame, int *got_frame, AVPacket *avpkt) decode_frame() argument [all...] |
H A D | ttaenc.c | 87 static int tta_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, in tta_encode_frame() argument 97 if ((ret = ff_alloc_packet(avctx, avpkt, pkt_size)) < 0) in tta_encode_frame() 99 init_put_bits(&pb, avpkt->data, avpkt->size); in tta_encode_frame() 159 av_packet_unref(avpkt); in tta_encode_frame() 188 put_bits32(&pb, av_crc(s->crc_table, UINT32_MAX, avpkt->data, out_bytes) ^ UINT32_MAX); in tta_encode_frame() 191 avpkt->pts = frame->pts; in tta_encode_frame() 192 avpkt->size = out_bytes + 4; in tta_encode_frame() 193 avpkt->duration = ff_samples_to_time_base(avctx, frame->nb_samples); in tta_encode_frame()
|
H A D | yop.c | 195 int *got_frame, AVPacket *avpkt) in yop_decode_frame() 203 if (avpkt->size < 4 + 3 * s->num_pal_colors) { in yop_decode_frame() 216 s->srcptr = avpkt->data + 4; in yop_decode_frame() 217 s->src_end = avpkt->data + avpkt->size; in yop_decode_frame() 220 is_odd_frame = avpkt->data[0]; in yop_decode_frame() 240 if (s->srcptr - avpkt->data >= avpkt->size) { in yop_decode_frame() 266 return avpkt->size; in yop_decode_frame() 194 yop_decode_frame(AVCodecContext *avctx, AVFrame *rframe, int *got_frame, AVPacket *avpkt) yop_decode_frame() argument
|
H A D | truemotion2rt.c | 59 static int truemotion2rt_decode_header(AVCodecContext *avctx, const AVPacket *avpkt) in truemotion2rt_decode_header() argument 64 const uint8_t *buf = avpkt->data; in truemotion2rt_decode_header() 65 int size = avpkt->size; in truemotion2rt_decode_header() 106 int *got_frame, AVPacket *avpkt) in truemotion2rt_decode_frame() 114 ret = truemotion2rt_decode_header(avctx, avpkt); in truemotion2rt_decode_frame() 118 if ((avctx->width + s->hscale - 1)/ s->hscale * avctx->height * s->delta_size > avpkt->size * 8LL * 4) in truemotion2rt_decode_frame() 121 ret = init_get_bits8(gb, avpkt->data + ret, avpkt->size - ret); in truemotion2rt_decode_frame() 213 return avpkt->size; in truemotion2rt_decode_frame() 105 truemotion2rt_decode_frame(AVCodecContext *avctx, AVFrame *p, int *got_frame, AVPacket *avpkt) truemotion2rt_decode_frame() argument
|
/third_party/ffmpeg/tools/ |
H A D | target_dec_fuzzer.c | 85 int *got_sub_ptr, AVPacket *avpkt) in subtitle_handler() 88 int ret = avcodec_decode_subtitle2(avctx, &sub, got_sub_ptr, avpkt); in subtitle_handler() 175 const AVPacket *avpkt) = NULL; in LLVMFuzzerTestOneInput() 440 AVPacket *avpkt = av_packet_alloc(); in LLVMFuzzerTestOneInput() local 442 if (!frame || !avpkt || !parsepkt) in LLVMFuzzerTestOneInput() 469 int ret = av_parser_parse2(parser, parser_avctx, &avpkt->data, &avpkt->size, in LLVMFuzzerTestOneInput() 472 if (avpkt->data == parsepkt->data) { in LLVMFuzzerTestOneInput() 473 avpkt->buf = av_buffer_ref(parsepkt->buf); in LLVMFuzzerTestOneInput() 474 if (!avpkt in LLVMFuzzerTestOneInput() 84 subtitle_handler(AVCodecContext *avctx, void *frame, int *got_sub_ptr, AVPacket *avpkt) subtitle_handler() argument [all...] |
/third_party/ffmpeg/libavcodec/arm/ |
H A D | neontest.c | 35 AVPacket *avpkt)) in avcodec_decode_subtitle2() 38 got_sub_ptr, avpkt); in avcodec_decode_subtitle2() 48 wrap(avcodec_send_packet(AVCodecContext *avctx, const AVPacket *avpkt)) in avcodec_send_packet() argument 50 testneonclobbers(avcodec_send_packet, avctx, avpkt); in avcodec_send_packet() 53 wrap(avcodec_receive_packet(AVCodecContext *avctx, AVPacket *avpkt)) in avcodec_receive_packet() argument 55 testneonclobbers(avcodec_receive_packet, avctx, avpkt); in avcodec_receive_packet() 32 avcodec_decode_subtitle2(AVCodecContext *avctx, AVSubtitle *sub, int *got_sub_ptr, AVPacket *avpkt) avcodec_decode_subtitle2() argument
|
/third_party/ffmpeg/libavcodec/aarch64/ |
H A D | neontest.c | 35 AVPacket *avpkt)) in avcodec_decode_subtitle2() 38 got_sub_ptr, avpkt); in avcodec_decode_subtitle2() 48 wrap(avcodec_send_packet(AVCodecContext *avctx, const AVPacket *avpkt)) in avcodec_send_packet() argument 50 testneonclobbers(avcodec_send_packet, avctx, avpkt); in avcodec_send_packet() 53 wrap(avcodec_receive_packet(AVCodecContext *avctx, AVPacket *avpkt)) in avcodec_receive_packet() argument 55 testneonclobbers(avcodec_receive_packet, avctx, avpkt); in avcodec_receive_packet() 32 avcodec_decode_subtitle2(AVCodecContext *avctx, AVSubtitle *sub, int *got_sub_ptr, AVPacket *avpkt) avcodec_decode_subtitle2() argument
|
/third_party/ffmpeg/libavcodec/x86/ |
H A D | w64xmmtest.c | 35 AVPacket *avpkt)) in avcodec_decode_subtitle2() 38 got_sub_ptr, avpkt); in avcodec_decode_subtitle2() 48 wrap(avcodec_send_packet(AVCodecContext *avctx, const AVPacket *avpkt)) in avcodec_send_packet() argument 50 testxmmclobbers(avcodec_send_packet, avctx, avpkt); in avcodec_send_packet() 53 wrap(avcodec_receive_packet(AVCodecContext *avctx, AVPacket *avpkt)) in avcodec_receive_packet() argument 55 testxmmclobbers(avcodec_receive_packet, avctx, avpkt); in avcodec_receive_packet() 32 avcodec_decode_subtitle2(AVCodecContext *avctx, AVSubtitle *sub, int *got_sub_ptr, AVPacket *avpkt) avcodec_decode_subtitle2() argument
|