Commit acf06f45 authored by Mark Thompson's avatar Mark Thompson

lavc: Add coded bitstream read/write support for H.264

parent 18f1706f
......@@ -1740,6 +1740,7 @@ CONFIG_EXTRA="
bswapdsp
cabac
cbs
cbs_h264
dirac_parse
dvprofile
faandct
......@@ -1966,6 +1967,7 @@ w32threads_deps="atomics_native"
threads_if_any="$THREADS_LIST"
# subsystems
cbs_h264_select="cbs golomb"
dct_select="rdft"
dirac_parse_select="golomb"
error_resilience_select="me_cmp"
......
......@@ -54,6 +54,7 @@ OBJS-$(CONFIG_BLOCKDSP) += blockdsp.o
OBJS-$(CONFIG_BSWAPDSP) += bswapdsp.o
OBJS-$(CONFIG_CABAC) += cabac.o
OBJS-$(CONFIG_CBS) += cbs.o
OBJS-$(CONFIG_CBS_H264) += cbs_h2645.o h2645_parse.o
OBJS-$(CONFIG_DCT) += dct.o dct32_fixed.o dct32_float.o
OBJS-$(CONFIG_ERROR_RESILIENCE) += error_resilience.o
OBJS-$(CONFIG_FAANDCT) += faandct.o
......
......@@ -28,6 +28,9 @@
static const CodedBitstreamType *cbs_type_table[] = {
#if CONFIG_CBS_H264
&ff_cbs_type_h264,
#endif
};
int ff_cbs_init(CodedBitstreamContext *ctx,
......
This diff is collapsed.
This diff is collapsed.
/*
* This file is part of Libav.
*
* Libav is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* Libav is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with Libav; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef AVCODEC_CBS_H2645_H
#define AVCODEC_CBS_H2645_H
#include <stddef.h>
#include <stdint.h>
#include "h2645_parse.h"
typedef struct CodedBitstreamH2645Context {
// If set, the stream being read is in MP4 (AVCC/HVCC) format. If not
// set, the stream is assumed to be in annex B format.
int mp4;
// Size in bytes of the NAL length field for MP4 format.
int nal_length_size;
// Packet reader.
H2645Packet read_packet;
// Write buffer
uint8_t *write_buffer;
size_t write_buffer_size;
} CodedBitstreamH2645Context;
#endif /* AVCODEC_CBS_H2645_H */
This diff is collapsed.
......@@ -80,4 +80,7 @@ int ff_cbs_write_unsigned(CodedBitstreamContext *ctx, PutBitContext *pbc,
uint32_t range_min, uint32_t range_max);
extern const CodedBitstreamType ff_cbs_type_h264;
#endif /* AVCODEC_CBS_INTERNAL_H */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment