Skip to content

Commit

Permalink
fix compilation, fix scaling list declarations in header, switch h264…
Browse files Browse the repository at this point in the history
…_analyze to use read_debug

git-svn-id: http://svn.code.sf.net/p/h264bitstream/code/trunk@94 bc2f0a9b-661e-0410-ac89-ff65b7b8b7c4
  • Loading branch information
aizvorski committed Jul 8, 2012
1 parent 52ec31c commit 239fed0
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 7 deletions.
7 changes: 5 additions & 2 deletions h264bitstream/Makefile.unix
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ INCLUDES =
LIBS =

CC = gcc
CFLAGS += -std=c99 -pedantic -Wall -W -Wshadow -Wwrite-strings -Wno-unused -g -O3 $(INCLUDES)
CFLAGS += -std=c99 -pedantic -Wall -W -Wshadow -Wwrite-strings -Wno-unused -g $(INCLUDES)

LD = gcc
LDFLAGS += $(LIBS)
Expand All @@ -16,9 +16,12 @@ BINARIES = h264_analyze

all: libh264bitstream.a $(BINARIES)

h264_slice_data.c: h264_slice_data.in.c
h264_slice_data.c: h264_slice_data.in.c process.pl
perl process.pl > h264_slice_data.c < h264_slice_data.in.c

h264_stream.c: h264_stream.in.c process.pl
perl process.pl > h264_stream.c < h264_stream.in.c

h264_analyze: h264_analyze.o libh264bitstream.a
$(LD) $(LDFLAGS) -o h264_analyze h264_analyze.o -L. -lh264bitstream -lm

Expand Down
6 changes: 3 additions & 3 deletions h264bitstream/h264_analyze.c
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ int main(int argc, char *argv[])
}

p += nal_start;
read_nal_unit(h, p, nal_end - nal_start);
read_debug_nal_unit(h, p, nal_end - nal_start);

if ( opt_probe && h->nal->nal_unit_type == NAL_UNIT_TYPE_SPS )
{
Expand All @@ -164,9 +164,9 @@ int main(int argc, char *argv[])
if ( opt_verbose > 0 )
{
fprintf( h264_dbgfile, "XX ");
debug_bytes(p-4, nal_end - nal_start + 4 >= 16 ? 16: nal_end - nal_start + 4);
// debug_bytes(p-4, nal_end - nal_start + 4 >= 16 ? 16: nal_end - nal_start + 4);

debug_nal(h, h->nal);
// debug_nal(h, h->nal);
}

p += (nal_end - nal_start);
Expand Down
6 changes: 4 additions & 2 deletions h264bitstream/h264_stream.h
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ int read_nal_unit(h264_stream_t* h, uint8_t* buf, int size);
int peek_nal_unit(h264_stream_t* h, uint8_t* buf, int size);

void read_seq_parameter_set_rbsp(h264_stream_t* h, bs_t* b);
void read_scaling_list(bs_t* b, int* scalingList, int sizeOfScalingList, int useDefaultScalingMatrixFlag );
void read_scaling_list(bs_t* b, int* scalingList, int sizeOfScalingList, int* useDefaultScalingMatrixFlag );
void read_vui_parameters(h264_stream_t* h, bs_t* b);
void read_hrd_parameters(h264_stream_t* h, bs_t* b);

Expand All @@ -401,7 +401,7 @@ int more_rbsp_trailing_data(h264_stream_t* h, bs_t* b);
int write_nal_unit(h264_stream_t* h, uint8_t* buf, int size);

void write_seq_parameter_set_rbsp(h264_stream_t* h, bs_t* b);
void write_scaling_list(bs_t* b, int* scalingList, int sizeOfScalingList, int useDefaultScalingMatrixFlag );
void write_scaling_list(bs_t* b, int* scalingList, int sizeOfScalingList, int* useDefaultScalingMatrixFlag );
void write_vui_parameters(h264_stream_t* h, bs_t* b);
void write_hrd_parameters(h264_stream_t* h, bs_t* b);

Expand All @@ -422,6 +422,8 @@ void write_ref_pic_list_reordering(h264_stream_t* h, bs_t* b);
void write_pred_weight_table(h264_stream_t* h, bs_t* b);
void write_dec_ref_pic_marking(h264_stream_t* h, bs_t* b);

int read_debug_nal_unit(h264_stream_t* h, uint8_t* buf, int size);

void debug_sps(sps_t* sps);
void debug_pps(pps_t* pps);
void debug_slice_header(slice_header_t* sh);
Expand Down

0 comments on commit 239fed0

Please sign in to comment.