History

Merge commit 'b85a5e87af4254b80913fe33591d96361f30832b'

* commit 'b85a5e87af4254b80913fe33591d96361f30832b': lavu: Add av_strnstr() h264: Allow discarding the cropping information from SPS Conflicts: Changelog doc/APIchanges libavcodec/avcodec.h libavcodec/version.h libavutil/version.h

Michael Niedermayer committed 13 years ago

Commit 25be6302 parents b2d0c5b b85a5e89 files · +53 −3Browse files

Unified · Split

9 files
  1. Changelog +1 −0
  2. doc/APIchanges +3 −0
  3. libavcodec/avcodec.h +2 −0
  4. libavcodec/h264_ps.c +14 −0
  5. libavcodec/options_table.h +1 −0
  6. libavcodec/version.h +1 −1
  7. libavutil/avstring.c +14 −0
  8. libavutil/avstring.h +15 −0
  9. libavutil/version.h +2 −2
Changelog+1−0
@@ -9,6 +9,7 @@ version <next>: · 8 unmodified lines
9- Theora Midstream reconfiguration support9- Theora Midstream reconfiguration support
10- EVRC decoder10- EVRC decoder
11- audio fade filter11- audio fade filter
12- av_strnstr
12 13
13 14
14version 1.1:15version 1.1:
doc/APIchanges+3−0
@@ -135,6 +135,9 @@ API changes, most recent first: · 134 unmodified lines
1352012-03-26 - a67d9cf - lavfi 2.66.1001352012-03-26 - a67d9cf - lavfi 2.66.100
136 Add avfilter_fill_frame_from_{audio_,}buffer_ref() functions.136 Add avfilter_fill_frame_from_{audio_,}buffer_ref() functions.
137 137
1382013-01-xx - xxxxxxx - lavu 52.6.0 - avstring.h
139 Add av_strnstr()
140
1382013-01-xx - xxxxxxx - lavu 52.5.0 - hmac.h1412013-01-xx - xxxxxxx - lavu 52.5.0 - hmac.h
139 Add AVHMAC.142 Add AVHMAC.
140 143
libavcodec/avcodec.h+2−0
@@ -713,6 +713,8 @@ typedef struct RcOverride{ · 712 unmodified lines
713#define CODEC_FLAG2_NO_OUTPUT 0x00000004 ///< Skip bitstream encoding.713#define CODEC_FLAG2_NO_OUTPUT 0x00000004 ///< Skip bitstream encoding.
714#define CODEC_FLAG2_LOCAL_HEADER 0x00000008 ///< Place global headers at every keyframe instead of in extradata.714#define CODEC_FLAG2_LOCAL_HEADER 0x00000008 ///< Place global headers at every keyframe instead of in extradata.
715#define CODEC_FLAG2_DROP_FRAME_TIMECODE 0x00002000 ///< timecode is in drop frame format. DEPRECATED!!!!715#define CODEC_FLAG2_DROP_FRAME_TIMECODE 0x00002000 ///< timecode is in drop frame format. DEPRECATED!!!!
716#define CODEC_FLAG2_IGNORE_CROP 0x00010000 ///< Discard cropping information from SPS.
717
716#if FF_API_MPV_GLOBAL_OPTS718#if FF_API_MPV_GLOBAL_OPTS
717#define CODEC_FLAG_CBP_RD 0x04000000 ///< Use rate distortion optimization for cbp.719#define CODEC_FLAG_CBP_RD 0x04000000 ///< Use rate distortion optimization for cbp.
718#define CODEC_FLAG_QP_RD 0x08000000 ///< Use rate distortion optimization for qp selectioon.720#define CODEC_FLAG_QP_RD 0x08000000 ///< Use rate distortion optimization for qp selectioon.
libavcodec/h264_ps.c+14−0
@@ -471,6 +471,20 @@ int ff_h264_decode_seq_parameter_set(H264Context *h){ · 470 unmodified lines
471 sps->crop_right = get_ue_golomb(&s->gb);471 sps->crop_right = get_ue_golomb(&s->gb);
472 sps->crop_top = get_ue_golomb(&s->gb);472 sps->crop_top = get_ue_golomb(&s->gb);
473 sps->crop_bottom= get_ue_golomb(&s->gb);473 sps->crop_bottom= get_ue_golomb(&s->gb);
474 if (h->s.avctx->flags2 & CODEC_FLAG2_IGNORE_CROP) {
475 av_log(h->s.avctx, AV_LOG_DEBUG,
476 "discarding sps cropping, "
477 "original values are l:%u r:%u t:%u b:%u\n",
478 sps->crop_left,
479 sps->crop_right,
480 sps->crop_top,
481 sps->crop_bottom);
482
483 sps->crop_left =
484 sps->crop_right =
485 sps->crop_top =
486 sps->crop_bottom = 0;
487 }
474 if(sps->crop_left || sps->crop_top){488 if(sps->crop_left || sps->crop_top){
475 av_log(h->s.avctx, AV_LOG_ERROR, "insane cropping not completely supported, this could look slightly wrong ... (left: %d, top: %d)\n", sps->crop_left, sps->crop_top);489 av_log(h->s.avctx, AV_LOG_ERROR, "insane cropping not completely supported, this could look slightly wrong ... (left: %d, top: %d)\n", sps->crop_left, sps->crop_top);
476 }490 }
libavcodec/options_table.h+1−0
@@ -79,6 +79,7 @@ static const AVOption options[]={ · 78 unmodified lines
79{"sgop", "Deprecated, use mpegvideo private options instead", 0, AV_OPT_TYPE_CONST, {.i64 = CODEC_FLAG2_STRICT_GOP }, INT_MIN, INT_MAX, V|E, "flags2"},79{"sgop", "Deprecated, use mpegvideo private options instead", 0, AV_OPT_TYPE_CONST, {.i64 = CODEC_FLAG2_STRICT_GOP }, INT_MIN, INT_MAX, V|E, "flags2"},
80#endif80#endif
81{"noout", "skip bitstream encoding", 0, AV_OPT_TYPE_CONST, {.i64 = CODEC_FLAG2_NO_OUTPUT }, INT_MIN, INT_MAX, V|E, "flags2"},81{"noout", "skip bitstream encoding", 0, AV_OPT_TYPE_CONST, {.i64 = CODEC_FLAG2_NO_OUTPUT }, INT_MIN, INT_MAX, V|E, "flags2"},
82{"ignorecrop", "ignore cropping information from sps", 1, AV_OPT_TYPE_CONST, {.i64 = CODEC_FLAG2_IGNORE_CROP }, INT_MIN, INT_MAX, V|D, "flags2"},
82{"local_header", "place global headers at every keyframe instead of in extradata", 0, AV_OPT_TYPE_CONST, {.i64 = CODEC_FLAG2_LOCAL_HEADER }, INT_MIN, INT_MAX, V|E, "flags2"},83{"local_header", "place global headers at every keyframe instead of in extradata", 0, AV_OPT_TYPE_CONST, {.i64 = CODEC_FLAG2_LOCAL_HEADER }, INT_MIN, INT_MAX, V|E, "flags2"},
83{"chunks", "Frame data might be split into multiple chunks", 0, AV_OPT_TYPE_CONST, {.i64 = CODEC_FLAG2_CHUNKS }, INT_MIN, INT_MAX, V|D, "flags2"},84{"chunks", "Frame data might be split into multiple chunks", 0, AV_OPT_TYPE_CONST, {.i64 = CODEC_FLAG2_CHUNKS }, INT_MIN, INT_MAX, V|D, "flags2"},
84{"showall", "Show all frames before the first keyframe", 0, AV_OPT_TYPE_CONST, {.i64 = CODEC_FLAG2_SHOW_ALL }, INT_MIN, INT_MAX, V|D, "flags2"},85{"showall", "Show all frames before the first keyframe", 0, AV_OPT_TYPE_CONST, {.i64 = CODEC_FLAG2_SHOW_ALL }, INT_MIN, INT_MAX, V|D, "flags2"},
libavcodec/version.h+1−1
@@ -29,7 +29,7 @@ · 28 unmodified lines
29#include "libavutil/avutil.h"29#include "libavutil/avutil.h"
30 30
31#define LIBAVCODEC_VERSION_MAJOR 5431#define LIBAVCODEC_VERSION_MAJOR 54
32#define LIBAVCODEC_VERSION_MINOR 9032#define LIBAVCODEC_VERSION_MINOR 91
33#define LIBAVCODEC_VERSION_MICRO 10033#define LIBAVCODEC_VERSION_MICRO 100
34 34
35#define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \35#define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
libavutil/avstring.c+14−0
@@ -65,6 +65,20 @@ char *av_stristr(const char *s1, const char *s2) · 64 unmodified lines
65 return NULL;65 return NULL;
66}66}
67 67
68char *av_strnstr(const char *haystack, const char *needle, size_t hay_length)
69{
70 size_t needle_len = strlen(needle);
71 if (!needle_len)
72 return haystack;
73 while (hay_length >= needle_len) {
74 hay_length--;
75 if (!memcmp(haystack, needle, needle_len))
76 return haystack;
77 haystack++;
78 }
79 return NULL;
80}
81
68size_t av_strlcpy(char *dst, const char *src, size_t size)82size_t av_strlcpy(char *dst, const char *src, size_t size)
69{83{
70 size_t len = 0;84 size_t len = 0;
libavutil/avstring.h+15−0
@@ -66,6 +66,21 @@ int av_stristart(const char *str, const char *pfx, const char **ptr); · 65 unmodified lines
66 */66 */
67char *av_stristr(const char *haystack, const char *needle);67char *av_stristr(const char *haystack, const char *needle);
68 68
69/**
70 * Locate the first occurrence of the string needle in the string haystack
71 * where not more than hay_length characters are searched. A zero-length
72 * string needle is considered to match at the start of haystack.
73 *
74 * This function is a length-limited version of the standard strstr().
75 *
76 * @param haystack string to search in
77 * @param needle string to search for
78 * @param hay_length length of string to search in
79 * @return pointer to the located match within haystack
80 * or a null pointer if no match
81 */
82char *av_strnstr(const char *haystack, const char *needle, size_t hay_length);
83
69/**84/**
70 * Copy the string src to dst, but no more than size - 1 bytes, and85 * Copy the string src to dst, but no more than size - 1 bytes, and
71 * null-terminate dst.86 * null-terminate dst.
libavutil/version.h+2−2
@@ -75,8 +75,8 @@ · 74 unmodified lines
75 */75 */
76 76
77#define LIBAVUTIL_VERSION_MAJOR 5277#define LIBAVUTIL_VERSION_MAJOR 52
78#define LIBAVUTIL_VERSION_MINOR 1578#define LIBAVUTIL_VERSION_MINOR 16
79#define LIBAVUTIL_VERSION_MICRO 10379#define LIBAVUTIL_VERSION_MICRO 100
80 80
81#define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \81#define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \
82 LIBAVUTIL_VERSION_MINOR, \82 LIBAVUTIL_VERSION_MINOR, \

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t